SQL SERVER 2005 modifies the database name, including the physical file name and logical name

Source: Internet
Author: User
The original database name is AA, the physical file name is called Aa.mdf and aa_log.ldf; you need to modify the database name to BB, the physical file name is called Bb.mdf and Bb_log.ldf; procedure (take the sqlserver2005 operation as an example): Prepare the original database Copy (select Database, right-click Task-to-backup), is divided into Aa.bak; create a new database BB, and then right-click the task, restore database, select Source device, browse, jump out of the Specify Backup dialog box, Click Add to find the Aa.bak that you just backed up; Select the backup set to restore, select the backup set you want to restore, select options on the Restore Database option page, click on Overwrite existing database in Restore options, specify the path after the restore and the name Bb.mdf and bb_ log.ldf; Database list select BB Database, right-click Properties---file, in the Database File Small window, respectively, modify the "logical name" as: BB and bb_log; At this point, the database has been completely renamed.

SQL SERVER 2005 modifies the database name, including the physical file name and logical name

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.