티스토리 뷰
archiveMode.sh
작동은 되나 마음에 안드는 코드임.
pl/sql문으로 작성해서 실행시 immediate 부분 에러남.
PLS-00103: Encountered the symbol "IMMEDIATE" when expecting one of the following:
:= . ( @ % ;
if [ $1 = start ] ; then
sqlplus / as sysdba<<EOF
/*
declare
md v\$database.log_mode%type := null;
begin
select log_mode into md from v\$database;
if md = 'NOARCHIVELOG' then
*/
shutdown immediate
startup mount
alter database archivelog;
alter database open;
/*
else
dbms_output.put_line('This Database is Archive mode');
end if;
end;
/
*/
select log_mode from v\$database;
EOF
elif [ $1 = stop ] ; then
sqlplus / as sysdba<<EOF
/*
declare
md v\$database.log_mode%type := null;
begin
select log_mode into md from v\$database;
if md = 'ARCHIVELOG' then
*/
shutdown immediate
startup mount
alter database noarchivelog;
alter database open;
/*
else
dbms_output.put_line('This Database is NoArchive mode');
end if;
end;
/
*/
select log_mode from v\$database;
EOF
else
echo "Usage: archiveMode {start|stop}"
fi
'DataBase > Oracle' 카테고리의 다른 글
oracle service 등록 (0) | 2012.10.17 |
---|---|
오라클 스크립트 oracle.sh (0) | 2012.10.17 |
잡다한 쿼리구문- 쉬운데 자주 깜박하는 것들 검색용 (0) | 2012.07.23 |
NLS 관련 검색 (0) | 2012.04.25 |
ORA-20000: ORU-10027: buffer overflow, limit of 15000 bytes (0) | 2012.04.13 |
- Total
- Today
- Yesterday
- 갤럭시S
- Managing Schema Objects
- postgresql jsonb
- recovery
- iPhone
- iOS5
- 오라클
- query 잘림
- SQLPlus
- oracle
- 아이폰
- parameter
- 윈도우
- 출시일
- MS-SQL
- postgresql jsonb index
- 리눅스
- 인덱스
- 투싼
- postgresql pg_stat_activity
- Flashback
- 아이폰4
- Backup
- 독도
- tablespace
- linux
- PL/SQL
- 한글
- PostgreSQL
- index