SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2005 Forums
 Express Edition and Compact Edition (2005)
 2 instances with same database name but diff data
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

wpflum
Starting Member

USA
4 Posts

Posted - 08/12/2013 :  12:06:36  Show Profile  Reply with Quote
I'm trying to get two separate physical 2005 sql express servers onto one virtual server. What I currently have is a couple of physical PCs running two separate databases that are structurally identical, one for each of our stores. We are moving to a terminal server so now I can have both servers at the same site so I'd like to run 2 instances of sql express and put the individual server data on each instance but the same virtual server. The problem I'm running into is that when I do a backup task and restore to the first instance it works fine but when I do it to the second instance I get errors about an existing database. When I overwrite I wind up with the second database seemly on both instances. I tried changing the install directory the two completely different locations instead of just msql.1 and msql.2 like it defaults to but now I can't even restore the first instance as it tells me it can't find the file. Am I doing something wrong in taking the default settings for the backup from the original databases or am I doing something wrong when I try and import them? I can do separate virtual servers but I'd really like to go to one server for easier maintenance.

Ideas??

James K
Flowing Fount of Yak Knowledge

3585 Posts

Posted - 08/12/2013 :  12:18:48  Show Profile  Reply with Quote
When you install SQL Express, by default, it gets an "instance name" of SQLExpress. If you want to INSTALL another instance of SQL Express, you will have to go through the custom install and give it a different instance name. I don't know of a way by which you can simply restore or copy files from an existing instance named SQLExpress to accomplish this.

After you install the second instance with a new name, all connection strings and other references to that database server will need to be modified to point to the new instance name.
Go to Top of Page

wpflum
Starting Member

USA
4 Posts

Posted - 08/12/2013 :  12:32:48  Show Profile  Reply with Quote
quote:
Originally posted by James K

When you install SQL Express, by default, it gets an "instance name" of SQLExpress. If you want to INSTALL another instance of SQL Express, you will have to go through the custom install and give it a different instance name. I don't know of a way by which you can simply restore or copy files from an existing instance named SQLExpress to accomplish this.

After you install the second instance with a new name, all connection strings and other references to that database server will need to be modified to point to the new instance name.



That is what I did. I reran the install and gave it a new name so I have two instances, one GVSQLEXPRESS and PTSQLEXPRESS both have separate install directories. Originally I left the default install location in place so I got an msql.1 and msql.2 under the sql server path and that is the way I was getting the duplicate error. The second time I changed the initial folder, Microsoft SQL Server, to GV Microsoft SQL Server and PT Microsoft SQL Server and was getting the error that it could find the backup file even though I manually selected it. I know I have to modify the connect strings on the client PC's to point the the new instances but right now I can't get the sql server to have identically named databases with differrent data in them.

Am I doing something wrong with the backup task?
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000