1. 程式人生 > >oracle常用操作

oracle常用操作

char tar mounted total clas smo log shu proc

cmd命令開始

sqlplus /nolog --訪問sqlplus

connect /as sysdba --dba身份登陸

SHUTDOWN IMMEDIATE; --關閉數據庫

select * from V$NLS_PARAMETERS; --查看數據庫字符集

ORA-12899錯誤value too large for column

代碼如下 復制代碼

sys@PROD>SHUTDOWN IMMEDIATE;
Database closed.
Database dismounted.
ORACLE instance shut down.
sys@PROD>STARTUP MOUNT
ORACLE instance started.

Total System Global Area 939495424 bytes
Fixed Size 2233960 bytes
Variable Size 671091096 bytes
Database Buffers 260046848 bytes
Redo Buffers 6123520 bytes
Database mounted.
sys@PROD>ALTER SYSTEM ENABLE RESTRICTED SESSION;

System altered.

Elapsed: 00:00:02.19
sys@PROD>ALTER SYSTEM SET JOB_QUEUE_PROCESSES=0;

System altered.

Elapsed: 00:00:00.02
sys@PROD>ALTER SYSTEM SET AQ_TM_PROCESSES=0;

System altered.

Elapsed: 00:00:00.01
sys@PROD>ALTER DATABASE OPEN;

Database altered.

Elapsed: 00:00:05.09
sys@PROD>ALTER DATABASE CHARACTER SET ZHS16GBK ;
ALTER DATABASE CHARACTER SET ZHS16GBK
*
ERROR at line 1:
ORA-00911: 無效字符


Elapsed: 00:00:00.00

---報字符集不兼容,此時用INTERNAL_USE指令不對字符集超集進行檢查

代碼如下 復制代碼

sys@PROD>ALTER DATABASE CHARACTER SET INTERNAL_USE ZHS16GBK;


Database altered.

oracle常用操作