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
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值