Viewing 13 posts - 1 through 13 (of 13 total)
Great topic Rudy, thanks for sharing.
I've got a few suggestions:
1- Instead of just scripting the logins, use the "https://support.microsoft.com/en-us/kb/918992" -- sp_hexadecimal.sql for transferring Logins and passwords.
2-I don't believe there's such...
October 16, 2015 at 9:21 am
Tables should be fully qualified, otherwise it'll generate some blood! ....from msdb..sysjobs inner join msdb..sysjobservers;
A quote needs to be closed after the word HTML'
May 28, 2014 at 9:34 am
Hi, I'm using SQL Server 2014!
The column name is [[highlight=#ffff11]physical_memory_kb[/highlight]]! There's no column [physical_memory_in_bytes] in sys.dm_os_sys_info;
Here are all the columns in the DMV sys.dm_os_sys_info
cpu_ticks ...
May 19, 2014 at 12:49 am
Just change column physical_memory_in_bytes with [physical_memory_kb/1048.576]!! otherwise it'll generate some blood!:-D
May 18, 2014 at 10:40 pm
Got some blood here:
Msg 213, Level 16, State 7, Line 19
Column name or number of supplied values does not match table definition.
to correct it
Add column <RecoveryUnitID INT> to TABLE...
May 6, 2014 at 11:23 pm
Improved version!! I added Schema, since we can have more than 1 table with the same name in the DB.
Note: We don't need the temporary table as a placeholder.
In any...
January 31, 2014 at 11:02 am
Here's an improved version that includes the Schema and PKs and FKs; Just add the DB extended properties to describe field contents and Voilá
SELECT DISTINCT
t.name AS Table_Name, sc.name...
January 22, 2014 at 1:05 pm
Oops! Typo..here it is
Create procedure [dbo].[Database_Object_Last_used_details]
as
BEGIN
BEGIN TRY
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[UnusedObjectlist]') AND type in (N'U'))
DROP TABLE [dbo].[UnusedObjectlist]
CREATE TABLE [dbo].[UnusedObjectlist](
ObjectName varchar(50),
ObjectType varchar(25),
ServerNamevarchar(20),
DatabaseName varchar(20),
CreatedDate Datetime,
ModifyDate datetime,
last_usedDate...
September 17, 2012 at 10:48 pm
Would first name the DBs correctly ('master','tempdb','msdb','model') >>>> mode vs model
Would add sufficient space in Table Var to DBName Column (could be a sysname data type)
Would qualify the database...
September 13, 2012 at 3:32 pm
Hi NU,
1 - It is indeed a very good option, especially if you know that data is going to grow even more. I've used this approach on a 45TB Database.
2...
June 7, 2012 at 11:58 am
CMS is pretty slick but the setup is kinda' painful! it's almost what one has to do for traversing multiple servers using TSQL(sysservers) but one needs to have the linked...
May 1, 2012 at 12:37 pm
Was testing it and it runs gr8! However, it'd be good if could be extended to run for multiple Databases within the given server or even servers.
So, I'd add two...
April 18, 2012 at 3:07 pm
Simply use
exec sp_MSforeachTable 'sp_spaceused '
October 31, 2011 at 10:20 pm
Viewing 13 posts - 1 through 13 (of 13 total)