Page 1 of 1

'How do I' question

Posted: Mon 16 Jul 2007 20:23
by ccmcbride
I am trying to work out how to

1) Detach a database
2 )Zip the files
3) Reattach the database.

I'm pretty sure I can figure out the SQL statements for 1 and 3, but to do 2, I need to figure out the physical file names. Does anyone know of a way to do this, either using sDac components 4.10.0.9, or using SQL?

Thanks in Advance

Posted: Wed 18 Jul 2007 09:23
by Antaeus
You can try to use the sp_helpfile system stored procedure:

Code: Select all

exec sp_helpfile 'test'
Tou can read about sp_helpfile in MSDN