oracle數(shù)據(jù)庫刪除和導(dǎo)入方法

字號:


    1、開始—》運行—》cmd,然后輸入sqlplus / as sysdba;連上數(shù)據(jù)庫;
    2、刪除用戶:在dos窗口輸入drop user eqm cascade;
    3、刪除tablespace:在dos窗口輸入drop tablespace eqm including contents and datafiles;如果報錯說有表還在使用此表空間,查出那些表然后刪除,查詢方法select distinct owner,segment_name, segment_type from dba_extents where tablespace_name='eqm';
    4、新建表空間:
    create tablespace eqm logging
    datafile 'd:oracleproduct10.2.0oradataeqm.dbf'
    size 4096m
    autoextend on
    next 150m maxsize 20480m
    extent management local;
    5、新建用戶
    create user eqm identified by eqm default tablespace eqm;
    6、給用戶授予權(quán)限
    grant dba to eqm;