Create tablespace in oracle

Can you include more of the changelog? From the error message, it appears you just don’t have properly formed xml. 

Steve Donie
Principal Software Engineer
Datical, Inc. http://www.datical.com/

You cannot have tags inside a changeset - these need to be ‘up’ a level, so they are outside any changeset. 

Steve Donie
Principal Software Engineer
Datical, Inc. http://www.datical.com/

In order to diagnose this, you would need to look at the DATABASECHANGELOG table to see if the changeset was actually deployed or not - it may be that the preconditions prevented it from running. You could also run the command with --logLevel=debug and see what the log files show is happening. 

Steve Donie
Principal Software Engineer
Datical, Inc. http://www.datical.com/

How to create a tablespace in oracle using the existing path in Linux.

Tried to create as below but received error as mentioned below.

Let me know how to use the parameter property to create a tablespace

CREATE TABLESPACE liquibase_DATA DATAFILE ‘/u01/app/oracle/oradata/"${dbname1}"/schema_liquibase.dbf’ size 1g autoextend on ;

Error Details:-

 cvc-complex-type.2.4.a: Invalid content was found starting with element ‘property’. 

Thank you Steve for the response. my file is as below

<?xml version="1.0" encoding="UTF-8"?>

<databaseChangeLog

xmlns=“http://www.liquibase.org/xml/ns/dbchangelog”

xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance”

xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog

http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.1.xsd">

select count(*) from v$database where name like ‘%ATG%’

select count(*) from dba_tablespaces  where tablespace_name like  ‘%schema1_DATA’

select count(*) from dba_tablespaces  where tablespace_name like  ‘%schema2_DATA’

create tablespace schema1_data datafile ‘/u01/app/oracle/oradata/"${dbname1}"/schema1_liquibase.dbf’ size 1G ;

CREATE TABLESPACE schema2_DATA DATAFILE ‘/u01/app/oracle/oradata/"${dbname1}"/schema2_liquibase.dbf’ size 1g;

create tablespace schema1_data datafile ‘/u01/app/oracle/oradata/"${dbname2}"/schema1_liquibase1.dbf’ size 1G ;

CREATE TABLESPACE schema2_DATA DATAFILE ‘/u01/app/oracle/oradata/"${dbname2}"/schema2_liquibase.dbf’ size 1g;

Thank you Steve for the syntax correction.

I have updated the xml file and executed the same. The liquibase was successful but the tablespace was not created.

$  liquibase --changeLogFile=/exports/atgtest/aeoadmin_scripts/update_atgncat.xml --defaultsFile=/exports/atgtest/liquibase-atgtest.properties upda

Liquibase Update Successful

The code is a below

select count(*) from v$database where name like ‘%SIT%’

select count(*) from dba_tablespaces  where tablespace_name like  ‘%ATGCORE_DATA’

create tablespace atgcore_liquibase datafile ‘/u01/app/oracle/oradata/"${dbname1}"/atgcore_liquibase1.dbf’ size 1G ;

Thank you Steve .

The ${dbname1}.