Reputation: 417
I am using Oracle Database 12c.
I am trying to create a tablespace, but whenever I execute the following command, I run into an error:
create tablespace ts_something
datafile 'C:\test.dbf'
size 32m autoextend on;
The error I get is as follows:
ORA-01119: error in creating database file 'C:\test.dbf'
ORA-27040: file create error, unable to create file
OSD-04002: unable to open file
O/S-Error: (OS 5) Access is denied.
What can I do so that I may successfully create this tablespace?
Upvotes: 2
Views: 4298
Reputation: 835
You must have the CREATE TABLESPACE system privilege.
i.e. to create a tablespace, you must have the SYSDBA system privilege.
Before you can create a tablespace, you must create a database to contain it, and the database must be open.
Upvotes: 0
Reputation: 142713
If you (and apparently, you have) already created a database, locate current database files and specify the same directory. Something like this for my XE:
C:\oraclexe\app\oracle\oradata\XE
Upvotes: 3