Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
fqiao70
Yak Posting Veteran
52 Posts |
Posted - 2009-02-13 : 13:39:41
|
| Hi Experts,we have about 10 sql servers and each sql server has about 20 databases. i want to create a table that list all sql servers, databases, and application name, size. also i want that table got automaticly updated once a week for databases name/size changes. so i can generate a report base on that table every week. how could i do that? i know how to generate a report for each server using this code, but i don't know how to fetch them to that table? Thanks a lotCREATE TABLE #server_databases (DATABASE_NAME nvarchar(200),DATABASE_SIZE int,REMARKS nvarchar(200))INSERT INTO #server_databases EXEC sp_databasesSELECT DATABASE_NAME,DATABASE_SIZE/1024 "DATABASE_SIZE(M)" FROM #server_databasesDROP TABLE #server_databases |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
|
|
|