How to install a SQL Server database?

Got a problem you cannot solve? Try here.
Post Reply
maurix
Posts: 5
Joined: Fri Aug 24, 2007 11:24 am

How to install a SQL Server database?

Post by maurix »

In order to understant how to install my SQL Server database I started from the example project I found in the IA examples folder. I attached the example configuration as image.

The MSI code looks as follow:
-------------------------------------------------------

Comment: Test the connection
Microsoft SQL Server Script : Connect to database provadb on instance $SERVERNAME$\\$INSTANCENAME$ as user $SQLUSER$ (get result into variable SQLTEST)
if Variable ABORT Equals TRUE
Comment: Exit immediately if cancelled
Terminate Installation
end
-------------------------------------------------------

Some considerations:

1) SQL Server is up and running on the local machine where I want to create the database.
2) Test connection is properly working.
3) I tried either the SQL Server authentication mode or the Window authentication mode.
3) I tried to use (and not to use) GO as first statement in the SQL script.
4) I tried to create the database with a ANSI Sql script but no success.
5) I tried Alternate SQL Server and no success.
6) The database doesn't exists in the server (no .mdf or .ldf files).

Mind that:
If I create the database from the SQL Server Management Studio it works!

So please what's wrong?

Can you provide an example to create a database (and not only a connection)?

Thanks.

File Attached:

example.jpg
Maurix
www.radiotaormina.com
Alex_Ronquillo
Site Admin
Posts: 364
Joined: Mon Jul 30, 2007 11:51 am
Location: USA
Contact:

Post by Alex_Ronquillo »

Maurix,

Try removing the value in the "Instance" field, ($INSTANCENAME$). That should do it.
Alejandro Ronquillo
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
Post Reply