Sunday, February 19, 2012

Creating "installation" script

Hi all,

I′m newbie with SQL Server.

I need to create a installation script SQL
(creating tables, indexes, permissions, databases).
This script calls other scripts.
In Oracle I use @.script_name.sql, but in SQL Server
I don′t know to do this.

Other question: Is there a way to call the Query Analyzer
in .BAT file, where the .BAT file calls installation scripts SQL.

Thank U very much,

[]′s
Yes sure you can do this, you have to call the equivalent to sqlplus.exe for SQL Server, its OSQL.EXE. The -o Option takes an input file with the statements that you want to execute. Other options are described in detail -S for the server -U for the User -P for the password and so on.

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de

|||Thank u very much!!!!

[]′s

No comments:

Post a Comment