Database SQL

35 pts.
Tags:
SQL Database
SQL error messages
During the copy paste the old data (*.MDF and *.Ldf) with current data same files. When going to open database showing error like " server: msg 945,level 14,state 2 database 'vimalind'cannot be opened becouse some of the files could not be activated." How can rectify this... Pls tell me ..
ASKED: November 28, 2008  12:04 PM
UPDATED: December 1, 2008  9:54 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.

You can’t “copy and past” new versions of the same data/log files, because sql server store logical information about -for example- the last transactions or blocks in the master database.

Instead of this, you can try to “detach” and then “attach” again the files. Doing this using the sql server management studio tool is quite simple:

to detach the database:
right click on the database you want to detach, “task” – > “detach”

to attach a new database:
right click on the “databases” folder, “attach”, choose the mdf file and the system will propose all the remaining files in the database (you can change the path of the files if you need to)

regards

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following