0

I already search and read some of previous post like:

Restore Database from Database with Different Name

SQL Server Changing logical name

I know how to restore, and how to change logical name.

I have another question.

For example in SMS I use "Restore Database" as source I choose: AdventureWorks2014 as destination I set AdventureWorks2014_test, and press button OK

Currently I have: AdventureWorks2014 and AdventureWorks2014_test, but currently both have the same Logical Name I mean: AdventureWorks2014_Data and AdventureWorks2014_Log

Is the fact that for AdventureWorks2014 and AdventureWorks2014_test logical names are the same, may lead to some problems?

Can anyone give some examples of problems?

1 Answer 1

2

No problems except that it might not look that nice. You can for instance be confused if you do SELECT FROM sys.master_files and see two databases having the same logical names for one or more file. But, in the end, the logical name only have to be unique within the database.

I prefer to tidy up this after a restore using ALTER DATABASE, I want to have things neat. Unless it is a short-lived database, like some test.

2
  • How about sql queries especially with ADO ? Do they needs to simply use AdventureWorks2014 and AdventureWorks2014_test and the Logical names will not affect SQL queries ? Commented Nov 5, 2021 at 11:54
  • 1
    Yes, the database name is relevant, not the logical (or physical) file names. Commented Nov 5, 2021 at 18:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.