rana/ora

ORA-02180: invalid option for CREATE TABLESPACE

michelvocks opened this issue · 2 comments

Hello,

I currently try to create a tablespace via rana/ora but stocking with the error ORA-02180 (invalid option for CREATE TABLESPACE).

I use the following code to generate and execute the query:

query := "CREATE TABLESPACE \"" + schemaName + "\" DATAFILE SIZE 10M AUTOEXTEND ON;"
log.Printf("Query: %s", query)
stmt, err := db.Prepare(query)
_, err = stmt.Exec()

The output is the following:

2017/11/22 15:12:46 Query: CREATE TABLESPACE "test123" DATAFILE SIZE 10M AUTOEXTEND ON;
2017/11/22 15:12:46 Error creating tablespace during create user: Stmt.exeC Env.ociError ORA-02180: invalid option for CREATE TABLESPACE

I also just copied the debug output from query into SQLDeveloper. Works without any problems. What do I do wrong?

Are you sure the ';' is required at the end?

Oh wow. Thanks a lot. Solved.