Database backup and restoration Problems

Source: Internet
Author: User
Recently, during database backup and restoration scripts, we found that the logical names of the files backed up completely are different for some databases due to _. Further searching and finding out, in fact, if the logical name is not specified during database creation, the system will generate a random logical name, which is inconvenient for batch script and database management.

Recently, during database backup and restoration scripts, we found that the logical names of the files backed up completely are different for some databases due to '_'. Further, we found that, in fact, if the logical name is not specified during database creation, the system will generate a random logical name, which is inconvenient for batch script and database management.

Recently, during database backup and restoration scripts, we found that the logical names of the files backed up completely are different for some databases due to '_'. Further, we found that, in fact, if the logical name is not specified during database creation, the system will generate a random logical name, which is inconvenient for batch script and database management. Therefore, starting from create database, use "[]" to enclose the name and write the logic name, because you do not know when you will use it, or when others will use it.

Now I want to write a little bit about my own ideas. I would just traverse non-system databases, back up the database, and restore it based on the backup. Due to the logic name issue, the problem occurs when the database file is migrated. The restore filelistonly check found a random name, so it is tangled ...... Modify file (name = old, newname = new) is related to the query information, but the premise of this item is to know the old, and the old one is shown in the restore filelistonly, then I want to get the list options, but this seems impossible ...... Because the displayed list can only be shown to us and cannot be operated ............ Tangle ...... Finally, I thought about it. If the Creator does not specify the logic name, modify the file with "_" every time, on the premise that the backup is performed first --, fuck .................. I want to find a method to process the logic name obtained from the database and then modify it ~.~

Let's get to an end ......

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.