O
O
one__for__one2018-12-27 10:20:59
Database administration
one__for__one, 2018-12-27 10:20:59

Why do you need a logical database name in MS SQL Server?

Hello.
Why is the logical name of the MS SQL Server database needed?
There is a database name that we refer to in the query: select * FROM myDB.dbo.myTable,
but the "myDB" database has a completely different logical name.
Can I change the logical names of the combat database to "hot"?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Konstantin Tsvetkov, 2018-12-27
@one__for__one

There are no logical names, only .select name from sys.databases

In the recovery script, you need to prescribe the logical name of the database, which is stored in the file.
sys.database_files .
I transfer the database to offline mode and execute the script for renaming.
Moving user databases .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question