Problems creating an MSSQL database when using filespec
Posted: Mon Aug 18, 2008 5:12 pm
Hi all,
I am evaluating Studio version and have a most of my install working. The big problem I have now is creating a database. I have incorporated the SQL sample project and its instance detection successfully. It validates that I am connecting to the database. When I use the exact same setup for the MS SQL Server plug-in and add a simple database creation script, it says it is successful but never creates the database. I am outputing in a Messagebox the return variable as well as all the other variables involved in the create script. They all have the right values.
If I just use "GO" and check the "Create database if absent" box then it creates the database. If I don't check the "Create database if absent" box and do nothing more than:
It works. Is there a bug? Is there a different way to accomplish this? We have an enterprise app that will require the flexibility to define a different location for SQL dB data files. IT groups frequently have non-default locations for these files.
I'm stuck. Any ideas? Any help?
I am evaluating Studio version and have a most of my install working. The big problem I have now is creating a database. I have incorporated the SQL sample project and its instance detection successfully. It validates that I am connecting to the database. When I use the exact same setup for the MS SQL Server plug-in and add a simple database creation script, it says it is successful but never creates the database. I am outputing in a Messagebox the return variable as well as all the other variables involved in the create script. They all have the right values.
Code: Select all
create database [$SQLDBNAME$] on primary
(name = N'$SQLDBNAME$_Data, filename = N'$SQLDATAFOLDER$\\$SQLDBNAME$_Data.MDF', size = 5MB, maxsize = unlimited, filegrowth = 10%),
filegroup [INDEX]
(name = N'$SQLDBNAME$_Index', filename = N'$SQLDATAFOLDER$\\$SQLDBNAME$_Index_Data.NDF', size = 5MB, maxsize = unlimited, filegrowth = 10%)
log on
(name = N'$SQLDBNAME$_Log', filename = N'$SQLDATAFOLDER$\\$SQLDBNAME$_Log.LDF, size = 5MB, maxsize = 1GB, filegrowth = 10%)
collate SQL_Latin1_General_CP1_CI_AS
go
If I just use "GO" and check the "Create database if absent" box then it creates the database. If I don't check the "Create database if absent" box and do nothing more than:
Code: Select all
create database [$SQLDBNAME$]
It works. Is there a bug? Is there a different way to accomplish this? We have an enterprise app that will require the flexibility to define a different location for SQL dB data files. IT groups frequently have non-default locations for these files.
I'm stuck. Any ideas? Any help?