ORA-27030

Hi,
Os : Aix,red hat 4.2
Db :10.2
We have aix,red hat box for db.Every one half hour we moved archive logs to TAPE.we using TSM.
we getting this error alteast once in a day.After some time's it's resolved automatically.
ORA-27030: skgfwrt: sbtwrite2 returned error
ORA-19511: Error received from media manager layer, error text:
ANS1017E (RC-50) Session rejected: TCP/IP connection failure.
I don't have much knowledge in TSM.
please any one help me out.
Thanks & Regards,
VN.

I don't have much knowledge in TSM.I guess you are not alone with this in this Oracle forum. The error comes from TSM, follow the suggestion in 'User response':
Session rejected: TCP/IP connection failure
Explanation:
An attempt to connect to the server using TCP/IP communications failed. This error can occur if the LAN connection went down or if your system administrator canceled a backup operation.
System action:
Session rejected. Processing stopped.
User response:
Retry the operation, or wait until the server comes back up and retry the operation. If the problem continues, see your system administrator for further help.

Similar Messages

  • Errors when backing to tape ORA-19624 ORA-19511

    Hi,
    We got an error yesteday when backing u to tape, this happens very rarely but following is the message
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-10035: exception raised in RPC: O
    RMAN-10031: ORA-19624 occurred during call to DBMS_BACKUP_RESTORE.BACKUPPIECECREATE
    RMAN-10035: exception raised in RPC: O
    RMAN-10031: ORA-19624 occurred during call to DBMS_BACKUP_RESTORE.BACKUPPIECECREATE
    RMAN-10035: exception raised in RPC: O
    RMAN-10031: ORA-19624 occurred during call to DBMS_BACKUP_RESTORE.BACKUPPIECECREATE
    RMAN-03015: error occurred in stored script BGT2_BSBGPRD1_HOTBCK_DY
    RMAN-03007: retryable error occurred during execution of command: backup
    RMAN-07004: unhandled exception during command execution on channel ch1
    RMAN-10035: exception raised in RPC: ORA-19502: write error on file "db_BSBGPRD1_98108_1_667503967", blockno 4323713 (blocksize=512)
    ORA-27030: skgfwrt: sbtwrite2 returned error
    ORA-19511: VxBSASendData: Failed with error:
    Server Status: Communication with the server has not been iniatated or the server status has not been retrieved from the server.
    RMAN-10031: ORA-19624 occurred during call to DBMS_BACKUP_RESTORE.BACKUPPIECECREATE
    any suggestions
    Kedar

    Hi,
    If I check in TOAD, then I see that the max size of the tablespace is unlimited. Btw, Tablespace XYZ is actually an index tablespace - dont know if this makes a difference. The max size of the data tablespace is also unlimited.
    Using the query select * from user_ts_quotas or dba_ts_quotas, I dont see tablespace XYZ or its data tablespace in this result set. I'm not sure why.
    Maybe giving the user unlimited quota on the tablespace might solve the problem - i dont know, but if it does, then I have to ask why has it worked all the time without this and only now it's giving an error??
    The user has been doing the same thing everyday for the past couple of years and only now getting this error.

  • RMAN media manager layer error

    hi everybody ,
    i have 9i runs on SLES9 . ın our company we use EMC Networker (Legato) to do our backups. last two day ı got error message ;
    channel t1: starting piece 1 at 04-MAR-09
    released channel: t1
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03009: failure of backup command on t1 channel at 03/04/2009 02:14:29
    ORA-19502: write error on file "DB_dOBASE_t680578323_u81k91j8j", blockno 6907393 (blocksize=512)
    ORA-27030: skgfwrt: sbtwrite2 returned error
    ORA-19511: Error received from media manager layer, error text:
    asdf_output_section1() failed
    xdr=0x0x3fa0100: bp=0x0x3fd3030: send_len=262144: type=12800: fhand=0x0x3fd30b0: wrapper=0x0x3fd30d0: directp=0x0x3fd30f0 (1:4:9)
    how can i resolve this error ? why did i take this error ? thanks....
    gundem

    ORA-27030 skgfwrt: sbtwrite2 returned error
    Cause
    sbtwrite2 returned an error. This happens while writing a backup file during a backup operation.
    Action
    This error is returned from the media management software which is linked with Oracle. There should be additional messages which explain the cause of the error. This error usually requires contacting the media management vendor.

  • Duplex backup: getting one copy to complete

    Using Oracle 10g R2. I am trying to set up a tape backup with 2 copies in a highly available environment. The media management software (IBM TDP for Oracle) is configured so that the copies are written to separate tape libraries. If one of the libraries is unavailable for some reason, I would like the other copy to complete, even if the first one has failed. I have disabled the first library for testing purposes and ran RMAN (transcript follows):
    RMAN> run {
    2> set backup copies = 2;
    3> allocate channel t1 type 'sbt_tape' parms 'ENV=(TDPO_OPTFILE=/opt/tivoli/tsm/config/tdpo.opt)';
    4> backup format 'backupset_%s.copy_%c' database;
    5> release channel t1;
    6> }
    executing command: SET BACKUP COPIES
    using target database control file instead of recovery catalog
    allocated channel: t1
    channel t1: sid=46 devtype=SBT_TAPE
    channel t1: Data Protection for Oracle: version 5.4.1.0
    Starting backup at 23-MAY-07
    channel t1: starting full datafile backupset
    channel t1: specifying datafile(s) in backupset
    input datafile fno=00004 name=/mnt/sda6/oracle/users.dbf
    input datafile fno=00001 name=/mnt/sda6/oracle/system.dbf
    input datafile fno=00003 name=/mnt/sda6/oracle/sysaux.dbf
    input datafile fno=00002 name=/mnt/sda6/oracle/undotbs.dbf
    channel t1: starting piece 1 at 23-MAY-07
    released channel: t1
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03009: failure of backup command on t1 channel at 05/23/2007 16:19:17
    ORA-19502: write error on file "backupset_13.copy_1", blockno 52737 (blocksize=512)
    ORA-27030: skgfwrt: sbtwrite2 returned error
    ORA-19511: Error received from media manager layer, error text:
    ANS1312E (RC12) Server media mount not possible
    RMAN> **end-of-file**
    The "media mount not possible" error results from the first library being disabled. The second library, however, is available. It seems that RMAN just drops the entire session instead of writing the second copy to the second library. Is there any way to achieve this?
    Thanks in advance

    The media management software (IBM TDP for Oracle) is
    configured so that the copies are written to separate
    tape libraries.
    Is this configured in tdpo.opt? I can't remember. Yes, this is configured in tdpo.opt:
    tdpo_mgmt_class_2 ORACLE_FILE
    The first copy is written to the default management class of the domain, which is different from the one above.

  • RMAN CUMULATIVE LEVEL 0 to tape WORKS BUT NOT LEVEL 1 RMAN

    Hi All:
    I have this saturation My rman cumulative level 0 to tape works everytime but when I try to do level-1 rman backup it failed and it never works. From the rman log, I posted below, it looks like the MML is having a problem. My question:
    1. IF this is only MML problem. Isn't that both level-0 and level-1 will failed? Why only level-1 is having the MML problem not level-0?
    2. What is RMAN doing different between level-0 and level-1?
    ORA-19502: write error on file "cum1_TNLTST8_9qf8fef5_1_1", blockno 1 (blocksize=51
    2)
    ORA-27030: skgfwrt: sbtwrite2 returned error
    ORA-19511: Error received from media manager layer, error text:
    Any suggestion or comment are welcome!

    Hi Guys
    I have a customer where I am supporting a Veritas Netbackup environment and found similar errors on 3 of their oracle databases during backups. The problem is intermittent and if you keep on trying you will get a successful backup. I am not skilled in Oracle and would like some pointers.
    Thanx

  • ANS1329S (RC29)   Server out of data storage space

    Hi
    I got the error message below. How do i resolve.
    thanking you for your anticipated responses
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03009: failure of backup command on p1 channel at 10/12/2007 00:35:17
    ORA-19502: write error on file "alcrm_635733077_24748_1", blockno 40520705 (bloc
    ksize=512)
    ORA-27030: skgfwrt: sbtwrite2 returned error
    ORA-19511: Error received from media manager layer, error text:
    ANS1329S (RC29) Server out of data storage space

    You cannot expect, that everyone here knows TSM (this is an Oracle,not an IBM forum), so it would be great to give some more informations about your environment.
    Message (ANS1329S) is clear, TSM server is out of space. Storage pools may be exhausted or no more tapes available. This is not an Oracle/RMAN issue, you have to contact the person(s) responsible for your TSM environment.
    Werner

  • Disk V$ Tape Drive for Rman

    Hi,
    Os : Aix,Red hat 4.2
    Db : 10
    We taking rman backup which stores in Tape Drive.(It took 11 hours, incremental 0 level).due to ORA-27030 & ORA-19511,we couldn't use Tape drive temporarliy.
    So we used disk for rman backup.(It took 4 hours to complete).
    Which is best storage(ie fastest) for rman backup /restoration whether DISK or TAPE?
    What are the factors determine it?
    Thanks & regards,
    VN

    What is more important to you, then choose. It's simple: tape is more reliable and faster drives. At a cost of not very high volumes, they are about the same per megabyte. It - http://www.allbackup.ru/articles/article6.html - is more less actually.
    Edited by: 900355 on 02.12.2011 2:49
    Edited by: 900355 on 02.12.2011 2:49

  • Failure of release command

    Hi All
    Please your assistance is needed to interpret what is going on with below and what should be done
    RMAN-03009: failure of backup command on ch_tape2 channel at 11/26/2011 08:30:14
    ORA-19502: write error on file "hist10g_rman_full_upmsjhke_1_1", blockno 577452545 (blocksize=512)
    ORA-27030: skgfwrt: sbtwrite2 returned error
    ORA-19511: Error received from media manager layer, error text:
    ANS1017E (RC-50) Session rejected: TCP/IP connection failure
    channel ch_tape2 disabled, job failed on it will be run on another channel
    channel ch_tape1: finished piece 1 at 26-NOV-11
    released channel: ch_tape1
    released channel: ch_tape2
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of release command at 11/27/2011 05:18:51
    RMAN-06012: channel: ch_tape2 not allocated
    Recovery Manager complete.
    OS type and version : AIX Version 5
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production

    thanks for your response tycho,
    quite appreciated. however querrying v$rman_status shows that the backup completed with errors,
    0 2011-11-25T15:03:01 DELETE COMPLETED 25-NOV-11 25-NOV-11 ARCHIVELOG
    0 2011-11-25T20:10:00 RMAN COMPLETED WITH ERRORS 25-NOV-11 27-NOV-11
    0 2011-11-25T20:10:00 BACKUP COMPLETED WITH ERRORS 25-NOV-11 27-NOV-11 DB INCR SBT_TAPE
    0 2011-11-26T09:00:01 RMAN COMPLETED 26-NOV-11 26-NOV-11
    and as learnt in a case of channel failover, RMAN attempts to complete the work on another channel, hence in this case how can i really tell if the backups were successful in this other channel.

  • Db_incr_DDS_39125_1_591231686_1", blockno 522241 (blocksize=512)

    Hi.
    Having problems with tsm backup. First thought it was an oracle (rman) pb, but when opened a case with them, they said ai have to contacted the starage media guys!
    Still then, no backup! sample error is shown below.
    Any one know this kinda work arround?
    Thanks.
    DIB
    error on rman log
    released channel: t1
    released channel: t2
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03015: error occurred in stored script b_incr_backup
    RMAN-03015: error occurred in stored script b_incr_1
    RMAN-03009: failure of backup command on t1 channel at 05/23/2006 23:26:42
    ORA-19502: write error on file "db_incr_DDS_39125_1_591231686_1", blockno 522241 (blocksize=512)
    ORA-27030: skgfwrt: sbtwrite2 returned error
    ORA-19511: Error received from media manager layer, error text:
    ANS1315E (RC15) Unexpected Retry request
    error on tsm server
    NE4994S (Session: 370, Node: DWS01_TDP) TDP Oracle SUN
    ANU0599 ANU2602E The object /dds_db//ar_DDS_39122_1_5912-20602_1 was not found on the TSM Server

    I don't think you will get much help here. As it states, it is a problem with TSM.
    RMAN is saying the media management layer attached to TSM is reporting the issue and the error from TSM looks like a configuration issue.
    Maybe you ought to try a TSM forum.

  • Rman backup to data protector

    We recently migrated from Tivoli to HP Data Protector.   All the RMAN scripts are stored in DP.
    Currently we don't have any control to stop or start the backup.  Every time we need to talk to storage team to get the things done (during maintenance activity)
    Is this the way it is operated where DP is used ?
    Is there any other way we can control the rman backup script execution ?   Is there any drawback if we run it directly from the shell/cron ?
    I was told that DP maintains its own recovery policy, due to which it has to be run from the DP.

    Not an Oracle error so you need to take this up with your other vendors.
    Vendor specific error: OB2_WriteObjData() failed! ERR(-2)           <----------------
    ORA-19502: write error on file "srmdtscl_sbldb_ora_full<sbldb_4593:765762443:1>.dbf", blockno 885712641 (blocksize=1024)
    ORA-27030: skgfwrt: sbtwrite2 returned error
    ORA-19511: Error received from media manager layer, error text:     <----------------

  • Rman backup pb

    Hi gurus.
    I do use rman and IBM TSM (TDP) for oracle hot database backup. The database to be backup is 1.2Tera and after sending about 300 GB of database, it fail with the error below.
    channel t2: starting piece 1 at 10-DEC-06
    released channel: t1
    released channel: t2
    released channel: t3
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03015: error occurred in stored script b_full_3
    RMAN-03015: error occurred in stored script b_full_open_3
    RMAN-03009: failure of backup command on t1 channel at 12/10/2006 08:30:20
    ORA-19502: write error on file "db_DDS_57070_1_608803028_1", blockno 8775169 (blocksize=512)
    ORA-27030: skgfwrt: sbtwrite2 returned error
    ORA-19511: Error received from media manager layer, error text:
    ANS1235E (RC-72) Unknown system error
    Recovery Manager complete.
    *** DWS01 Full Backup ended at Sun Dec 10 10:08:44 GMT 2006 ***
    Now, I will like to restart the full database backup excluding those datafiles that were previously backuped.
    Can any one provide me the require rman command?
    here is the script I use for the full database backup!!
    create script b_full_closed {
    allocate channel t1 type 'sbt_tape' parms 'ENV=(tdpo_optfile=/opt/tivoli/tsm/client/oracle/bin64/tdpo.opt)';
    allocate channel t2 type 'sbt_tape' parms 'ENV=(tdpo_optfile=/opt/tivoli/tsm/client/oracle/bin64/tdpo.opt)';
    backup incremental level = 0
    database
    format 'db_%d_%s_%p_%t_%c'
    tag = 'dws01_dds_INC0_CLOSED';
    release channel t1;
    release channel t2;
    sql "alter database backup controlfile to ''/backup/dds_backup.ctl'' reuse";
    alter database open;
    Thanks!
    Junior DBA in distress

    It is not easy for you to restore if you backup in multiple steps. It looks like You might have a firewall or security patches that are disconnecting the session after a specified period of time. Check with SA's if any security patches applied recently which drops the connections after a specified period of time.
    To speed up the backup process increase number of channels, 2 channels for 1.2TB database is very less.

  • PL/SQL report errors: ORA-01422

    Hi all,
    (before i you read i would like to say i have searched the net for this error code but nothing shows up like this problem..)
    I am getting an error problem when i select certain Schemas from a list on an apex app. page, it only works for some schemas not all..
    When i select one schema, it is supposed to display one row.. when i select [ALL] it is supposed to show them all.
    It does work if i select '[ALL]' from the select list (p3_schema_name), just not for every single individual one.
    the error code:
    ORA-01422: exact fetch returns more than requested number of rows
    declare
      vSchema  varchar2(20);
      vStmt  varchar2(1000);
      vVersion number(5);
      vDBName  varchar2(20);
      vHostName varchar2(80);
      vStmt2  varchar2(1000);
      vVersion2 number(5);
      vDBName2  varchar2(20);
      vServer2 varchar2(80);
      vSchema2 varchar2(80);
      CURSOR c_schemas IS
        select owner from dba_tables@P3_DB_NAME.db_link where table_name = 'DDL_LOG' and num_rows > 0 order by owner;
    begin
      IF :P3_SCHEMA_NAME != '[ALL]' AND :P3_DB_NAME IS NOT NULL AND :P3_SERVER_NAME IS NOT NULL THEN
        vServer2 := :P3_SERVER_NAME;
        vSchema2 := :P3_SCHEMA_NAME;
          vStmt2 := 'select distinct DDH_DB_NM, max(DDH_SCHEMA_NR)keep(dense_rank last order by ddh_runstart_td) AS "PATCH" from &P3_SCHEMA_NAME..ddl_log@&P3_DB_NAME.db_link GROUP BY DDH_DB_NM';
          Execute Immediate vStmt2 into vDBName2, vVersion2;
            htp.p('<br>');
            htp.p('<table border="1">');
            htp.p('<tr>');
            htp.p('<th bgcolor="#FFCC99">SERVER NAME</th>');
            htp.p('<th bgcolor="#FFCC99">DB NAME</th>');
            htp.p('<th bgcolor="#FFCC99">SCHEMA NAME</th>');
            htp.p('<th bgcolor="#FFCC99">PATCH</th>');
            htp.p('</tr>');
            htp.p('<tr>');
            htp.p('<td>');
            htp.p(vServer2);
            htp.p('</td>');
            htp.p('<td>');
            htp.p(vDBName2);
            htp.p('</td>');
            htp.p('<td>');
            htp.p(vSchema2);
            htp.p('</td>');
            htp.p('<td>');
            htp.p(vVersion2);
            htp.p('</td>');
            htp.p('<td>');
            htp.p('<BR>');
            htp.p('</td>');
            htp.p('</tr>');
            htp.p('</tr>');
            htp.p('</table>');
       ELSE IF :P3_SCHEMA_NAME = '[ALL]' AND :P3_DB_NAME IS NOT NULL AND :P3_SERVER_NAME IS NOT NULL THEN
       vHostName := :P3_SERVER_NAME;
       vDBName := :P3_DB_NAME;
         open c_schemas;
          htp.p('<br>');
          htp.p('<table border="1">');
          htp.p('<tr>');
          htp.p('<th bgcolor="#FFCC99">SERVER NAME</th>');
          htp.p('<th bgcolor="#FFCC99">DB NAME</th>');
          htp.p('<th bgcolor="#FFCC99">SCHEMA NAME</th>');
          htp.p('<th bgcolor="#FFCC99">PATCH</th>');
          htp.p('</tr>');
        LOOP
          FETCH c_schemas INTO vSchema;
          EXIT WHEN c_schemas%NOTFOUND;
          vStmt  := 'select max(DDH_SCHEMA_NR)keep(dense_rank last order by ddh_runstart_td) AS "PATCH" from '||vSchema||'.ddl_log@&P3_DB_NAME.db_link where DDH_SCHEMA_NR = (select max(DDH_SCHEMA_NR) from '||vSchema||'.ddl_log@&P3_DB_NAME.db_link) and rownum < 2' ;
          Execute Immediate vStmt into vVersion  ;
          htp.p('<tr>');
          htp.p('<td>');
          htp.p(vHostName);
          htp.p('</td>');
          htp.p('<td>');
          htp.p(vDBName);
          htp.p('</td>');
          htp.p('<td>');
          htp.p(vSchema);
          htp.p('</td>');
          htp.p('<td>');
          htp.p(vVersion);
          htp.p('</td>');
          htp.p('<td>');
          htp.p('<BR>');
          htp.p('</td>');
          htp.p('</tr>');
        END LOOP;
          htp.p('</tr>');
          htp.p('</table>');  
      CLOSE c_schemas;
    END IF;
    END IF;
    END;I have checked the DDH_SCHEMA_NR for repeating entries of the highest number.. some of the ones that dont work do have repeating entries some don't.
    Sorry if this is confusing, i have tried to explain it as best as i can.
    Thanks in advance for any help.
    Ashleigh

    Hello Ashleigh,
    Based on your code, I'd start by running this piece of SQL via command-line (thru SQL Workshop, SQL*Plus, Toad, etc.), replacing &P3_SCHEMA_NAME. and &P3_DB_NAME. with values that are currently causing the routine to fail and see if it returns more than one row. I don't know your data, but DISTINCT and GROUP BY are typically used to return multiple (though grouped/summarized) rows. It appears to be the only statement that would cause the error your seeing (more than one row being returned into single variables).
    select distinct DDH_DB_NM, max(DDH_SCHEMA_NR)keep(dense_rank last order by ddh_runstart_td) AS "PATCH" from &P3_SCHEMA_NAME..ddl_log@&P3_DB_NAME.db_link GROUP BY DDH_DB_NM;I'm actually surprised that the code runs at all. I didn't think 'execute immediate' would know what to do with substitutions indicated as "&something." (I've typically seen that when substituting in dynamic HTML/Javascript code but maybe I'm learning something new). But since you already have vServer2 and vSchema2, I'd be more apt to code it as:
    vStmt2 := 'select distinct DDH_DB_NM, max(DDH_SCHEMA_NR)keep(dense_rank last order by ddh_runstart_td) AS "PATCH" from ' ||
    vSchema2 || '.ddl_log@' || vServer2 || '.db_link GROUP BY DDH_DB_NM';Hope this helps,
    John

  • Ora-00604 error and ora 01000 error while report generation.

    hi all,
    I am trying to generate the multiple reports of same template through a program.
    While this job is running, i get the following error at the BIP console and the reports don't get generated.
    [101711_044115578][][EXCEPTION] java.sql.SQLException: ORA-00604: error occurred
    at recursive SQL level 1
    ORA-01000: maximum open cursors exceeded
    ORA-00604: error occurred at recursive SQL level 1
    ORA-01000: maximum open cursors exceeded
    ORA-01000: maximum open cursors exceeded
    Kindly help.
    Thanks.

    Lots of resources with a simple search to see what this is about, for example:
    http://www.orafaq.com/wiki/ORA-01000
    ORA-01000:     maximum open cursors exceeded
    Cause:     A host language program attempted to open too many cursors. The initialization parameter OPEN_CURSORS determines the maximum number of cursors per user.
    Action:     Modify the program to use fewer cursors. If this error occurs often, shut down Oracle, increase the value of OPEN_CURSORS, and then restart Oracle.
    open_cursors parameter
    http://download.oracle.com/docs/cd/E11882_01/server.112/e25513/initparams160.htm#REFRN10137
    Oracle support note:
    OERR: ORA-1000 maximum open cursors exceeded (Doc ID 18591.1)

  • EA2: ORA-01427 clicking on a view in the navigator

    SQLDev: 1.5.0.52.03
    Java: 1.6.0_04
    Oracle: 9.2.0.7.0
    I'm getting the following error when I click on a view in the navigator pane:
    An error was encountered performing the requested operation:
    ORA-01427: single-row subquery returns more than one row 01427. 00000 - "single-row subquery returns more than one row"I'm not seeing any errors in the shell window.
    After clicking on <OK> in the error dialog, the normal tabs (Columns, Data, Grants, Dependencies, Details, SQL) are displayed, but there is no content in the Columns tab.
    All the other tabs seem to function normally.
    Here is the DDL from the SQL tab
    CREATE OR REPLACE VIEW "SUBSCRIPTIONS"
        "ORDER_ID", "SUNBURST_ORDER_ID", "SIEBEL_ORDER_ID", "ACCOUNT_ID",
        "COMP_ID", "SUBACCOUNT_ID", "START_DATE", "END_DATE", "PULL_DATE",
        "SUBSCRIPTION_TYPE", "PRICE_CLASS", "DESCRIPTION", "SEAT_COUNT",
        "ORDER_DURATION", "CALLBACK_INTERVAL", "UPDATE_DATE", "UPDATE_USERNAME",
        "AFFILIATE"
    AS
        SELECT order_id,
            sunburst_order_id,
            siebel_order_id,
            account_id,
            comp_id,
            subaccount_id,
            start_date,
            end_date,
            pull_date,
            product_id,
            price_class,
            product_name,
            add_users,
            order_duration,
            callback_interval,
            last_mdfy_date,
            last_mdfy_emp,
            affiliate
        FROM csbcrossworlds.subscriptions;We have 15 views in this schema, 3 of them fail this way but the other 12 display the columns just fine. So far I am unable to detect any commonality.
    Any ideas?

    Ok, I think I found the problem. The view in question (SUBSCRIPTIONS) is owned by 'PHILC' and it references a table named 'SUBSCRIPTIONS' owned by 'CSBCROSSWORLDS'. There are two other development schemas that also own tables named 'SUBSCRIPTIONS'.
    I believe the 'Columns' tab is executing the query below. The subquery in this SQL tries to identify the primary key columns for the 'SUBSCRIPTIONS' view in my schema (PHILC):
    SELECT
        c.column_name,
        DECODE(
            data_type,
                'CHAR',      data_type||'('||c.data_length||')',
                'VARCHAR',   data_type||'('||c.data_length||')',
                'VARCHAR2',  data_type||'('||c.data_length||')',
                'NCHAR'   ,  data_type||'('||c.data_length||')',
                'NUMBER'  ,  DECODE(c.data_precision,null,'NUMBER', data_type||'('||c.data_precision||','||c.data_SCALE||')'),
                'NVARCHAR',  data_type||'('||c.data_length||')',
                'NVARCHAR2', data_type||'('||c.data_length||')',
                data_type) data_type,
        DECODE(nullable, 'Y', 'Yes', 'No') nullable,
        c.DATA_DEFAULT,
        column_id,
        com.comments,
        (SELECT 1 FROM all_constraints, all_cons_columns
          WHERE all_constraints.constraint_type = 'P' AND
                all_constraints.constraint_name = all_cons_columns.constraint_name AND
                all_constraints.owner = all_cons_columns.owner AND
                all_cons_columns.table_name = c.table_name AND
                c.column_name = all_cons_columns.column_name) Primary_Key,
        c_update.insertable,
        c_update.updatable,
        c_update.deletable
    FROM
        sys.all_tab_Columns c, sys.all_col_comments com, sys.user_updatable_columns c_update
    WHERE
        c.owner = :OBJECT_OWNER AND
        c.table_name = :OBJECT_NAME AND
        c.table_name = com.table_name AND
        c.owner = com.owner AND
        c.column_name = com.column_name AND
        c_update.column_name = com.column_name AND
        c_update.table_name = com.table_name
    ;Extracting the subquery into this:
    SELECT
        all_constraints.owner,
        all_constraints.table_name,
        all_constraints.constraint_name
    FROM all_constraints, all_cons_columns
    WHERE
        all_constraints.constraint_type = 'P' AND
        all_constraints.constraint_name = all_cons_columns.constraint_name AND
        all_constraints.owner = all_cons_columns.owner and
        all_cons_columns.table_name = 'SUBSCRIPTIONS' and
        'ORDER_ID' = all_cons_columns.column_name;I got this output:
       owner          table_name      constraint_name
    CUTOVER          SUBSCRIPTIONS    SUBSCRIPTIONS_PK
    CROSSWORLDS      SUBSCRIPTIONS    SUBSCRIPTIONS_PK
    CSBCROSSWORLDS   SUBSCRIPTIONS    SUBSCRIPTIONS_PKLooking at the DDL for the view, the row we really want is for owner 'CSBCROSSWORLDS'. Unfortunately, that means having to somehow parse the SQL text to extract the owner name...
    Phil

  • Using database-link in view to get around ORA-01031 error

    I have been granted select rights on a users table. I am therefore able to select from his table. If however I try create a view against his table I run into the ORA-01031 problem. I have worked around this problem by creating a database-link to myself and then adding that to the view creation and it works. What are the downsides of using the database-link in this way?

    The only down side I have been able to identify is that a extra session is created and that the CPU has a little extra work due to the LOOP BACK that takes place. I need to ensure the network is not unnessesarly used and therefore will need to ensure that 127.0.0.1 (local host) is used in the database connection discription. e.g.
    create database link my_db_link connect to scott identified by tiger using '(description=(address=(protocol=tcp)(host=127.0.0.1) (Port = 1521) ) (connect_data= (sid=ora10g)))';

Maybe you are looking for