oracle 常用命令 语句

1 sqlplus 登录


sqlplus /nolog
conn system as sysdba
2 数据库账户解锁



alter user scott account unlock;
3 查询数据库编码



select * from nls_database_parameters where parameter ='NLS_CHARACTERSET'; -- 数据库的字符据
 select * from nls_instance_parameters where parameter='NLS_LANGUAGE'; --客户端字符集

4 解决ora-04030错误:

首先重启 oracle服务,然后



alter system set dbwr_io_slaves=2 scope=spfile;
alter system set backup_tape_io_slaves=true scope=spfile;
alter system set sga_target=1200m;
alter system set sga_max_size=1400m scope=spfile;

alter system set large_pool_size=100m;
再次重启oracle服务
--查看 设置效果
show parameter pool;



5 设置数据库编码:

shutdown immediate;
startup nomount;
alter database mount exclusive; 
alter system enable restricted session;  
alter system SET JOB_QUEUE_PROCESSES=0;
ALTER SYSTEM SET AQ_TM_PROCESSES=0; 
ALTER DATABASE OPEN;  
ALTER DATABASE CHARACTER SET UTF8; 
ALTER DATABASE CHARACTER SET INTERNAL_USE UTF8;
执行完毕之后还要执行:
ALTER SYSTEM DISABLE RESTRICTED SESSION;

否则报ora-12526错误


手动修改sga后无法startup oracle

通过sqlplus连接到空闲例程:


startup pfile=D:\app\wujiahua\admin\ORCL\pfile\init.ora


你可能感兴趣的:(oracle 常用命令 语句)