Basic commands
Sqlplus/as sysdba--Command line open Oracle (logged in as DBA)
Drop User myusers cascade;--delete users (Cascade)
Create user myusers identified by 123;--creating users (user name: Myusers. Password: 123)
Grant Connect,resource to myusers;--authorization
Grant DBA to myusers;--Grant DBA authority
Connect myusers/zyt;--to the user you just created
------------------------------------------------------
Oracle Import DMP File command
1. First go to cmd command window
2. Execute command: IMP userid= username/password @orcl file=d:\nc60.dmp full=y
Explain
User name: Is your target user.
Password: Is your target user login password.
ORCL: Is the instance name is the database name.
File: Is the full path of the DMP file you are importing.
Full=y whether all imports are available only when the current user is a DBA.
--------------------------------------------------------
Oracle Import DMP File command
Exp System/[email protected] file=d:/daochu.dmp owner= (system,sys)--Export the system user in the database with the table of the SYS user
--------------------------------------------------------
Create a sequence
CREATE SEQUENCE hibernate_sequence MINVALUE 1 MAXVALUE 999999999999999999999999
Add foreign key
ALTER TABLE EMP_JOBMSG
Add constraint fk_emp foreign key (dep_id)
References Department (dep_id) on delete set null;