ORACLE8I에서 STANDBY DB 구성 및 관리 방법

제품 : ORACLE SERVER
작성날짜 : 2004-08-16
database crash 시 backup받아둔 datafile과 archive file을 모두 restore하고,
recover하는 작업은 경우에 따라 고객의 요구 사항보다 길어지는 경우가 종종
있다.
이런 경우 미리 standy db를 구성하여 standby db에 recovery를 진행해 두고,
piramry db crash시 바로 stadnby db와 연결하면, db down time을 최소화하는데
많은 도움이 된다.
Oracle 8.1부터 이 standby db에 새로운 기능이 추가되어, 이전 version에서,
주기적으로 archive file 적용 및 recover 작업을 수행해야 하는 필요를 덜어
주었다.
단, Automated Standby database Feature는 8i~10g Standard Edition에서는
지원하지 않는다.
이 문서에서 자세한 설정 방법 및 추가된 기능들을 확인한다.
1. 추가된 기능 정리
(1) primary db에서 archive file생성시 standby db에도 자동 전달
(2) standby db에 전달된 archive file이 자동으로 standby db에 적용
(3) standby db activate없이, standy db를 read only mode로 open
2. 구성 절차
(1) standby db가 구성될 system에 oracle을 primary db와 동일한 version으로
install한다.
- OS는 primary db와 동일해야 한다.
- database는 install할 필요없이, software만 install하면 된다.
- datafile, controlfile, redo log file이 생성될 directory를 만들어
둔다.
(가능하면 primary db와 동일한것이 좋다),
(2) primary db의 init.ora를 standby db에 copy한다.
- primary db의 $ORACLE_HOME/dbs/initSID.ora file을 standby db에
copy한다.
- initSID.ora file에 ifile=로 정의된 file이 있다면 그 file도 해당
directory에 copy한다.
- 이러한 initial parameter중 background_dump_dest, user_dump_dest,
core_dump_dest, archive_log_dest 등에 지정된 directory도 standby 쪽,
server에 생성해둔다.
(3) primary db에 multiple archive destination을 위한 parameter지정
다음과 같은 형태로 primary db를 위한 archive parameter외에,
standby db쪽에 자동으로 archive file이 생성되도록 destination을
initSID.ora file에 지정한다.
log_archive_start = true
log_archive_dest_1 = "location=/user/oradata/archive"
log_archive_format = arch%s.arc
log_archive_dest_2 = 'SERVICE=sby OPTIONAL REOPEN=60'
log_archive_dest_state_2 = ENABLE
- 이 예에서 sby라는 것은 primary db의 tnsnames.ora file에 미리
정의되어 있어야 하며, standby db에 대한 description을 가져야 한다.
- REOPEN은 standby db쪽으로 archive가 실패한경우 지정된 초만큼 후에
다시 archive를 시도하라는 의미이다.
- OPTIONAL의 의미는 지정된 archive가 실패하는 경우라도 primary db의
log_archive_dest_1에 지정된 곳에 archive만 성공하면 archive작업을
중단없이 계속 진행하라는 것이다.
(4) standby db의 initSID.ora file 수정
primary db에서 자동으로 전달되어온 archive file이 위치하게 될
destination과 datafile이나 redo log file이 위치할 directory 구조가
primary db와 다른 경우를 대비한 parameter를 다음 예와 같이 설정한다.
standby_archive_dest=/user/oradata/archive
log_archive_start = true
log_archive_dest_1 = "location=/user/oradata/archive"
log_archive_format = arch%S.ARC
db_file_name_convert="PROD","SBY"
log_file_name_convert="PROD","SBY"
- standby_archive_dest는 primary db에서 multiple archive destination을
지정하는 경우 자동으로 생성될 archive file의 위치를 나타낸다.
- standby_archive_dest뒤에는 log_archive_dest와 같은 location=은
적으면 안된다. 적을시엔 자동으로 archive가 전달되지 않고, primary db의
alert.log에 오류가 기록된다.
- 실제 recover시나 이후 open되어 archive가 생성되는 시에는
log_archive_dest 부분이 참조된다.
- db_file_name_conver나 log_file_name_convert의 경우는, primary db와
standby db간에 datafile, redo log file이 위치하는 directory가 다른
경우 directory 이름중 다른 부분을 치환하도록 하는 것이다.
이 경우 primary db는 /user/oradata/PROD directory에 file이 존재하고,
standby db는 /user/oradata/SBY directory에 위치하는 경우에 대한 예이다.
- 만약 datafile이 여러군데 나뉘어져 있어 이런 변경 부분이 더 필요하다면
다음과 같이 할 수 있다.
db_file_name_convert=('/dbs/t1/','/dbs/t1/s_','dbs/t2/','dbs/t2/s_')
- WindowsNT의 경우는 반드시 directory이름을 반드시 대문자로 하여야 한다.
(5) standby db용 controlfile을 생성
다음 문장을 primary db에서 수행한다. 이후 이렇게 생성된 file은
standby db쪽으로 옮겨질 것이다.
SQL> alter database create standby controlfile as
'/user/oradata/temp/control01.ctl';
(5) primary db의 datafile을 backup받아둔다.
db를 shutdown 시켜 cold backup을 받거나, hot backup을 받는다.
tape등에 backup받는 대신 바로 ftp 등으로 standby db disk로
옮겨도 된다.
(6) 위의 (4),(5)에서 만들어진 controlfile과 datafile을 standby db쪽으로
옮긴다.
(7) standby db에서 다음과 같이 수행한다.
os> sqlplus internal
SQL> startup nomount
SQL> alter database mount standby database;
SQL> recover managed standby database;
- 만약 recover managed standby database대신에 그냥
recover standby database하면, ora-279, 280, 289가 발생하면서,
생성된 archive를 manual하게 적용하면 된다.
(8) standby db에서 primary db가 운영중에 test나 다른 목적으로 data를 읽고자
한다면 read only로 open가능
SQL>alter database open read only;
(9) primary db가 crash가 발생하여 standby db를 운영하고자 한다면 다음과 같이
activate시켜야 하며, 이렇게 한 이후로는 이 standby db는 standby 의 속성은
잃게 되며, 이후에 다시 standby db로 구축하려면 다시 (5)번부터 작업을
재수행하여 구축하여야 한다.
SQL>alter database activate standy database;
SQL>shutdown
SQL>startup
- shutdown후 이제는 더 이상 standby db가 아니므로 primary성격의 multiple
archive destination지정 등을 원하는 경우 parameter를 추가하면 된다.
3. managed recover, read only mode open 관리
(1) managed recover
recover managed database를 수행한 창은 계속 새로 전달되온 archive file을
자동으로 recovery를 시켜준다.
이때 필요에 의해 이 자동 recovery를 중단하고자 한다면,
standby에서 다른 session을 연결하여 다음과 같이 수행하면 된다.
SQL>alter database recover managed standby database cancel;
이렇게 하면,
recover managed standby 상태의 창에서,
ora-283, ora-16037 메시지와 함께, managed recovery가 중단되고,
SQL혹은 SVRMGR prompt상태가 된다.
recover managed standby database와 일반, recover standby database는 필요에
따라, 선택하여 사용하면 되며, recover managed standby databse의 경우 이
문장을 실행한 이후에 생성된 archive file만을 자동 recovery한다.
즉, recover managed standby database문장 수행전에 미리 전달되어 온 archive
file이 있다면, 일단 먼저 recover standby database문장을 통해 recovery를
수행한 이후에, recovey managed standby database문장을 수행하여야 한다.
(2) read only mode open
standby db를 standby db 속성은 그대로 유지하면서 dml 외에 data나 dictionary
조회가 필요한 상황에서는
alter database open read only문장을 수행하여 read only mode로 open할 수 있다.
이렇게 조회후에, 다른 작업없이 recover 문장을 수행하면 다시 mount상태가 되는
것이며, 필요하면 다시 open read only를 하여야 한다.
standby db는 운영 중에 shutdown가 mount, open을 마음대로 할 수 있으나
그 때마다 반드시,
startup nomount;
alter database mount standby database;
(필요한 경우 alter database open read only)
문장을 통해 mount나 open 상태가 되도록 하여야 한다.
Reference Documents
<Note:74185.1> Standby Database and Oracle 8.1
<Note:70233.1> How to Create a Oracle 8i Standby Database

Similar Messages

  • Standby database creation on oracle8.0.6

    Folks...can anyone point me to right documentation for creating standby database on oracle 8.0.6.
    I found very good doc for version 8.1.5 but not 8.0.6.
    Thanks S

    what is the tablespace size for the following:
    system:
    temp:
    user:
    rollback:
    index:
    shah
    null

  • Standby database with different directory structure

    Hi,
    sorry to say that we are in desupported version due to some constraint.
    oracle version : 8.1.7.0.0.
    os:sun 5.9
    I need to create physical standby database with different directory structure:
    i have created standby database with same directory structure of primary, now i have requirement to create with different directory structure.
    in oracle 8i we can not give multiple parameter for db_file_name_convert(ORA-01678: parameter db_file_name_convert must be two strings, a pattern and a replacement) and i do have partitions in primary as follows:
    bash-2.05$ df -h
    Filesystem             size   used  avail capacity  Mounted on
    /dev/dsk/c1t0d0s0       20G    14G   5.6G    72%    /
    /proc                    0K     0K     0K     0%    /proc
    mnttab                   0K     0K     0K     0%    /etc/mnttab
    fd                       0K     0K     0K     0%    /dev/fd
    swap                    11G    40K    11G     1%    /var/run
    dmpfs                   11G     0K    11G     0%    /dev/vx/dmp
    dmpfs                   11G     0K    11G     0%    /dev/vx/rdmp
    swap                    11G   656K    11G     1%    /tmp
    /dev/dsk/c1t0d0s3       25G    18G   6.8G    72%    /oracle
    /dev/vx/dsk/suportaldg/oracle1
                            12G    11G   1.1G    91%    /oracle1
    /dev/vx/dsk/suportaldg/oracle2
                            12G   8.1G   3.7G    69%    /oracle2
    /dev/vx/dsk/suportaldg/orapurge
                           200G   182G    17G    92%    /orapurge
    /dev/vx/dsk/suportaldg/oracle3
                            12G    10G   1.9G    85%    /oracle3
    /dev/vx/dsk/suportaldg/oracle4
                            12G    12G    58M   100%    /oracle4
    /dev/vx/dsk/suportaldg/oracle5
                           7.0G   5.9G   1.0G    86%    /oracle5
    /dev/vx/dsk/suportaldg/oracle6
                           7.0G   6.4G   564M    93%    /oracle6
    /dev/vx/dsk/suportaldg/oracle7
                            23G    23G   358M    99%    /oracle7
    /dev/vx/dsk/suportaldg/oracle8
                            13G    13G   165M    99%    /oracle8
    /dev/vx/dsk/suportaldg/oracle9
                            23G    22G   1.4G    94%    /oracle9
    /dev/vx/dsk/suportaldg/oracle10
                            12G  10.0G   1.9G    85%    /oracle10
    /dev/vx/dsk/suportaldg/oracle11
                            39G    36G   2.1G    95%    /oracle11
    /dev/vx/dsk/suportaldg/oracle12
                            39G    38G   1.1G    98%    /oracle12
    /dev/vx/dsk/suportaldg/oracle13
                            68G    65G   2.6G    97%    /oracle13
    /dev/vx/dsk/suportaldg/oracle14
                           200G   199G   1.3G   100%    /oracle14
    /dev/vx/dsk/suportaldg/oracle15
                           200G   196G   3.6G    99%    /oracle15
    /dev/vx/dsk/suportaldg/oracle16
                            70G    64G   5.5G    93%    /oracle16
    /dev/vx/dsk/suportaldg/oracle20
                           7.0G   6.4G   609M    92%    /oracle20
    /dev/vx/dsk/suportaldg/oracle50
                            28G    26G   2.0G    93%    /oracle50
    /dev/vx/dsk/suportaldg/oratranslog
                           185G   165G    19G    90%    /oratranslogso how i can create standby database with different directory structure, help is appreciated.
    Thanks
    Edited by: prakashdba on Mar 5, 2009 11:04 PM

    Looks like very difficult and inform you mgmt about the drawbacks of running olderv ersions
    may be you can try something like this but i dont know whether it is supported or not
    db_file_name_convert=['/dev/vx/dsk/suportaldg/oracle3','/dev/vx/dsk/suportaldg/STDBY/oracle3']
    db_file_name_convert=['/dev/vx/dsk/suportaldg/oracle4','/dev/vx/dsk/suportaldg/STDBY/oracle4']
    db_file_name_convert=['/dev/vx/dsk/suportaldg/oracle5','/dev/vx/dsk/suportaldg/STDBY/oracle5']

  • Standby database in same computer

    I have made standby database in different computer then in production database in similar path and it is working.
    But whenever I try to make it in same computer it gives me error. I have gone through the oracle documentaion.
    But still I can't.
    Any suggestion on Node

    I still get the problem.
    I have created a prod database with archive log mode and archival enabled
    I shut down it and copyed the
    "oradata/prod to oradata/stdby",
    "admin/prod to admin/stdby",
    "initprod.ora to initstdby.ora" and
    "pwdprod.ora to pwdstdby.ora"
    Then I have added a service name "stdby" with net8 easy config
    Now I have created a new instance stdby with "oradim -new -sid stdby"
    now In "Prod init.ora" file I have added
    log_archive_start = true
    log_archive_dest_1 = "location=e:\Oracle\oradata\stdby\archive"
    log_archive_dest_state_1 = ENABLE
    log_archive_dest_2 = 'SERVICE=standby1'
    log_archive_dest_state_2 = ENABLE
    global_names = false
    Now I have started the prod database and created a standby controlfile
    alter database create standby controlfile '\oradata\stdby\stdby.ctl'
    now In "Stdby init.ora" file I have added
    db_name = "prod"
    instance_name = stdby
    service_names = stdby
    control_files = ("e:\Oracle\oradata\stdby\stdby.ctl")
    log_archive_start = true
    log_archive_dest_1 = "location=e:\Oracle\oradata\stdby\archive"
    log_archive_dest_state_1 = ENABLE
    standby_archive_dest = 'e:\Oracle\oradata\stdby\'
    db_file_name_convert = ('\prod\','\stdby\')
    log_file_name_convert = ('\prod\','\stdby\')
    lock_name_space = 'stdby'
    Now IN standby when I do
    SQL_stdby>>startup nomount pfile='E:\Oracle\Oracle8i\DATABASE\initstdby.ora';
    SQL_stdby>>alter database mount standby database;
    SQL_stdby>>RECOVER AUTOMATIC STANDBY DATABASE;
    Up to this it works
    Now when I start prod database
    SQL_prod>>startup
    it gives me the error
    ORA-01102: cannot mount database in EXCLUSIVE mode

  • Basic standby database configuration in Oracle10g standard edition

    Have anyone successfully implemented the technology in Oracle8i and earlier known as "Basic standby database" in Oracle10g SE? From the information, that I've been able to gather, this technology still exists in Oracle9i and later, along with Oracle Data Guard.
    I'm not interested in the complete Data Guard environment - only the standby database feature as mentioned above. Basci
    I've tried the documentation regarding the configuration of Data Guard (in lack off precise documentation on this technology) - but it's very confusing what's possible on SE an EE editions.
    I've followed all the guidelines, enabled archive logging on primary database, created standby control file, copied the primary database files, created the pfile from the primary database - and then used this as the source for the spfile on the standby database.
    I can then mount the standby database and start the recovery process with the following command:
    alter database recover standby database disconnect;
    The database is altered but no archive is applied (I've manually copied the archive logs from the primary). I've configured the standby_archive_dest - but the status for the MRP0 process keeps saying: WAITING_FOR_LOG
    It seems like the "automatic" recovery mode doesn't work on SE. My conclusion is that you'll have to do everything manually - which means that I've have run the recover command manually - everytime I want to apply the archive logs from the primary.
    Does anyone have a complete how-to-guide on this issue or have tried implementing in a real solution?

    Hi,
    >>The database is altered but no archive is applied (I've manually copied the archive logs from the primary). I've configured the standby_archive_dest - but the status for the MRP0 process keeps saying: WAITING_FOR_LOG
    because ur using standard edition and in this edition the archivelog will not automatically move to standby from primary database.so u have to automatically transfer and apply it.
    Thanks
    Kuljeet

  • Standby DB 9i and Windows 2000

    Hi all,
    I´ve already implemented Managed Standby DB 8.1.6 on Linux and it´s working fine!
    I´d like to hear from you about implementation of Standby DB 9i on Windows... Is it too complicated? Are there many problems? Or it works ok?
    I really will appreciate if you send your comments...
    Thanks in advance,
    Heloisa

    I think...standby DB must be exactly same version as original database.
    I assume that your original database is Oracle8.1.6...right?
    If it's true you must run your standby database on Oracle8.1.6....

  • Configuring standby database on local machine in NT

    Dear friends,
    I have oracle 8.1.6 on NT version 4.0. I have two servers one for production and another for standby. but my standby database has crashed and i am in the process of rectifying it..
    for temporary basis, i want to have both the production and standby database on same NT machine.. but the NT platform is not allowing the same name on instance/ database..
    is there any way out to have the production and standby database on same machine on NT pltaform..
    kindly guide me as my database is up for 24 hours..
    regards,
    viral shah

    Viral,
    You should be able to create the standby on the same NT server. Take a look at the documentation @ http://otn.oracle.com/docs/products/oracle8i/doc_library/817_doc/server.817/a76995/standbys.htm#29841

  • Create test database from standby without some data

    Hi. I want to create test database from my standby database using rman.
    But i have some some tables and where information is too large i dont want backup all data from this tables. because i dont have enough space on my test server.
    Have u any idea for solution this problem.
    Thanks

    But have suggestion.
    You can create duplicate database on based your target database (to new host) and skip undesired tablespaces...
    bash# rman target /
    RMAN> ....
    your code should be like :
    run {
    allocate auxiliary channel 'dev_0' type 'sbt_tape'
    parms 'SBT_LIBRARY=/opt/omni/lib/libob2oracle8_64bit.so,ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=my,OB2BARLIST=MY DAILY)';
    allocate auxiliary channel 'dev_1' type 'sbt_tape'
    parms 'SBT_LIBRARY=/opt/omni/lib/libob2oracle8_64bit.so,ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=my,OB2BARLIST=MY DAILY)';
    allocate auxiliary channel 'dev_2' type 'sbt_tape'
    parms 'SBT_LIBRARY=/opt/omni/lib/libob2oracle8_64bit.so,ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=my,OB2BARLIST=MY DAILY)';
    allocate auxiliary channel 'dev_3' type 'sbt_tape'
    parms 'SBT_LIBRARY=/opt/omni/lib/libob2oracle8_64bit.so,ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=my,OB2BARLIST=MY DAILY)';
    SET UNTIL SCN 7769764681915;
    DUPLICATE TARGET DATABASE TO MYTS SKIP TABLESPACE TOOLS_IDX,TOOLS,ARCHIVE,IDX;
    Edited by: Ulfet Tanriverdiyev on Dec 21, 2010 3:42 AM

  • Alter tablespace RW on standby database

    I work with Oracle8i for Solaris.
    I've created a stanby database which is opened in read only.
    Now, I need to use a temporary tablespace, so
    I've tried :
    "alter tablespace temp nologging read write;"
    But, oracle answer me an ORA-16000 error (database open for read-only access).
    So :
    1) Is it possible to use a temporary tablespace in standby mode ?
    2) How.
    Thanks,
    Philippe
    null

    Hello,
    Since the table sizes is about 100GB , it takes time to move and rebuild the indexes and the end user application doesnot work if any of the index is unusable or not present.I think it will generate a lot of Archived logs, so it will be very heavy to manage and apply to your Standby.
    If it's possible, it will be faster to put your Primary database in NOARCHIVELOG mode then, you make the Move and Rebuild.
    Afterwards, you put again the Primary in ARCHIVELOG mode and take a good BACKUP of it.
    Later, when nobody work on Standby, you recreate it.
    Hope this help.
    Best regards,
    Jean-Valentin

  • Oracle8i Data Guard

    My company is interested to use Data Guard to provide standby database at standby site. Does oracle8i Data Guard available for AIX ? or anybody done it before ? Please advice.
    Thanks
    Sam

    Hi samuel,
    I know this might kind of sound
    silly here, but I would like to
    know WHAT REALLY IS 8iLite? Is it
    the sql component of Oracle, I
    mean where one can create,store and
    manipulate objects like Tables,
    Views, Procedures e.t.c
    Is it the database where I get to
    see the SQL> prompt and where I
    type my SELECT statements, CREATE
    statements e.t.c.
    Please reply.
    UA

  • Upgrade to Oracle8i Rel. 8.1.7

    I'm planning to upgrade our Oracle8i 8.1.6 to 8.1.7
    production database server. But, I have a Standby
    Database server configured which is being updated
    using the archived redo logs updates on a regular
    basis to a remote area.
    Will the standby database server continue function
    (accept archived redo logs) after upgrading both
    servers? It would entail an lot of work to reacreate
    the standby DB.
    Anybody has similar setup or experieince?
    Francis

    Which upgrade documentation are You following?
    If You have metalink access, then read note 316889.1 - it has step by step instruction how to upgrade from 8.1.7.4 to 10.2.0.1 (and I would suggest to upgrade to 10.2.0.4).

  • ORACLE 8I: STANDBY DATABASE는 STANDARD와 ENTERPRISE EDITION에서 사용이 가능한가?

    제품 : ORACLE SERVER
    작성날짜 : 2004-08-31
    ORACLE 8I: STANDBY DATABASE는 STANDARD와 ENTERPRISE EDITION에서 사용이 가능한가?
    =====================================================================
    Problem Description
    원격의 Standby 데이터베이스 구성을 고려하지만, standby 사이트로
    고려하는 장비에는 Oracle8i Standard Edition이 동작을 하고 있는 반면
    primary 사이트에는 Oracle8i Enterprise Edition이 동작을 하고 있다.
    이러한 경우 다음의 질문을 하게 된다:
    Primary 사이트에서는 Oracle8i Enterprise Edition을 standby 사이트에서는
    Oracle8i Standard Edition을 사용하는 것은 가능한가?
    Oracle8i Standard Edition database가 Standby 모드로 동작을 하면서
    Oracle8i Enterprise Edition database의 log들을 유효하게 받아들일 수
    있는가?
    Solution Description:
    Basic Standby 데이터베이스 기능은 Oracle7,Release 7.3.x, Oracle8, 그리고
    Oracle8i Standard Edition에서 사용이 가능하다.
    Enterprise Edition과 Standard Edition 모두 Standby 데이터베이스 기능을
    사용하기 위하여 구성할 수 있다. 그렇지만, Non-managed Standby 환경에서
    Stabdby 데이터베이스에 적용하여 복구를 하기 위한 추가적인 작업이 필요하다.
    a) Standby 데이터베이스 상에서 수동 또는 스크립트에 의한 복구가 필요하다.
    b) 저장되어진 Redo Log들을 Standby 사이트로 옮기기 위한 방법이 필요하다.
    Explanation:
    ===========
    Standard edition에서 사용할 수 없는 Standby 데이터베이스 특징의 유일한 점은
    Log의 원격 이동 능력이다. 다시말하면, Oracle8i의 Log 원격 이동 기능은
    Enterprise Edition에만 있는 특징중의 하나이다. 이 이외의 Standby 데이터베이스
    특징들은 Oracle8i Standard Edition이나 Oracle8i Enterprise Editio 모두
    동일하다.
    자동 Log 이동은 Managed Standby 환경으로 Standby 데이터베이스를 운영하기
    위해서 필요하다.
    Reference Ducumment
    <Note:111678.1> Oracle8i: Is Standby Database Available For Standard And
    Enterprise Edition?

  • Error while creating a simple trigger in Oracle8i Lite

    Hi,
    I have Oracle8i Lite release 4.0.
    I want to create a simple trigger on 8i Lite.
    first I created .java file and got the .class file after successful compilation.
    The .class file is sitting in my local C:\ drive.
    I have a table having only two columns in 8i Lite and the structure is
    TABLE : SP
    ACC_NO NUMBER,
    ACC_DESC VARCHAR2(20)
    Then I issued the command :
    SQL> ALTER TABLE SP ATTACH JAVA SOURCE "JournalInst" in '.';
    After that getting the following error :
    alter table sp attach java source "JournalInst" in '.'
    ERROR at line 1:
    OCA-30021: error preparing/executing SQL statement
    [POL-8028] error in calling a java method
    Following is the cause/action for the error code :
    POL-8028 Error in calling a Java method
    Cause: Most commonly refers to a problem when converting between Java and Oracle Lite datatypes.
    Action: Check the calling parameters.
    I can't understand where I am wrong ?
    Could anybody help me out ?
    Here is my source code of .java file
    import java.lang.*;
    import java.sql.*;
    class JournalInst {
    public void INSERT_JOURNAL(Connection conn, double AccNo, String AccDesc)
    System.out.println("Record Inserted for :"+AccNo +" "+AccDesc);
    Thanks in advance for solutions.
    Sarada
    null

    I just started with 8i Lite, but as far as I know 8i Lite does not support PL/SQL code.
    So you have to write your triggers and stored procedures in Java.
    Ciao

  • Creating a new schema in a Logical Standby Database

    Hi All,
    I am experimenting with logical standby databases for the purpose of reporting, and have not been able to create a new schema in the logical standby database - one of the key features of logical standbys.
    I have setup primary and logical standby databases, and they seem to be running just fine - changes are moved from the primary to the standby and queries on the standby seem to run ok.
    However, If I try to create a new schema on the logical standby, that does not exist on the primary, I get "ORA-01031: insufficient privileges" errors when I try to create new objects.
    Show below are the steps I have taken to create the new schema on the logical standby. Any help would be greatly appreciated.
    SYS@UATDR> connect / as sysdba
    Connected.
    SYS@UATDR>
    SYS@UATDR> select name, log_mode, database_role, guard_status, force_logging, flashback_on, db_unique_name
    2 from v$database
    3 /
    NAME LOG_MODE DATABASE_ROLE GUARD_S FOR FLASHBACK_ON DB_UNIQUE_NAME
    UATDR ARCHIVELOG LOGICAL STANDBY ALL YES YES UATDR
    SYS@UATDR>
    SYS@UATDR> create tablespace ts_new
    2 /
    Tablespace created.
    SYS@UATDR>
    SYS@UATDR> create user new
    2 identified by new
    3 default tablespace ts_new
    4 temporary tablespace temp
    5 quota unlimited on ts_new
    6 /
    User created.
    SYS@UATDR>
    SYS@UATDR> grant connect, resource to new
    2 /
    Grant succeeded.
    SYS@UATDR> grant unlimited tablespace, create table, create any table to new
    2 /
    Grant succeeded.
    SYS@UATDR>
    SYS@UATDR> -- show privs given to new
    SYS@UATDR> select * from dba_sys_privs where grantee='NEW'
    2 /
    GRANTEE PRIVILEGE ADM
    NEW CREATE ANY TABLE NO
    NEW CREATE TABLE NO
    NEW UNLIMITED TABLESPACE NO
    SYS@UATDR>
    SYS@UATDR> -- create objects in schema
    SYS@UATDR> connect new/new
    Connected.
    NEW@UATDR>
    NEW@UATDR> -- prove ability to create tables
    NEW@UATDR> create table new
    2 (col1 number not null)
    3 tablespace ts_new
    4 /
    create table new
    ERROR at line 1:
    ORA-01031: insufficient privileges
    NEW@UATDR>
    NEW@UATDR>

    HI Daniel,
    I appreciate your quick response.
    My choice of name may not have been ideal, however changing new to another name - like gav - does not solve the problem.
    SYS@UATDR> connect / as sysdba
    Connected.
    SYS@UATDR>
    SYS@UATDR> select name, log_mode, database_role, guard_status, force_logging, flashback_on, db_unique_name
    2 from v$database
    3 /
    NAME LOG_MODE DATABASE_ROLE GUARD_S FOR FLASHBACK_ON DB_UNIQUE_NAME
    UATDR ARCHIVELOG LOGICAL STANDBY ALL YES YES UATDR
    SYS@UATDR>
    SYS@UATDR> create tablespace ts_gav
    2 /
    Tablespace created.
    SYS@UATDR>
    SYS@UATDR> create user gav
    2 identified by gav
    3 default tablespace ts_gav
    4 temporary tablespace temp
    5 quota unlimited on ts_gav
    6 /
    User created.
    SYS@UATDR>
    SYS@UATDR> grant connect, resource to gav
    2 /
    Grant succeeded.
    SYS@UATDR> grant unlimited tablespace, create table, create any table to gav
    2 /
    Grant succeeded.
    SYS@UATDR>
    SYS@UATDR> -- show privs given to gav
    SYS@UATDR> select * from dba_sys_privs where grantee='GAV'
    2 /
    GRANTEE PRIVILEGE ADM
    GAV CREATE TABLE NO
    GAV CREATE ANY TABLE NO
    GAV UNLIMITED TABLESPACE NO
    SYS@UATDR>
    SYS@UATDR> -- create objects in schema
    SYS@UATDR> connect gav/gav
    Connected.
    GAV@UATDR>
    GAV@UATDR> -- prove ability to create tables
    GAV@UATDR> create table gav
    2 (col1 number not null)
    3 tablespace ts_gav
    4 /
    create table gav
    ERROR at line 1:
    ORA-01031: insufficient privileges
    GAV@UATDR>

  • Error while creating a simple function, procedure or triger in Oracle8i Lite

    Hi,
    I have Oracle8i Lite release 4.0.
    While creating a simple proceudre/function/trigger on the database, it's throwing the following error:
    create or replace function test return number is
    ERROR at line 1:
    OCA-30021: error preparing/executing SQL statement
    [POL-5228] syntax error
    Here is my sample code.
    create or replace function test return number is
    begin
    return 0;
    end;
    Tried to create the same function in the user SYSTEM too but got the same error message.
    Thanks in advance for the soluton.
    null

    I just started with 8i Lite, but as far as I know 8i Lite does not support PL/SQL code.
    So you have to write your triggers and stored procedures in Java.
    Ciao

Maybe you are looking for