Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Accessing SQL 7 Database files

Status
Not open for further replies.

monsy

Technical User
Aug 28, 2002
20
US
Hi evereybody!
I have installed SQL 7 in my desktop with OS win 2003 server. I have a copy of my database and I'am trying to access it or at least see the list of tables of my database.

The database files names are as follows:

PRDDATA1.MDF
PRDDATA2.NDF
PRDDATA3.NDF
PRDDATA4.NDF
PRDDATA5.NDF
PRDLOG1.LDF

I'm new to SQL.
Can anybody help me?
 
EXEC sp_attach_db @dbname = N'YourDBName',
@filename1 = N'c:\PathName\PRDDATA1.mdf',
@filename2 = N'c:\PathName\PRDDATA2.ndf',
@filename3 = N'c:\PathName\PRDDATA3.ndf',
@filename4 = N'c:\PathName\PRDDATA4.ndf',
@filename5 = N'c:\PathName\PRDDATA5.ndf',
@filename6 = N'c:\PathName\PRDLOG1.ldf'

Thanks

J. Kusch
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top