Skip to content

Instantly share code, notes, and snippets.

@julbrs
Created August 30, 2018 17:23
Show Gist options
  • Save julbrs/0e3559c3b84211f5a51a1b44bad0955b to your computer and use it in GitHub Desktop.
Save julbrs/0e3559c3b84211f5a51a1b44bad0955b to your computer and use it in GitHub Desktop.
Create user on Oracle DB
Here is some SQL query to create an user with default auth:
CREATE USER eyes IDENTIFIED BY eyes DEFAULT TABLESPACE users;
GRANT CONNECT TO eyes;
GRANT RESOURCE TO eyes;
Drop an user:
DROP USER
eyes CASCADE;
Now how to export a DB schema(+data) to a file:
exp eyes/eyes grants=N owner=eyes file=export.dump
And to import back the DB schema from a file
imp userid=eyes/eyes commit=Y file=export.dump fromuser=toto touser=eyes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment