Is it possible that on the client's machine I install my MSDE instance in the default location (C:\Program Files\Microsoft SQL Server), i.e. do not specify any datadir or Targetdir location in the setup BUT still create my app's database (during installat
ion) in my app's folder, for e.g. in C:\Program Files\MyCompany\Data\ folder and then attach this database's .mdf file to my instance which I installed. Is it necessary that the database has to be in the data folder under the MSDE install location...
Please suggest.
I am asking because I want to have nothing but database in the my app's data folder.
>> still create my app's database (during installation) in my app's folder
Yes. This is possible. It is NOT mandated that the specific databases that
you create should also fall inside the default location. In event that you
create database without any specific paths then they are created in the
default location.
HTH,
Vinod Kumar
MCSE, DBA, MCAD, MCSD
http://www.extremeexperts.com
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
"qa" <anonymous@.discussions.microsoft.com> wrote in message
news:CC9D5500-4C13-45B6-9040-F4A908DAEB26@.microsoft.com...
> Is it possible that on the client's machine I install my MSDE instance in
the default location (C:\Program Files\Microsoft SQL Server), i.e. do not
specify any datadir or Targetdir location in the setup BUT still create my
app's database (during installation) in my app's folder, for e.g. in
C:\Program Files\MyCompany\Data\ folder and then attach this database's .mdf
file to my instance which I installed. Is it necessary that the database
has to be in the data folder under the MSDE install location...
> Please suggest.
> I am asking because I want to have nothing but database in the my app's
data folder.
|||Thanks Vinod for your reply. How can I specify path for the database (not the entire data folder) as C:\Program Files\MyCompany\Data\ while creating the database using scripts during the installation program. And is keeping the database away in myapp's
folder a recommended way of working..
qa
|||You have to specify the path to the database and log files in the CREATE
DATABASE statement of the script file. Example for a database called "HAS":
CREATE DATABASE [HAS] ON (NAME = N'HAS_Data', FILENAME = N'f:\Microsoft SQL
Server\MSSQL\data\HAS_Data.MDF' , SIZE = 2, FILEGROWTH = 10%) LOG ON (NAME =
N'HAS_Log', FILENAME = N'f:\Microsoft SQL Server\MSSQL\data\HAS_Log.LDF' ,
SIZE = 1, FILEGROWTH = 10%)
COLLATE Latin1_General_CI_AS
GO
Willem
"qa" <anonymous@.discussions.microsoft.com> schreef in bericht
news:A7253E41-0E31-4D5C-967F-E7483AE75304@.microsoft.com...
> Thanks Vinod for your reply. How can I specify path for the database (not
the entire data folder) as C:\Program Files\MyCompany\Data\ while creating
the database using scripts during the installation program. And is keeping
the database away in myapp's folder a recommended way of working..
> qa
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment