Showing posts with label drives. Show all posts
Showing posts with label drives. Show all posts

Monday, March 19, 2012

Filegroups and physical files

Hello All,
I am trying to analyse a DB schema created by someone
else. There is a file groups. How can I find out how many
files (and on what drives) belong to that file group?
Thanks a lot in advance for your help.
regards,
Abhishek.Hi,
If you are using enterprise manager right click on the database and look at
the properties.
From TSQL do this
select * from master.dbo.sysaltfiles
--
I hope this helps
regards
Greg O MCSD
SQL Scribe Documentation Builder
Document any SQL server database in minutes
Programmers love it, DBA dream of it
AGS SQL Scribe download a 30 day trial today
http://www.ag-software.com/ags_scribe_index.asp
"Abhishek Srivastava" <abhishek@.nospam.net> wrote in message
news:085701c345d8$7178cae0$a301280a@.phx.gbl...
> Hello All,
> I am trying to analyse a DB schema created by someone
> else. There is a file groups. How can I find out how many
> files (and on what drives) belong to that file group?
> Thanks a lot in advance for your help.
> regards,
> Abhishek.|||You can list all database files along with the file group name with
sp_helpdb:
EXEC sp_helpdb 'MyDatabase'
You can list files in a specific file group with sp_helpfilegroup:
USE MyDatabase
EXEC sp_helpfilegroup 'PRIMARY'
--
Hope this helps.
Dan Guzman
SQL Server MVP
--
SQL FAQ links (courtesy Neil Pike):
http://www.ntfaq.com/Articles/Index.cfm?DepartmentID=800
http://www.sqlserverfaq.com
http://www.mssqlserver.com/faq
--
"Abhishek Srivastava" <abhishek@.nospam.net> wrote in message
news:085701c345d8$7178cae0$a301280a@.phx.gbl...
> Hello All,
> I am trying to analyse a DB schema created by someone
> else. There is a file groups. How can I find out how many
> files (and on what drives) belong to that file group?
> Thanks a lot in advance for your help.
> regards,
> Abhishek.

Friday, March 9, 2012

file will not attach to SQL reason file is not primary file

I have a customer they are running raid 5 on a windows 2000 server one of the drives went bad. The customer replaced the drive and raid rebuilt the drive, every thing seamed to be fine but there is one database file that cannot be attached to SQL. The file is 15G so I know there is information the error states that the file is not a Primary file. Any clue on how to fix this?

mdf file size 5,738,944 KB

ldf file size 10,176 KB

You need the primary file to attach this. I guess your last resort will be your backups|||There's another file out there somewhere - probably another mdf. Make sure you've got them all and the attach should work.|||Thanks the file looks to be corupted. the customer did not run any backup so I guess the information is lost. thanks again for your help.

file will not attach to SQL reason file is not primary file

I have a customer they are running raid 5 on a windows 2000 server one of the drives went bad. The customer replaced the drive and raid rebuilt the drive, every thing seamed to be fine but there is one database file that cannot be attached to SQL. The file is 15G so I know there is information the error states that the file is not a Primary file. Any clue on how to fix this?

mdf file size 5,738,944 KB

ldf file size 10,176 KB

You need the primary file to attach this. I guess your last resort will be your backups|||There's another file out there somewhere - probably another mdf. Make sure you've got them all and the attach should work.|||Thanks the file looks to be corupted. the customer did not run any backup so I guess the information is lost. thanks again for your help.