Viewing 15 posts - 106 through 120 (of 136 total)
Check to make sure service broker is enabled?
SELECT is_broker_enabled FROM sys.databases WHERE name = 'msdb';
June 22, 2011 at 5:00 pm
Are you seeing the errors in the logs after the fact? Perhaps there's transaction blowing out the log and then rolling back so by the time you see the error...
February 19, 2010 at 11:39 am
GT-897544 (2/10/2010)
How about using "SP_MSFOREACHDB"
But where's the fun in that?
DECLARE @CMD NVARCHAR(500)
SET @CMD = '
if db_id(''*'') > 4
USE [*]
EXEC sp_msforeachtable @command1=''DBCC DBREINDEX (''''?'''','''''''', 100)'', @command2=''print ''''?''''''
'
EXEC sp_msforeachdb @CMD, @replacechar =...
February 10, 2010 at 10:02 pm
SQLBOT (2/10/2010)
If you just wait it will all catch up when...
February 10, 2010 at 2:29 pm
I believe my "USE [?]" that is exexuted in the sp_MSForeachdb, will effectively test a connection to each db that is online
I was just about to respond that the...
February 9, 2010 at 4:01 pm
Woops, sorry, yes I misunderstood your problem.
Revised.. 🙂
declare @dbname varchar(255), @sql varchar(255)
declare c_dblist cursor for
select name from master.dbo.sysdatabases order by name
open c_dblist
fetch next from c_dblist into @dbname
while @@fetch_status =...
February 9, 2010 at 3:57 pm
tim-407748 (2/9/2010)
Hoping you can help me.
</snip>
now the moment uncomment the following line
--execute sp_MSforeachtable @command1='DBCC DBREINDEX ([?], '''', 100)', @command2='print [?]'
</snip>
How can I loop through each database on a server...
February 9, 2010 at 3:32 pm
SSMS | Click the "Jobs" node | Select requited job | Right Click | Script job As...
Also, if you have the Object Explorer Details panel open, once you've selected the...
February 9, 2010 at 2:55 pm
It might be easier to just query sys.databases state and state_desc columns to see the current state of the database. If you're dead set on touching the db you could...
February 9, 2010 at 2:42 pm
i took the liberty to update the script a little bit to allow better sorting based on different columns, such as Data.
By changing the Data column to a BigInt and...
January 22, 2010 at 5:19 pm
Yes I agree but I recommend to eliminate the sys schema!
Oops, yeah that's also a remnant from our environmental needs. The information in our current version also contains servernames, dbnames,...
January 22, 2010 at 5:15 pm
Using sp_mstablespace won't give you any unused space that the table is holding and sp_msforeachtable won't return internal tables. We were having issues pinpointing our space discrepancies, which were largely...
January 22, 2010 at 4:41 pm
That's the "RBarryYoung" technique that they have been talking about (follow the link above).
I wasn't trying to steal your thunder, that's where I learned it from 😀
I was just trying...
January 21, 2010 at 6:15 pm
The client_net_address should represent the address of the client machine making the connection. If you're connecting directly from your machine it should show your address. If you're connecting through, say,...
January 21, 2010 at 4:17 pm
Viewing 15 posts - 106 through 120 (of 136 total)