Package org.rhq.core.db.setup

Examples of org.rhq.core.db.setup.DBSetup.uninstall()


            results.next();
            assert "abc-myvarchar2".equals(results.getString("MYVARCHAR2"));
            results.close();
        } finally {
            try {
                dbsetup.uninstall("small-dbsetup.xml");
            } catch (Exception e) {
                System.err.println("Cannot uninstall the test schema");
            }
        }
View Full Code Here


        try {
            conn = getConnection(db);
            dbtype = DatabaseTypeFactory.getDatabaseType(conn);
            assert dbtype.checkTableExists(conn, "TEST_SMALL");
        } finally {
            dbsetup.uninstall("small-dbsetup.xml");
        }

        // make sure the uninstall worked
        try {
            boolean result = dbtype.checkTableExists(conn, "TEST_SMALL");
View Full Code Here

            results.next();
            assert "abc-myvarchar2".equals(results.getString("MYVARCHAR2"));
            results.close();
        } finally {
            try {
                dbsetup.uninstall("small-dbsetup.xml");
            } catch (Exception e) {
                System.err.println("Cannot uninstall the test schema");
            }
        }
View Full Code Here

        try {
            conn = getConnection(db);
            dbtype = DatabaseTypeFactory.getDatabaseType(conn);
            assert dbtype.checkTableExists(conn, "TEST_SMALL");
        } finally {
            dbsetup.uninstall("small-dbsetup.xml");
        }

        // make sure the uninstall worked
        try {
            boolean result = dbtype.checkTableExists(conn, "TEST_SMALL");
View Full Code Here

            String dbsetupSchemaXmlFile = extractDatabaseXmlFile("db-schema-combined.xml", props, serverDetails, logDir);
            String dbsetupDataXmlFile = extractDatabaseXmlFile("db-data-combined.xml", props, serverDetails, logDir);

            // first uninstall any old existing schema, then create the tables then insert the data
            DBSetup dbsetup = new DBSetup(dbUrl, userName, password);
            dbsetup.uninstall(dbsetupSchemaXmlFile);
            dbsetup.setup(dbsetupSchemaXmlFile);
            dbsetup.setup(dbsetupDataXmlFile, null, true, false);
        } catch (Exception e) {
            LOG.fatal("Cannot install the database schema - the server will not run properly.", e);
            throw e;
View Full Code Here

        try {
            DBSetup dbs = new DBSetup(jdbcUrl, jdbcUser, jdbcPassword);

            if (uninstall) {
                dbs.uninstall(xmlFile.getAbsolutePath());
            } else if (exportXml) {
                dbs.export(xmlFile.getAbsolutePath());
            } else if (table == null) {
                dbs.setup(xmlFile.getAbsolutePath());
            } else {
View Full Code Here

        File currentSchema = getFileFromDbUtils("db-schema-combined.xml");
       
        try {
            replaceTokensInFile(minimalSchema);
            replaceTokensInFile(currentSchema);
            dbSetup.uninstall(currentSchema.getAbsolutePath());
            dbSetup.setup(minimalSchema.getAbsolutePath());
        } finally {
            minimalSchema.delete();
            currentSchema.delete();
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.