Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2014-11-21
5
Medium Priority
?
194 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 52

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 52

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 52

Accepted Solution

by:
Vitor Montalvão earned 2000 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

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

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

Introduction This article will provide a solution for an error that might occur installing a new SQL 2005 64-bit cluster. This article will assume that you are fully prepared to complete the installation and describes the error as it occurred durin…
In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

670 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