Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Create Database default path.....

rlcrlc Member Posts: 448
I am trying to make a .SQL file to include in deplyments that can
create a database without use of an expressed path, since it is likely
to be different. I read the .SQL using osql from a install script. Is
there a way to ommit the path, or ask SQL to use its default? It seems
like there has to be a better way then editing the file during install
to change the path.

ex:
[code]
CREATE DATABASE [MyDB]
ON (NAME = N'MyDB_dat', FILENAME = N'(use default here?)' , SIZE = 62, FILEGROWTH = 10%)
LOG ON (NAME = N'MyDB_log', FILENAME = N'(Use default again?)' , SIZE = 146, FILEGROWTH = 10%)
[/code]

I don't really know much about SQL script. Most of what I have is just generated.

Thanks,

~rlc

Comments

  • HackmanCHackmanC Member Posts: 441
    You should make at least a visual basic script (.vbs), there is an excelent explanation in the "Fitch and Mather" MSDN Enterprise Samples about the deployment of a SQL Database, BUT, there was pretty good in the 98 Edition, now in .NET, is in phase 7, and is a little more cryptic.

    ----
    : I am trying to make a .SQL file to include in deplyments that can
    : create a database without use of an expressed path, since it is likely
    : to be different. I read the .SQL using osql from a install script. Is
    : there a way to ommit the path, or ask SQL to use its default? It seems
    : like there has to be a better way then editing the file during install
    : to change the path.
    :
    : ex:
    : [code]
    : CREATE DATABASE [MyDB]
    : ON (NAME = N'MyDB_dat', FILENAME = N'(use default here?)' , SIZE = 62, FILEGROWTH = 10%)
    : LOG ON (NAME = N'MyDB_log', FILENAME = N'(Use default again?)' , SIZE = 146, FILEGROWTH = 10%)
    : [/code]
    :
    : I don't really know much about SQL script. Most of what I have is just generated.
    :
    : Thanks,
    :
    : ~rlc
    :

    [red]Good luck![/red]
    [blue]Hackman[/blue]

Sign In or Register to comment.