[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 200
  • Last Modified:

Microsoft Sql Server 2005 - Same DB Name but different file locations

I have a program that uses sql server 2005.  I did not write it, its an app from our vendor.  It was made to run alone on a users PC.  I'd like to deliver the app through Xenapp.  What I'd like to know is: Can you have the same DB name but different filenames?  I'd like to store the files (MDF, LDF) on a shared drive using the %USERNAME% variable.  That way everyone's data would be unique to them.  We cannot share the DB.  
So my thought was we start a single Sqlserver and load the DB's (Same name but different filenames) so that everyone has access their own data.
Or when each user logs in we have multiple Sqlserver instances running.  Not sure what that would do to performance.  We have vSphere 5.1 - Citrix 7.1 - Sqlserver 2005.
0
Daves166
Asked:
Daves166
  • 3
1 Solution
 
Vitor MontalvãoMSSQL Senior EngineerCommented:
No, you can't have databases with same name in the same instance.
But you can have same database name in several instances and the performance just depends on your server (mainly RAM is the more important here, then CPU).
0
 
mw 162SQL Server Consultant DBACommented:
You cannot have the same database name with different file names on the same instance. Is it possible to package a SQL Express instance into the virtual application?
0
 
Vitor MontalvãoMSSQL Senior EngineerCommented:
We cannot share the DB.  
Then why have the database on a server? Just install a SQL Server Express instance locally in each user computer.
0
 
Daves166Author Commented:
IT is not my App so I cannot do the Sql Express mentioned above.  However, I may be able to create multiple instances.  Can you create a named instance programmatically?
0
 
Vitor MontalvãoMSSQL Senior EngineerCommented:
You need to run the SQL Server setup each time you need to create an instance. Means that you always need to install SQL Server.
0

Featured Post

[Webinar] Kill tickets & tabs using PowerShell

Are you tired of cycling through the same browser tabs everyday to close the same repetitive tickets? In this webinar JumpCloud will show how you can leverage RESTful APIs to build your own PowerShell modules to kill tickets & tabs using the PowerShell command Invoke-RestMethod.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now