Modify the statement of the SQL Server database logical file name

xiaoxiao2021-03-05  21

1. Open the SQL query analyzer (T-SQL)

2, enter the query statement:

ALTER DATABASE Database Name Modify File (Name = Original Logic File Name, NewName = New Logic File Name) ALTER Database Database Name Modify File (Name = Original Logic File Name, NewName = New Logic File Name)

3, point green triangle execution, will be completed;

Example: Suppose your database name is MY_DB logical file name is MY_DB_DATA, my_db_log To modify the new logical file name

DB_DATA, DB_LOG; syntax is as follows:

Alter Database my_db modify file (name = my_db_data, newname = db_data) ALTER DATABASE my_db modify file (name = my_db_log, newname = db_log)

Execute, then see if the property has been modified;

转载请注明原文地址:https://www.9cbs.com/read-36475.html

New Post(0)