I have a database that has all its data forwarded to a vendor. The vendor will do some conversion and then recreate the database for us. When the vendor is done , he will send the database with all the data back to us and I am supposed to restore the database for my office.
What I plan on doing is ; on the query_analyzer, I will execute the following;
exec sp_detach_db ‘ current_db_name’
This I hope will detach my existing database. First question do I run this from the master_database or from the existing database that I want to detach?
when this is done, I plan on insertig the vendor’s CD or diskette and copy the contents to the filepath i want to use for the datafile and logfiles. question2, do you think the CD or diskette will have just two or more files containing the db with .mdf and .ldf for the data and log respectively and if so, can I just copy it/them to the necessary file path/directory without any conversion?
If all is ok and correct up to now, I plan on then running the following to restore the database.
exec sp_attach_db ‘db_name’
filename1=’F:\mssql7\……….data.mdf’,
filename2=’F:\mssql7\……….data.ndf’,
filename3=’F:\mssql7\……….log.ldf’,
filename4=’F:\mssql7\……….log.2ldf’
GO
question3, Will this do the job? Please note also that the filenames are the files from the vendor, assuming what I get back from them are just files.
question4, if all’s correct, do I have to worry about any connectivity issues,like the client accessing the database?
question5, if I am not correct, or this is not the logical/accepted/expected way to restore the database,db, can you give me a detailed step by step synatax included on how to tackle this job.