|
|
|
|
||||||
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
I’m sorry if this question’s been asked before, but I couldn’t find anything
online. I’m working on an Installshield installation that needs to create an instance of a database on a Vista 64-bit PC using SQL Express 2005, then later use that instance to restore a database bak file. The part of creating the instance seems to be working fine, but in the next steps I need to locate the exact path of the instance so that I can restore the bak file to it. For example the path in this case is: C:\Program Files (x86)\Microsoft SQL Server\DatabaseInstance\MSSQL.5\MSSQL Is there a command that returns the path? I’ve tried the registry, but that only works on 32 bit PC’s and this PC already has SQL Server 2005 64-bit installed. Thanks, Burcu |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
It seems that this database is going to be empty as it seems it's a database
for an application. As an alternative, why don't you script your database and run this script when your application runs for the first time? -- Ekrem Önsoy "Burcu_K" <u45895@uwe> wrote in message news:8987af3ac5ebe@uwe... > I’m sorry if this question’s been asked before, but I couldn’t find > anything > online. > > I’m working on an Installshield installation that needs to create an > instance > of a database on a Vista 64-bit PC using SQL Express 2005, then later use > that instance to restore a database bak file. > > The part of creating the instance seems to be working fine, but in the > next > steps I need to locate the exact path of the instance so that I can > restore > the bak file to it. > > For example the path in this case is: > > C:\Program Files (x86)\Microsoft SQL Server\DatabaseInstance\MSSQL.5\MSSQL > > Is there a command that returns the path? I’ve tried the registry, but > that > only works on 32 bit PC’s and this PC already has SQL Server 2005 64-bit > installed. > > Thanks, > Burcu > |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
> Is there a command that returns the path? I’ve tried the registry, but
> that > only works on 32 bit PC’s and this PC already has SQL Server 2005 64-bit > installed. I've also checked the registry records for x64 and reg records are kept at the same keys and values as they are in x86? You can find the installed instances under this reg path: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\SQL After determining this, you can check with the following reg key ("SQLPath" value) to find out the installed path: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL.1\Setup -- Ekrem Önsoy "Burcu_K" <u45895@uwe> wrote in message news:8987af3ac5ebe@uwe... > I’m sorry if this question’s been asked before, but I couldn’t find > anything > online. > > I’m working on an Installshield installation that needs to create an > instance > of a database on a Vista 64-bit PC using SQL Express 2005, then later use > that instance to restore a database bak file. > > The part of creating the instance seems to be working fine, but in the > next > steps I need to locate the exact path of the instance so that I can > restore > the bak file to it. > > For example the path in this case is: > > C:\Program Files (x86)\Microsoft SQL Server\DatabaseInstance\MSSQL.5\MSSQL > > Is there a command that returns the path? I’ve tried the registry, but > that > only works on 32 bit PC’s and this PC already has SQL Server 2005 64-bit > installed. > > Thanks, > Burcu > |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
Hi and thanks for the quick response!
I’ve worked out a way around this issue. Previously during the installation step of SQL Express, it would create the instance under C:\Microsoft SQL Server, which caused problems only 64 bit PC's as I couldn't find any reference to the instance in the registry. Now I’ve forced the installation to create the instance under %ProgramFiles% from the command line, which seems to be updating the registry (just need to test it on a few other OS's). Then like you said I was able to use the Registry to obtain the path of the instance. So now it works. Thanks for your ![]() -- Message posted via http://www.sqlmonster.com |
|
![]() |
| Outils de la discussion | |
|
|