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.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 query contents of a datafile

Author  Topic 

rezrocket
Starting Member

4 Posts

Posted - 2009-12-30 : 18:06:19
I need assistance with the following, I am running sql server 2005 as a backend database for SAP on a 64-bit 2003 Enterprise server. The user database is spread across 8 datafiles and 5 log files. I was asked by a consultant if I knew how to query what each datafile contains because he wanted to know what tables were on each datafile. Thus far I have not been able to find any information regarding this question. I am coming down to the wire for an upgrade, and I need someone's assistance, please. If there is a thread that already exists out there, please direct me to it, thank you.

Your assistance is appreciated

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-12-30 : 18:15:21
Are the objects in filegroups other than the primary one? If not, then there is no way to query for it as the data is spread across all data files using the proportional fill algorithm.

Why would you want 5 log files? Only one is used at a time. Are they that tight on space on their first or second drive?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-12-30 : 18:27:51
If they are in filegroups, then you can use the 2005 query from this link: http://drsql.spaces.live.com/blog/cns!80677FB08B3162E4!1038.entry

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page

rezrocket
Starting Member

4 Posts

Posted - 2009-12-30 : 19:21:51
MSCE Consultants set it up per SAP recommendations. Current Siemens consultants are stressing the same in this upgrade to maintain original setup.

All objects are spread across 8 datafiles and all datafiles are in the primary filegroup.

Thanks for your prompt response.

Happy New Year and party hard on my birthday. :D
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-12-30 : 23:05:54
There's no way to query it then since the data is spread across all data files.

You're welcome.

Happy Birthday!

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page
   

- Advertisement -