Solved

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

Posted on 2014-11-21
5
162 Views
Last Modified: 2014-11-21
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
Comment
Question by:Daves166
  • 3
5 Comments
 
LVL 46

Expert Comment

by:Vitor Montalvão
ID: 40457396
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
 

Expert Comment

by:mw 162
ID: 40457397
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
 
LVL 46

Expert Comment

by:Vitor Montalvão
ID: 40457411
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
 

Author Comment

by:Daves166
ID: 40457419
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
 
LVL 46

Accepted Solution

by:
Vitor Montalvão earned 500 total points
ID: 40457431
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

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

So every once in a while at work I am asked to export data from one table and insert it into another on a different server.  I hate doing this.  There's so many different tables and data types.  Some column data needs quoted and some doesn't.  What …
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

27 Experts available now in Live!

Get 1:1 Help Now