/// <summary> /// <para>Creates a new database with the given <paramref name="newDatabaseName"/>.</para> /// /// <para>In the case of Oracle this is a user+schema (See https://stackoverflow.com/questions/880230/difference-between-a-user-and-a-schema-in-oracle) </para> /// </summary> /// <param name="newDatabaseName"></param> /// <returns></returns> public DiscoveredDatabase CreateDatabase(string newDatabaseName) { //the database we will create - it's ok DiscoveredDatabase is IMightNotExist DiscoveredDatabase db = ExpectDatabase(newDatabaseName); Helper.CreateDatabase(Builder, db); if (!db.Exists()) { throw new Exception(string.Format(FAnsiStrings.DiscoveredServer_CreateDatabase_Helper___0___tried_to_create_database___1___but_the_database_didn_t_exist_after_the_creation_attempt, Helper.GetType().Name, newDatabaseName)); } return(db); }
/// <summary> /// <para>Creates a new database with the given <paramref name="newDatabaseName"/>.</para> /// /// <para>In the case of Oracle this is a user+schema (See https://stackoverflow.com/questions/880230/difference-between-a-user-and-a-schema-in-oracle) </para> /// </summary> /// <param name="newDatabaseName"></param> /// <returns></returns> public DiscoveredDatabase CreateDatabase(string newDatabaseName) { //the database we will create - it's ok DiscoveredDatabase is IMightNotExist DiscoveredDatabase db = ExpectDatabase(newDatabaseName); Helper.CreateDatabase(Builder, db); if (!db.Exists()) { throw new Exception("Helper tried to create database " + newDatabaseName + " but the database didn't exist after the creation attempt"); } return(db); }