----- Original Message -----
From: "Bud" <[EMAIL PROTECTED]>
Sent: Friday, August 04, 2000 10:45 PM


> Hi. I must be brain dead or I'm reading something wrong.
>
> If I take the mdf and ldf SQL files from one machine and put them on
> another, how can I get them set up in SQL Server? Everything I read

You need to use the T-SQL command "sp_attach_db" for your database and tran
logs. It goes something like this:

EXEC sp_attach_db @dbname = N 'yourdb'
@filename1 = N 'c:\mssql7\data\yourdb.mdf'
@filename2 = N 'c:\mssql7\data\yourdb_log.ldf'

A better (and simpler) way to do this however would be to backup your database
to a dump file on the first machines hard disk, copy the dump file across to
your other machine and restore it - that way you keep all of the database
structure and its associated permissions etc..

Adrian Cooper.


------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to