`

oracle常用命令大汇总(三)

阅读更多
第七章:reorganizing data

    1.using expoty

    $exp scott/tiger tables(dept,emp) file=c:\emp.dmp log=exp.log compress=n direct=y

    2.using import

    $imp scott/tiger tables(dept,emp) file=emp.dmp log=imp.log ignore=y

    3.transporting a tablespace

    sql>alter tablespace sales_ts read only;

    $exp sys/.. file=xay.dmp transport_tablespace=y tablespace=sales_ts

    triggers=n constraints=n

    $copy datafile

    $imp sys/.. file=xay.dmp transport_tablespace=y datafiles=(/disk1/sles01.dbf,/disk2

    /sles02.dbf)

    sql> alter tablespace sales_ts read write;

    4.checking transport set

    sql> dbms_tts.transport_set_check(ts_list =>''sales_ts'' ..,incl_constraints=>true);

    在表transport_set_violations 中查看

    sql> dbms_tts.isselfcontained 为true 是, 表示自包含


    第八章: managing password security and resources

    1.controlling account lock and password

    sql> alter user juncky identified by oracle account unlock;

    2.user_provided password function

    sql> function_name(userid in varchar2(30),password in varchar2(30),

    old_password in varchar2(30)) return boolean

    3.create a profile : password setting

    sql> create profile grace_5 limit failed_login_attempts 3

    sql> password_lock_time unlimited password_life_time 30

    sql>password_reuse_time 30 password_verify_function verify_function

    sql> password_grace_time 5;

    4.altering a profile

    sql> alter profile default failed_login_attempts 3

    sql> password_life_time 60 password_grace_time 10;

    5.drop a profile

    sql> drop profile grace_5 [cascade];

    6.create a profile : resource limit

    sql> create profile developer_prof limit sessions_per_user 2

    sql> cpu_per_session 10000 idle_time 60 connect_time 480;

    7. view => resource_cost : alter resource cost

    dba_users,dba_profiles

    8. enable resource limits

    sql> alter system set resource_limit=true;


    第九章:managing users

    1.create a user: database authentication

    sql> create user juncky identified by oracle default tablespace users

    sql> temporary tablespace temp quota 10m on data password expire

    sql> [account lock|unlock] [profile profilename|default];

    2.change user quota on tablespace

    sql> alter user juncky quota 0 on users;

    3.drop a user

    sql> drop user juncky [cascade];

    4. monitor user

    view: dba_users , dba_ts_quotas
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics