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 ......