11g create tablespace and user (case insensitive) with import everywhere command

--User name is not case sensitive
--drop user tablespace
drop user & username cascade;
drop tablespace & permanent tablespace name including contents and datafiles;
drop tablespace & temporary tablespace name including contents and datafiles;

--Create user tablespace
CREATE SMALLFILE TABLESPACE &permanent tablespace name DATAFILE '&tablespace file storage path\&permanent tablespace name.DBF' SIZE 300M AUTOEXTEND ON NEXT 10M MAXSIZE UNLIMITED LOGGING EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO ;
CREATE SMALLFILE TEMPORARY TABLESPACE &temporary tablespace name TEMPFILE '&tablespace file storage path\&temporary tablespace name.DBF' SIZE 30M AUTOEXTEND ON NEXT 10M MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1M;
CREATE USER &user name PROFILE "DEFAULT" IDENTIFIED BY "&password" DEFAULT TABLESPACE &permanent tablespace name TEMPORARY TABLESPACE &temporary tablespace nameACCOUNT UNLOCK ;
GRANT "CONNECT" TO &username;
GRANT "DBA" TO &username;
GRANT create any table TO &username;
GRANT alter any table TO &username;
GRANT create any view TO &username;
GRANT drop any table TO & username;
-- empty table allocation space
alter system set deferred_segment_creation=false; --change
password to indefinite (default 180 days expiration)
ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED;

 

 

How to import database

cmd command line mode:
export exp wpms/wpms@wpms file=d:\wpms.dmp log=d:\wpms.log statistics=none
import imp wpms/wpms@wpms file=d:\wpms.dmp log=d: \wpms.log ignore=y full=y

Export :

wpms/wpms@wpms
userid/password@servername
The servername is found under product/11.20/dbhome_1/network/admin/tnsnames.ora in the oracle installation file.
There are address, port and service_name
file=** is to export to a local file log=** is to save the log to a local file
statistics=none means not copying statistics for an example of remote export
exp username/password@remote IP :port/instance

Here **port/instance** are together, not the meaning of or

file=stored location:\filename.dmp full=y.

import

imp wpms/wpms@wpms username/password@servername The servername is found under product/11.20/dbhome_1/network/admin/tnsnames.ora in the oracle installation file.
file=** is to export to a local file log=** is to save the log to a local file
ignore=y ignore the existence of the table

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325117311&siteId=291194637