Re: Starting up database 'customers' every minute or so in SQL LOG
From: Dinesh T.K (tkdinesh_at_nospam.mail.tkdinesh.com)
Date: 05/13/04
- Next message: overfried: "error connecting to local sql server"
- Previous message: Soumitra Banerjee: "Encrypted Stored Procs."
- In reply to: SangHun: "Re: Starting up database 'customers' every minute or so in SQL LOG"
- Next in thread: SangHun: "Re: Starting up database 'customers' every minute or so in SQL LOG"
- Reply: SangHun: "Re: Starting up database 'customers' every minute or so in SQL LOG"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 14 May 2004 04:08:44 +0530
Sunny,
>>Do you know a query can do this?
One way would be to write a cursor and traverse through master..sysdatabases
and execute EXEC sp_dboption '<databasename>','autoclose',False aagainst
each one.Since this is a one time job and since I assume you are not going
to make it part pf production code, you can use the undocumented call -
sp_msforeachdb.
Thus the below command would run against all databases and turn 'Auto close'
off for each.Do note that, since 'Auto close' cannot be set in database
'master' and
'tempdb', you will get the corresponding error messages.You can ignore that.
EXEC sp_msforeachdb @command1= "PRINT '?' EXEC sp_dboption @dbname =
'?',@optname = 'autoclose',@optvalue = False"
>>Any thought on this?
Did you check the initial few lines of the sql log as I mentioned?If you are
unable to find the location of the error log, then execute the below command
in Query Analyzer and check for a line like this: "SQL Server is starting at
priority class 'normal'(n CPU detected) " where n indicates the number.
EXEC sp_readerrorlog
On other way would be to check in Enterprise manager.Right click on sql
server | properties and in the 'Processor' tab, look in the parellilism
block.Is it letting you to select more than 2 processors?
May be there is a easy way or a command that I might be missing but these
are also options for you to check.
-- Dinesh SQL Server MVP -- -- SQL Server FAQ at http://www.tkdinesh.com "SangHun" <anonymous@discussions.microsoft.com> wrote in message news:88C8B771-1BD0-4335-BD31-B759D040A3FD@microsoft.com... > Thanks Dinesh! I should set them all OFF. Do you know a query can do this? > > I looked at the server using Task Manager, it shows me 4 CPUs and when I execute backup query, SQL personal edition seems like to uses all 4 cpu (According to SQL DBA book, personal edition can use CPU up to 2). If this is true, than I don't have to upgrade in hurry. I reported to manager and he thinks that we can do this some time next month.... Any thought on this?
- Next message: overfried: "error connecting to local sql server"
- Previous message: Soumitra Banerjee: "Encrypted Stored Procs."
- In reply to: SangHun: "Re: Starting up database 'customers' every minute or so in SQL LOG"
- Next in thread: SangHun: "Re: Starting up database 'customers' every minute or so in SQL LOG"
- Reply: SangHun: "Re: Starting up database 'customers' every minute or so in SQL LOG"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|