0
votes

I'm trying to create a table (based off of a .csv file I've been working with) within SQL, but I'm getting the following message:

SQL Error: ORA-01031: insufficient privileges
01031. 00000 - "insufficient privileges"
*Cause: An attempt was made to perform a database operation without the necessary privileges.

What do I need to change to create the table?

Here is the my code to create the table--then I have a bunch of INSERT INTO lines.

CREATE TABLE Water_Birth_Consent
(
   NAME        VARCHAR(24) NOT NULL
  ,MRN         INTEGER  NOT NULL
  ,DATE_SIGNED VARCHAR(10) NOT NULL
  ,EDD         VARCHAR(10) NOT NULL
  ,DEL         DATE 
  ,WB          VARCHAR(5)
  ,study_id    VARCHAR(17)
  ,comments    VARCHAR(42)
  ,EMPI        INTEGER 
);
1
Request sufficient CREATE and INSERT rights from your DBA.Siyual
It isn't something you can do as the user that is running the create statement - if you could grant yourself privileges it would make them a bit pointless. A privileged user (i.e. a DBA) needs to set your user up properly.Alex Poole
That may include other privileges - create index, create view, or whatever other objects you need to create/alter - and they may also need to grant you a space quota on your tablespace(s).Alex Poole

1 Answers

1
votes

Another user with sufficient privileges (DBA) needs to grant your user the create table privilege. This is the command they would run:

grant create table to <your-user>;

Once you are able to create the table, you won't need any additional special permissions to insert data into the table.