Wednesday, March 7, 2012

Find location of data files

What is the tsql cmb to view the file structure location on a database?
This will help me with my attach and detach.sp_help '<dbname>'
sqlteam32 wrote:
> What is the tsql cmb to view the file structure location on a database?
> This will help me with my attach and detach.|||Sorry, make that:
sp_helpdb '<dbname>'
sqlteam32 wrote:
> What is the tsql cmb to view the file structure location on a database?
> This will help me with my attach and detach.|||try the following:
use <dbname>
sp_helpfile
sp_helpgroup
select * from sysfiles
use master
select * from sysaltfiles
"sqlteam32" <mtorpy@.gmail.com> wrote in message
news:1149798455.023852.166600@.h76g2000cwa.googlegroups.com...
> What is the tsql cmb to view the file structure location on a database?
> This will help me with my attach and detach.
>|||Note that following will yield an error. If a call to a stored procedure is
not the first thing in a batch, you must use the keyword EXECUTE (or EXEC)
Also, I'm not sure why you need sp_helpgroup, which returns security groups.
Perhaps you want sp_helpfilegroup?
USE <dbname>
EXEC sp_helpfile
EXEC sp_helpfilegroup
SELECT * FROM sysfiles
--
HTH
Kalen Delaney, SQL Server MVP
"Jayesh Antony Jose" <jayeshaj@.hotmail.com> wrote in message
news:OvXadVDjGHA.3800@.TK2MSFTNGP03.phx.gbl...
> try the following:
> use <dbname>
> sp_helpfile
> sp_helpgroup
> select * from sysfiles
>
> use master
> select * from sysaltfiles
>
> "sqlteam32" <mtorpy@.gmail.com> wrote in message
> news:1149798455.023852.166600@.h76g2000cwa.googlegroups.com...
>> What is the tsql cmb to view the file structure location on a database?
>> This will help me with my attach and detach.
>

No comments:

Post a Comment