티스토리 뷰
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
- Managing Schema Objects
- PostgreSQL
- recovery
- 독도
- 오라클
- index
- tablespace
- iPhone
- Flashback
- 아이폰
- mysql
- parameter
- 리눅스
- Backup
- 테이블정보
- SQLPlus
- 한글
- MS-SQL
- 컬럼정보
- 출시일
- postgresql.conf
- 인덱스
- iOS5
- 투싼
- linux
- oracle
- PL/SQL
- 윈도우
- 갤럭시S
- 아이폰4
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |