Reputation: 548
Can we have two DB instance on same server with same Database name in SQL server?
Upvotes: 1
Views: 3310
Reputation: 1
Yes, different instances can have the same database name Say instanceA have DatabaseA with its datafile at location(D:DataFiles) instanceB can have DatabaseA with its datafile pointed to another location(E:DataFiles)
If the above process is not followed it will be a mess
Thanks
Upvotes: 0
Reputation: 661
If you mean two SQL Server "named instances" with each one containing a same "database" name, then yes.
On one server you could have two named instances:
Both InstanceA and InstanceB could each contain a database with name say "MyDatabase"
Upvotes: 2
Reputation: 1148
No. You have to create same server with same Database name in SQL server because SQL Server creates mdf or ldf file with physical location.
Upvotes: 0