I am trying to create a table in SQLFiddle using Oracle and I want to specify the schema the table belongs to.
However I am having a tough time making the schema. Since given the code below:
CREATE USER myname
IDENTIFIED BY pwd4myname
DEFAULT TABLESPACE tbs_perm_01
TEMPORARY TABLESPACE tbs_temp_01
QUOTA 20M on tbs_perm_01;
GRANT create session TO myname;
GRANT create table TO myname;
GRANT create view TO myname;
GRANT create any trigger TO myname;
GRANT create any procedure TO myname;
GRANT create sequence TO myname;
GRANT create synonym TO myname;
CREATE TABLE myname_schema.person (
person_id NUMBER(5) PRIMARY KEY,
name VARCHAR2(15) NOT NULL,
phone NUMBER(9),
address VARCHAR2(10),
);
When running this I am getting:
ORA-01031: insufficient privileges
This is sandboxed environment with limited privileges. You can't create your own user.
SELECT * FROM USER_SYS_PRIVS;
Log in as SYSDBA, and issue the command,
GRANT CONNECT, RESOURCE TO YOUR_USER_NAME;
Logoff from the SYSDBA, and again log in with your user name, now try to create table.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.