PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Hébergement serveur > ms.sqlserver.server > SQL Server 2005 - obtaining path of a database instance on a Vista 64-bit system
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
SQL Server 2005 - obtaining path of a database instance on a Vista 64-bit system

Réponse
 
LinkBack Outils de la discussion
Vieux 01/09/2008, 09h02   #1
Burcu_K
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut SQL Server 2005 - obtaining path of a database instance on a Vista 64-bit system

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

  Réponse avec citation
Vieux 01/09/2008, 13h12   #2
Ekrem Önsoy
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: SQL Server 2005 - obtaining path of a database instance on a Vista 64-bit system

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
>


  Réponse avec citation
Vieux 01/09/2008, 23h08   #3
Ekrem Önsoy
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: SQL Server 2005 - obtaining path of a database instance on a Vista 64-bit system

> 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
>


  Réponse avec citation
Vieux 03/09/2008, 08h04   #4
Burcu_K via SQLMonster.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: SQL Server 2005 - obtaining path of a database instance on a Vista 64-bit system

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

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 07h38.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,10079 seconds with 12 queries