You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@empire-db.apache.org by "Rainer Döbele (JIRA)" <em...@incubator.apache.org> on 2013/02/04 15:14:19 UTC

[jira] [Closed] (EMPIREDB-104) Create DDL Script on MSSQL should state not CREATE DATABASE if already exist

     [ https://issues.apache.org/jira/browse/EMPIREDB-104?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rainer Döbele closed EMPIREDB-104.
----------------------------------


Cleanup of unclosed issues.
                
> Create DDL Script on MSSQL should state not CREATE DATABASE if already exist
> ----------------------------------------------------------------------------
>
>                 Key: EMPIREDB-104
>                 URL: https://issues.apache.org/jira/browse/EMPIREDB-104
>             Project: Empire-DB
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: empire-db-2.1.0-incubating
>            Reporter: Ghislain Geffroy
>            Assignee: Francis De Brabandere
>             Fix For: empire-db-2.2.0-incubating
>
>
> Same type of error than EMPIREDB-101.
> A way to solve the problem is to replace in org.apache.empire.db.sqlserver.DBDatabaseDriverMSSQL$createDatabase() the line
>  script.addStmt("CREATE DATABASE " + databaseName);
> by 
>  script.addStmt("IF NOT EXISTS(SELECT * FROM sys.databases WHERE name = '" + databaseName + "')  CREATE DATABASE " + databaseName);

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira