public static void DemandSchemas(ConnectionInfo connectionInfo, params string[] schemas)
        {
            var driver = TestSqlDriver.Create(connectionInfo);

            using (var connection = driver.CreateConnection()) {
                connection.Open();

                var extractionTask   = new SqlExtractionTask(driver.CoreServerInfo.DatabaseName);
                var extractionResult = driver.Extract(connection, new[] { extractionTask });
                var catalog          = extractionResult.Catalogs.Single();
                var existingSchemas  = catalog.Schemas.Select(s => s.Name);
                var schemasToCreate  = schemas.Except(existingSchemas, StringComparer.OrdinalIgnoreCase);

                // Oracle does not support creating schemas, user should be created instead.
                if (connectionInfo.Provider == WellKnown.Provider.Oracle)
                {
                    CreateUsers(connection, schemasToCreate);
                }
                else
                {
                    CreateSchemas(connection, catalog, schemasToCreate);
                }

                connection.Close();
            }
        }
        private StorageProviderInfo()
        {
            var config       = DomainConfigurationFactory.Create();
            var providerName = config.ConnectionInfo.Provider;

            Provider = ParseProvider(providerName);
            Info     = ProviderInfoBuilder.Build(providerName, TestSqlDriver.Create(config.ConnectionInfo));
        }
        public void MainTest()
        {
            Console.WriteLine("Is64BitProcess: {0}", Environment.Is64BitProcess);
            Console.WriteLine();

            var urlConnectionInfo = DomainConfigurationFactory.Create().ConnectionInfo;

            Console.WriteLine("ConnectionURL: {0}", urlConnectionInfo);
            Console.WriteLine();

            var stringConnectionInfo = DomainConfigurationFactory.CreateForConnectionStringTest().ConnectionInfo;

            Console.WriteLine("ConnectionString: {0}", stringConnectionInfo);
            Console.WriteLine();

            var driver       = TestSqlDriver.Create(urlConnectionInfo);
            var providerInfo = ProviderInfoBuilder.Build(urlConnectionInfo.Provider, driver);

            Console.WriteLine("Features: {0}", providerInfo.ProviderFeatures);
        }