Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Documention Expand / Collapse
Author
Message
Posted Wednesday, November 28, 2007 6:50 AM
Right there with Babe

Right there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with Babe

Group: General Forum Members
Last Login: Wednesday, July 9, 2014 8:50 AM
Points: 743, Visits: 1,542

trying to come up with a few commands that I can use to query my SQL Server 2000 Instances and Document my Databases - preferably Excel

exec sp_helpdb comes to mind.. can anyone help me further?



Post #426854
Posted Wednesday, November 28, 2007 7:17 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Thursday, July 17, 2014 3:34 AM
Points: 384, Visits: 819
This script is pretty good.

http://www.sqlservercentral.com/scripts/Miscellaneous/31574/
Post #426875
Posted Wednesday, November 28, 2007 7:47 AM
Right there with Babe

Right there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with Babe

Group: General Forum Members
Last Login: Wednesday, July 9, 2014 8:50 AM
Points: 743, Visits: 1,542

Thanks but I got some crazy HTML output that really isn't very usefull to me..



Post #426898
Posted Wednesday, November 28, 2007 2:03 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Today @ 12:18 AM
Points: 36,751, Visits: 31,202
Jpotucek (11/28/2007)

trying to come up with a few commands that I can use to query my SQL Server 2000 Instances and Document my Databases - preferably Excel

exec sp_helpdb comes to mind.. can anyone help me further?


Does sp_HelpDB give you all of the information you want?


--Jeff Moden
"RBAR is pronounced "ree-bar" and is a "Modenism" for "Row-By-Agonizing-Row".

First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."

(play on words) "Just because you CAN do something in T-SQL, doesn't mean you SHOULDN'T." --22 Aug 2013

Helpful Links:
How to post code problems
How to post performance problems
Post #427093
Posted Thursday, November 29, 2007 4:33 AM
Right there with Babe

Right there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with Babe

Group: General Forum Members
Last Login: Wednesday, July 9, 2014 8:50 AM
Points: 743, Visits: 1,542

Yes, I have been using sp_helpdb databasename. this gives me DB name, logical DB name, physical file locations, size, owner.....

From there I am able to cut and paste what I need into excel but it's tedious...




Post #427335
Posted Thursday, November 29, 2007 8:09 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Today @ 12:18 AM
Points: 36,751, Visits: 31,202
Trying to figure out what you need and this seems simple to you because you know what you want... but we don't...

You say the copy/paste into Excel is tedious... what is it about it that's tedious? Do you need to split the Status column or are you trying to paste the output exactly like it is or what?

Are you using the grid mode for the copy paste or the text mode?

Please help us help you... be a bit more descriptive as to what you'd like to get from sp_HelpDB into Excel.


--Jeff Moden
"RBAR is pronounced "ree-bar" and is a "Modenism" for "Row-By-Agonizing-Row".

First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."

(play on words) "Just because you CAN do something in T-SQL, doesn't mean you SHOULDN'T." --22 Aug 2013

Helpful Links:
How to post code problems
How to post performance problems
Post #427501
Posted Friday, November 30, 2007 7:00 AM
Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Thursday, February 26, 2009 3:02 PM
Points: 515, Visits: 655
J,

I use this to keep track of the Version and Edition on all of our SQL Server systems.

Written for use in both SQL Server 2000 and SQL Server 2005!

Happy Coding!

-- Show information about all SQL Server Databases in a given instance.

-- SQL Server 2000
USE master
GO

select
-- getdate() as 'Time_Data_Gathered'
--,
cast(serverproperty('ServerName') as varchar(20)) as [Server Name]
,Case when serverproperty('InstanceName') is null
then '(default)'
else serverproperty('InstanceName')
end as [Instance Name]
,name as [Database Name]
,cast(serverproperty('productversion') as varchar(20)) as [Product Version]
,cast(serverproperty('productlevel') as varchar(20)) as [Product Level]
,cast(serverproperty('edition') as varchar(40)) as [Edition]
FROM dbo.sysdatabases



-- SQL Server 2005
USE master
GO

select
-- getdate() as 'Time_Data_Gathered'
--,
cast(serverproperty('ServerName') as varchar(20)) as [Server Name]
,Case when serverproperty('InstanceName') is null
then '(default)'
else serverproperty('InstanceName')
end as [Instance Name]
,name as [Database Name]
,cast(serverproperty('productversion') as varchar(20)) as [Product Version]
,cast(serverproperty('productlevel') as varchar(20)) as [Product Level]
,cast(serverproperty('edition') as varchar(40)) as [Edition]
FROM sys.databases



"Key"
MCITP: DBA, MCSE, MCTS: SQL 2005, OCP
Post #428083
Posted Friday, November 30, 2007 8:48 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Today @ 12:18 AM
Points: 36,751, Visits: 31,202
Jpotucek,

C'mon... I'm trying to help... I need the answers to the questions I asked above so we can avoid the problems you're having...


--Jeff Moden
"RBAR is pronounced "ree-bar" and is a "Modenism" for "Row-By-Agonizing-Row".

First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."

(play on words) "Just because you CAN do something in T-SQL, doesn't mean you SHOULDN'T." --22 Aug 2013

Helpful Links:
How to post code problems
How to post performance problems
Post #428154
Posted Friday, November 30, 2007 8:58 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: Administrators
Last Login: Yesterday @ 4:02 PM
Points: 33,062, Visits: 15,176
Documenting is hard, often because there's no good place to keep documentation handy. I prefer ER diagrams, but you really need some snippets from Word or someplace handy to note what columns mean. And it should be something that links together related columns.

I've tried Word, Excel, Visio, ER/Studio, ErWin, HTML and more over the years. The only thing that's ever worked well for documenting the database is my brain loaded with experience in working with the tables.







Follow me on Twitter: @way0utwest

Forum Etiquette: How to post data/code on a forum to get the best help
Post #428159
Posted Friday, November 30, 2007 9:26 AM
Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Thursday, February 26, 2009 3:02 PM
Points: 515, Visits: 655
J,

Can you provide us the column list of the spreadsheet system you currently are using?


In my environment, I use a mix of built-in procedures like sp_helpdb and the custom script (as well as others) that I posted above to populate 2 Excel spreadsheets. One tracks at the server/instance level, and the second one at the database level.

Each document gets a review at least once a month, or when a new database server is being brought online, when a new SQL patch is released. etc.

These spreadsheets come in real handy when my boss gives asks me to get him numbers for his next meeting (oh yeah, it is in 5 minutes) and wants a count of how many SQL 2000 instances we have on Windows 2003 or how many SQL Server 2005 databases we have currently running on SQL Server Service Pack 2.


I would be interested in comparing the information I track with you as well as others.


"Key"
MCITP: DBA, MCSE, MCTS: SQL 2005, OCP
Post #428180
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse