1
2
3
4
5
6
7
8
9
10
|
SQL>
select
userenv(
'language'
)
from
dual; #先查看数据库的字符集
SQL> shutdown immediate;
SQL> startup mount;
SQL>
alter
system enable restricted session;
SQL>
alter
system
set
job_queue_processes=0;
SQL>
alter
database
open
;
SQL>
alter
database
character
set
internal_use UTF8;
SQL> shutdown immediate;
SQL> startup
SQL>
alter
system disable restricted session;
|
-
修改允许dbstart/dbshut来启动和关闭oracle数据库实例
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
#!/bin/bash
#chkconfig:345 66 46
#description:startup script for oracle databases
export
ORACLE_BASE=
/main/oracle/
export
ORACLE_HOME=
/main/oracle/11
.2
export
PATH=$PATH:$ORACLE_HOME
/bin
export
ORACLE_SID=orcl
ORA_OWNR=
"oracle"
case
"$1"
in
start)
echo
-n
"Starting Oracle:"
su
- $ORA_OWNR -c
"$ORACLE_HOME/bin/lsnrctl start"
su
- $ORA_OWNR -c
"$ORACLE_HOME/bin/dbstart"
su
- $ORA_OWNR -c
"$ORACLE_HOME/bin/emctl start dbconsole"
echo
"Starting Oracle Success: OK"
;;
stop)
echo
-n
"Shutdown Oracle:"
su
- $ORA_OWNR -c
"$ORACLE_HOME/bin/emctl stop dbconsole"
su
- $ORA_OWNR -c
"$ORACLE_HOME/bin/dbshut"
su
- $ORA_OWNR -c
"$ORACLE_HOME/bin/lsnrctl stop"
echo
"Shutdown Oracle Success: OK"
;;
restart)
$0 stop
$0 start
;;
*)
echo
"Usage: basename $0 start|stop|restart"
exit
1
esac
exit
0
|