Oracle导库及相关操作

时间:2021-09-03 18:58:26

SELECT * FROM dba_profiles s WHERE s.profile=‘DEFAULT‘ AND resource_name=‘PASSWORD_LIFE_TIME‘;--如果后面显示180天的请将密码有效期由默认的180天修改成“无限制”:
ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED;
alter user system identified by dreamsoft;
select * from dba_directories;
create or replace directory dmp as ‘E:dmp‘;

expdp system/[email protected] DIRECTORY=dmp DUMPFILE=GSDX_20190810.dmp FULL=y

impdp system/[email protected] DIRECTORY=dmp DUMPFILE=CDZZ20191119.DMP FULL=y

impdp system/[email protected] DIRECTORY=dmp DUMPFILE=XMDX_20191208.DMP remap_schema=dsoa:xmdx logfile=xmdx.log

imp dsoa/[email protected] file=E:dmpdaochu.dmp FULL=y


create user xmdx identified by dreamsoft default tablespace users;
grant resource,connect,dba to xmdx;
commit;--提交

imp dsoa/[email protected] file=e:dmp20190820szdx.dmp full=y

--查询数据库用户
select * from dba_users;
drop user xmdx cascade;


--修改memory_target大小
show parameters target;
alter system set memory_target=512M scope=spfile;
alter system set memory_max_target=512M scope=spfile;
alter system set deferred_segment_creation=false scope=spfile;

select username,account_status from dba_users where username=‘DSOA‘;--查看到DSOA用户锁了
alter user DSOA account unlock;--解锁DSOA用户
select * from dba_profiles where RESOURCE_NAME=‘FAILED_LOGIN_ATTEMPTS‘;--查看用户限制登陆次数
alter profile default limit failed_login_attempts unlimited;--修改用户无论输入多少次都不会被锁定


1、在运行中输入CMD

2、在命令行输入sqlplus /nolog (不登陆数据库,只启动sqlplus)

3、SQL> conn /as sysdba

已连接。

4、SQL> alter user system identified by 123456;

用户已更改。

password即为要修改的新密码。