How to recover a SQL Server database

Source: Internet
Author: User
Author:Snowhite2000 Time:01-10-24

Chao_ping

Your message box is full again.

You really caught me. I did it yesterday:

Use master database:

1. Use:

Exec sp_db_detach 'database name', 'true'

2. Copy datafiles and log file to Dist. Drive

3. Use

Exec sp_attach_db @ dbname = n' database name ',
@ Filename1 = n' New Path. MDF ',
@ Filename2 = n' New Path. ldf'

Send me a message, if you have problems.

Author:Chao_ping Time:01-10-24

And if I have reinstalled the SQL server,
And the new installed master database does not contain the information about my another database, and I only have the old datafiles and logfiles,
How to add this database into the sqlserver?

Your method just moves datafile allocation, and what I want to do is:
After a clean installation, let the new sqlserver mount the old databasees.

Just like in Oracle, I removes Oracle software, reinstall it,
And use Oracle to mount the old database.
Thanks.

Author:Snowhite2000 Time:01-10-24

Use step 3 only, use master databasde.

Author:Chao_ping Time:01-10-24

Seems Faily easy,
Made it.
Thanks so much.
In fact such easy a job, I donot know it, faint.
Thanks again.

Author:Chao_ping Time:01-10-24

I really go to sleep now, bye!
Now :09 am now,

Author:Snowhite2000 Time:01-10-24

Have a nice dream!

Author:Chao_ping Time:01-10-24

Thanks

Author:Yanwang Time:01-10-24

Chao_ping,

I saw a message from you that asked me to check mailbox. I tried, but I can not login to it. maybe I typed wrong username and password. sorry about it. I guess it's about SQL Server, it looks that you solved the problem.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.