Sameer
Sameer

Reputation: 548

Two instance of SQL Server with same name?

Can we have two DB instance on same server with same Database name in SQL server?

Upvotes: 1

Views: 3310

Answers (3)

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

  • Installation of the new database

Upvotes: 0

Mathieu
Mathieu

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:

  • ServerName\InstanceA
  • ServerName\InstanceB

Both InstanceA and InstanceB could each contain a database with name say "MyDatabase"

Upvotes: 2

pankeel
pankeel

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

Related Questions