Can clob columns be selected across a database link (synonym)?

Hello,
I would like to do something like this...
insert into archive_table (id, msg, start_date)
select id, msg, startdate from synonym_table
where start_date < whatever;
...where msg represents a clob column and synonym_table represents a synonym in the current table space which accesses another Oracle table using a database link.
Is this possible?

http://asktom.oracle.com/pls/ask/f?p=4950:8:15261108079829288196::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:950029833940

Similar Messages

  • Synonym across a database link

    Hi Oracle Gurus,
    Heres my requirement, -
    a] I have two databases ('x' & 'y').
    b] On x, I have two schemas ('a' & 'b'), while on 'y', I have
    only 1 schema ('c').
    c] I have created a synonym in 'b' for all the objects in 'c'
    using a database link.
    d] Now, on 'b', I am able to access the packages and tables
    (only select, - cant describe the tables, since this is not
    allowed). that belong to 'c' using the synonyms created.
    e] I am now having to create another set of synonyms in 'a'
    for the synonyms in 'b'. Essentially, the purpose is to
    access the objects in 'c', but not directly.
    Oracle is complaining here saying that it does not have
    access to creating these synonyms.
    It appears, the first level of synonym across a database
    link is acceptable, but not the second level
    Is there any solution for this? I do have a constraint
    because of which I am not being able to create a synonym
    from a directly to c.
    Graphically..
    DB x DB y
    Schema a
    |
    Synonym for synonyms in b (to access objects in c)
    Oracle doesnt allow me to create this.
    |
    v
    Schema b <--Synonyms using DBLINK--> Schema c
    No problems
    I would appreciate any help on this issue.
    Thanks
    Ravi Kumar

    When you say "Oracle complains" I assume you're getting an error message. If you'd told us what it is that when help with the diagnosis. However, I going to guess that it's ORA 4043. This is because you can only create synonyms for objects like tables or views, you cannot create a synonymn on a synonym.
    (pedantically you can create those synonyms - that's because Oracle allows you to create synonyms for tables that don't exist - you just can't use them).
    rgds, APC

  • How to release FSG reports without using Program - FSG Transfer across a database link

    Hi,
    Our project development team have built some reports to meet the requirements of the business customer using Financials Statement Generator (FSG) as part of an implementation of Oracle E-Business Suite (EBS) release 12.1.3.
    We know we can use the Program - FSG Transfer across a database link to move the reports from development to another environment.
    Oracle General Ledger User's Guide
    Copying Report Objects From Another database (FSG Transfer Program)
    http://docs.oracle.com/cd/E18727_01/doc.121/e13627/T312864T313620.htm#I_tx2Dfsgx2Dimpex78
    However our production environment is on a different network. Therefore this solution will not work since a database link cannot be created from production to the non production databases. Obviously I am asking the network solution architects to consider how to join the networks but do'nt hold out much hope. Has anyone got an alternative solution?
    FYI We have considered extracting the report definition, row sets, column sets etc from the back end database tables then transforming that into end user key strokes to simulate what someone would do to create such a report from scratch using the front end forms using a tool such as data loader which I believe has no licence cost implications. We dont have a lot of time so would be interested to know if anyone had any success with an alternative method such as this.
    P.S. I had found this question asked already by someone else but without an answer so i am trying again today.
    Transfer FSG Report without using FSG Transfer program.

    Look here for a potential way: Re: Calling table function on remote server - possible?

  • Creation of view with clob column in select and group by clause.

    Hi,
    We are trying to migrate a view from sql server2005 to oracle 10g. It has clob column which is used in group by clause. How can the same be achived in oracle 10g.
    Below is the sql statament used in creating view aling with its datatypes.
    CREATE OR REPLACE FORCE VIEW "TEST" ("CONTENT_ID", "TITLE", "KEYWORDS", "CONTENT", "ISPOPUP", "CREATED", "SEARCHSTARTDATE", "SEARCHENDDATE", "HITS", "TYPE", "CREATEDBY", "UPDATED", "ISDISPLAYED", "UPDATEDBY", "AVERAGERATING", "VOTES") AS
      SELECT content_ec.content_id,
              content_ec.title,
              content_ec.keywords,
              content_ec.content content ,
              content_ec.ispopup,
              content_ec.created,
              content_ec.searchstartdate,
              content_ec.searchenddate,
            COUNT(contenttracker_ec.contenttracker_id) hits,
              contenttypes_ec.type,
              users_ec_1.username createdby,
              Backup_Latest.created updated,
              Backup_Latest.isdisplayed,
              users_ec_1.username updatedby,
              guideratings.averagerating,
              guideratings.votes
         FROM users_ec users_ec_1
                JOIN Backup_Latest
                 ON users_ec_1.USER_ID = Backup_Latest.USER_ID
                RIGHT JOIN content_ec
                JOIN contenttypes_ec
                 ON content_ec.contenttype_id = contenttypes_ec.contenttype_id
                 ON Backup_Latest.content_id = content_ec.content_id
                LEFT JOIN guideratings
                 ON content_ec.content_id = guideratings.content_id
                LEFT JOIN contenttracker_ec
                 ON content_ec.content_id = contenttracker_ec.content_id
                LEFT JOIN users_ec users_ec_2
                 ON content_ec.user_id = users_ec_2.USER_ID
         GROUP BY content_ec.content_id,
         content_ec.title,
         content_ec.keywords,
         to_char(content_ec.content) ,
         content_ec.ispopup,
         content_ec.created,
         content_ec.searchstartdate,
         content_ec.searchenddate,
         contenttypes_ec.type,
         users_ec_1.username,
         Backup_Latest.created,
         Backup_Latest.isdisplayed,
         users_ec_1.username,
         guideratings.averagerating,
         guideratings.votes;
    Column Name      Data TYpe
    CONTENT_ID     NUMBER(10,0)
    TITLE          VARCHAR2(50)
    KEYWORDS     VARCHAR2(100)
    CONTENT          CLOB
    ISPOPUP          NUMBER(1,0)
    CREATED          TIMESTAMP(6)
    SEARCHSTARTDATE     TIMESTAMP(6)
    SEARCHENDDATE     TIMESTAMP(6)
    HITS          NUMBER
    TYPE          VARCHAR2(50)
    CREATEDBY     VARCHAR2(20)
    UPDATED          TIMESTAMP(6)
    ISDISPLAYED     NUMBER(1,0)
    UPDATEDBY     VARCHAR2(20)
    AVERAGERATING     NUMBER
    VOTES          NUMBERAny help realyy appreciated.
    Thanks in advance
    Edited by: user512743 on Dec 10, 2008 10:46 PM

    Hello,
    Specifically, this should be asked in the
    ASP.Net MVC forum on forums.asp.net.
    Karl
    When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer.
    My Blog: Unlock PowerShell
    My Book: Windows PowerShell 2.0 Bible
    My E-mail: -join ('6F6C646B61726C40686F746D61696C2E636F6D'-split'(?<=\G.{2})'|%{if($_){[char][int]"0x$_"}})

  • Can statements inside a package refer to database links

    Hi all
    I was just curious to know, what will happen in this case
    CREATE OR REPLACE PACKAGE BODY "TESTUSER"."TESTPKG" as
    procedure testproc is
    n number := 0;
    begin
    select count(*) into n from ps_tab@dblink;
    end;
    end testpkg;';
    Is it valid to have dblink inside a package body?
    Regards
    Edited by: user13332773 on Mar 6, 2011 10:26 PM

    user13332773 wrote:
    Hi all
    I was just curious to know, what will happen in this case
    CREATE OR REPLACE PACKAGE BODY "TESTUSER"."TESTPKG" as
    procedure testproc is
    n number := 0;
    begin
    select count(*) into n from ps_tab@dblnk;
    end;
    end testpkg;';
    Is it valid to have dblink inside a package body?
    RegardsSure it is. You can have a database link inside a package code. Moreover, you'll get the name of that database link in the REFERENCED_LINK_NAME column of the DBA_DEPENDENCIES view
    Kamran Agayev A.
    Oracle ACE
    My Oracle Video Tutorials - http://kamranagayev.wordpress.com/oracle-video-tutorials/

  • Can we create pl/sql code over database link?

    Hi All,
    We are using Oracle 9i database.
    I want to know if we can create or modify pl/sql code (procedue, package, etc) over the database link? That means - can we create a procedure in remote database using the db link?
    Thanks,
    Dnyanesh

    yes, I can connect to the remote database directly and create/modify the packages.
    But I want the users not to create them using the db link.
    Is there any way to create the pl/sql package over database link?
    Thanks,
    Dnyanesh

  • Can i limit the selection in Logical database ?

    hello  ,
    how can i limit the number of records in Logical
                                  database ( my "yyf"  , not standart )   ?
    i get dump on memory  , when i press F4 , becouse i have to many records ,
    so how can i limit the amount of records .
    in se36 ?
    in my program  ( se38 ) ?
    dump description
    &INCLUDE INCL_INSTALLATION_ERROR
    The current program had to be terminated because of an
    error when installing the R/3 System.
    The program had already requested 386785568 bytes from the operating
    system with 'malloc' when the operating system reported after a
    further memory request that there was no more memory space
    available.

    Hi ,
    Hope this helps you .
      SELECT roll name
      FROM tab
      INTO TABLE it_tab.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield        = 'ROLL'
          dynpprog        = sy-repid
          dynpnr          = sy-dynnr
          dynprofield     = 'P_ROLL'
          value_org       = 'S'
        TABLES
          value_tab       = it_tab
        EXCEPTIONS
          parameter_error = 1
          no_values_found = 2
          OTHERS          = 3.

  • Updating across a database link

    Our App Ex is on a 10g database, but I'm updating a table on a 9i database. If I try to use bind variables, ie values directly from the AppEx form or :APP_USER, I get the following error:
    ORA-01461 -
    can bind a LONG value only for insert into a LONG column
    I don't have any long values: the table fields are varchar2, and the form fields are text.
    We've got round the problem by feeding the form fields into declared variables, and updating the table from those variables
    Is this a known bug? Is it because it's a db link, or because the dbs are different versions?
    Any ideas, anyone?

    It's not doing anything sophisticated.
    Table is doc_products_lookup,
    The fields I'm updating are
    PRODUCT_DESCRIPTION NOT NULL VARCHAR2(40)
    LAST_UPDATED_DATE NOT NULL DATE
    LAST_UPDATED_BY NOT NULL VARCHAR2(20)
    SQL was
    'update doc_products_lookup@[viewname]
    set PRODUCT_DESCRIPTION = :P30_DESCRIPTION,
    LAST_UPDATED_DATE = sysdate,
    LAST_UPDATED_BY = :APP_USER
    where product_code = :P30_CODE;'
    the :P30 fields are described as text on the screen.

  • Select query over database link hanging

    Hi All,
    I have been looking all over the internet and all over this forum but i could not find the solution for my issue given below.
    There are a number of distributed databases (Oracle 10g) over a private network. Sending and receiving data amongst all the databases work fine. But when one particular database A tries to receive data from database B, it hangs and then the famous old error TNS LOST CONTACT.
    Basically, this has been implemented by creating a batchjob. This worked fine for years and now suddenly this is not working only for the two specific databases.
    It is just a simple select query being hit on the remote database. This is called through a function in the package, which builds the dynamic select query using DBMS_SQL package.
    It actually hangs when doing DBMS_SQL.PARSE ();
    The same function when called in a pl/sql block from database A, works perfectly fine and receives the required data from database B. This was tried with Oracle SQLDeveloper, TOAD and SQLPLUS.
    Things seems to be working fine, but actually unaware of the problem. I tried all the suggestions provided over the metalink also.
    Require your help urgently.
    Thanks
    Akhil.

    Hi Rajat,
    The user uses DEFAULT profile. The details of the parameter are:
    PROFILE RESOURCE_NAME RESOURCE_TYPE LIMIT
    DEFAULT COMPOSITE_LIMIT KERNEL UNLIMITED
    DEFAULT SESSIONS_PER_USER KERNEL UNLIMITED
    DEFAULT CPU_PER_SESSION KERNEL UNLIMITED
    DEFAULT CPU_PER_CALL KERNEL UNLIMITED
    DEFAULT LOGICAL_READS_PER_SESSION KERNEL UNLIMITED
    DEFAULT LOGICAL_READS_PER_CALL KERNEL UNLIMITED
    DEFAULT IDLE_TIME KERNEL UNLIMITED
    DEFAULT CONNECT_TIME KERNEL UNLIMITED
    DEFAULT PRIVATE_SGA KERNEL UNLIMITED
    DEFAULT FAILED_LOGIN_ATTEMPTS PASSWORD 10
    DEFAULT PASSWORD_LIFE_TIME PASSWORD UNLIMITED
    DEFAULT PASSWORD_REUSE_TIME PASSWORD UNLIMITED
    DEFAULT PASSWORD_REUSE_MAX PASSWORD UNLIMITED
    DEFAULT PASSWORD_VERIFY_FUNCTION PASSWORD NULL
    DEFAULT PASSWORD_LOCK_TIME PASSWORD UNLIMITED
    DEFAULT PASSWORD_GRACE_TIME PASSWORD UNLIMITED
    Thanks
    Akhil

  • Since upgrading to firefox ver. 3.6.8 can't upload files to Google Docs, whose help forum indicates many firefox users are having this problem since upgrading to 3.6.8: You can click on the "Select files to upload" link but nothing happens.

    Right-clicking on the link doesn't offer options to open anywhere (new tab, etc.)

    There is a problem with uploading files to Google docs in Firefox 3.6x versions.
    http://www.google.com/support/forum/p/Google+Docs/thread?tid=4f0369bdcf6fd7ff&hl=en "Select files to upload" not working in Firefox - Google Docs Help (Thanks to Joolsa for the link)

  • Slow delete on a table with one CLOB column

    Hi,
    I have a table which has one CLOB column and even if I delete one row from it, it takes approx. 16 seconds. Since UNDO isn't generated for CLOBs (at least not in the UNDO tablespace), I can't figure out why this is so? The CLOB has defined a RETENTION clause, so it depends upon UNDO_RETENTION which is set to 900. There wasn't any lock from another session present on this table.
    The table currently contains only 6 rows but it used to be bigger in the past, so I thought that maybe a full table scan is going on when deleting. But even if I limit the DELETE statement with an ROWID (to avoid a FTS), it doesn't help:
    SQL> select * from v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
    PL/SQL Release 11.1.0.6.0 - Production
    CORE    11.1.0.6.0      Production
    TNS for 32-bit Windows: Version 11.1.0.6.0 - Production
    NLSRTL Version 11.1.0.6.0 - Production
    SQL> select count(*) from scott.packet;
      COUNT(*)
             6
    SQL> column segment_name format a30
    SQL> select segment_name
      2    from dba_lobs
      3  where owner = 'SCOTT'
      4     and table_name = 'PACKET';
    SEGMENT_NAME
    SYS_LOB0000081487C00002$$
    SQL>  select segment_name, bytes/1024/1024 MB
      2    from dba_segments
      3  where owner = 'SCOTT'
      4      and segment_name in ('PACKET', 'SYS_LOB0000081487C00002$$');
    SEGMENT_NAME                           MB
    PACKET                               ,4375
    SYS_LOB0000081487C00002$$             576
    SQL> -- packet_xml is the CLOB column
    SQL> select sum(dbms_lob.getlength (packet_xml))/1024/1024 MB from scott.packet;
            MB
    19,8279037
    SQL> column rowid new_value rid
    SQL> select rowid from scott.packet where rownum=1;
    ROWID
    AAAT5PAAEAAEEDHAAN
    SQL> set timing on
    SQL> delete from scott.packet where rowid = '&rid';
    old   1: delete from scott.packet where rowid = '&rid'
    new   1: delete from scott.packet where rowid = 'AAAT5PAAEAAEEDHAAN'
    1 row deleted.
    Elapsed: 00:00:15.64From another session I monitored v$session.event for the session performing the DELETE and the reported wait event was 'db file scattered read'.
    Someone asked Jonathan Lewis a similar looking question (under comment #5) here: http://jonathanlewis.wordpress.com/2007/05/11/lob-sizing/ but unfortunately I couldn't find if he wrote any answer/note about that.
    So if anyone has any suggestion, I'll appreciate it very much.
    Regards,
    Jure

    After reviewing the tkprof as suggested by user503699, I noticed that the DELETE itself is instantaneous. The problem is another statement:
    select /*+ all_rows */ count(1)
    from
    "SCOTT"."MESSAGES" where "PACKET_ID" = :1
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          2           0
    Execute      1      0.00       0.00          0          0          0           0
    Fetch        1      1.40      16.93     125012     125128          0           1
    total        3      1.40      16.93     125012     125128          2           1
    Misses in library cache during parse: 1
    Misses in library cache during execute: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: SYS   (recursive depth: 1)
    Rows     Row Source Operation
          1  SORT AGGREGATE (cr=125128 pr=125012 pw=125012 time=0 us)
          0   TABLE ACCESS FULL MESSAGES (cr=125128 pr=125012 pw=125012 time=0 us cost=32900 size=23056 card=5764)I checked if there was any "ON DELETE" trigger and since there wasn't, I suspected this might be a problem of unindexed foreign keys. As soon as I created an index on SCOTT.MESSAGES.PACKET_ID the DELETE executed immediately. The "funny" thing is that, the table SCOTT.MESSAGES is empty, but it has allocated 984MB of extents (since it wasn't truncated), so a time consuming full tablescan was occurring on it.
    Thanks for pointing me to the 10046 trace which solved the problem.
    Regards,
    Jure

  • Loading UTF-8 String into CLOB column

    Hello!
    I am trying to load UTF-8 encoded strings into a CLOB column in an Oracle 9i database from VB.Net using ODP.Net (9.2.0.414).
    The strings are XML snippets (Microsoft WordML to be precise). Each corresponds to a record which already exists in the database, therefore I do an update to add the UTF-8 string.
    Some of the XML snippets contain characters which once inserted look like upside down question marks (characters represented by 0x92 and 0x96 for example end up as 0xBF once in the database).
    Setting breakpoints in Visual Studio, I can watch the string values in the 'Locals' window and they appear correct (in fact I can copy from the 'Locals' window and using a tool such as TOAD can paste the strings into the database successfully). Pasting through TOAD, the characters are properly represented in the database (ie 0x92 is 0x92).
    I've tried a number of approaches with no luck.
    Any advice/suggestion are most welcome. Thanks!
    Here is my code:
    strConnectionString = ConfigurationSettings.AppSettings.Item("ConnectionString")
    strComponentsTable = ConfigurationSettings.AppSettings.Item("ComponentsTable")
    objConnection = New OracleConnection(strConnectionString)
    objCommand = objConnection.CreateCommand()
    objCommand.CommandType = CommandType.Text
    objCommand.CommandText = "UPDATE " & strComponentsTable & " SET TEMPLATE_COMPONENT_CONTENT = :p_content WHERE TEMPLATE_COMPONENT_ID = :p_id"
    objConnection.Open()
    For Each strId In objComponents.Keys
    strContent = objComponents.Item(strId)
    objCommand.Parameters.Clear()
    objParameter = objCommand.CreateParameter()
    objParameter.ParameterName = "p_content"
    objParameter.OracleDbType = OracleDbType.Clob
    objParameter.Direction = ParameterDirection.Input
    objParameter.Value = strContent
    objCommand.Parameters.Add(objParameter)
    objParameter = objCommand.CreateParameter()
    objParameter.ParameterName = "p_id"
    objParameter.OracleDbType = OracleDbType.Int32
    objParameter.Direction = ParameterDirection.Input
    objParameter.Value = CInt(strId)
    objCommand.Parameters.Add(objParameter)
    intResult = objCommand.ExecuteNonQuery()
    Next

    Some further research has revealed the following:
    Two of the characters I provided as examples of not being stored properly in the database are (in Unicode) U+2013 and U=2019. These characters, encoded as UTF-8 should each be three bytes (0xE2 80 93 and 0xE2 80 99 respectively). Sent via VB.Net and ODP.Net they both end up in the database as one byte each (0xBF). Copy and Pasted via TOAD they end up as one byte each (0x92 and 0x96 respectively).
    The NLS settings on the server side are:
    NLS_CHARACTERSET = WE8ISO8859P1
    NLS_NCHAR_CHARACTERSET = AL16UTF16
    I have tried using both CLOB and NCLOB column with the results being identical.
    Not sure what else to try...

  • Query the column names from Public database links

    Greetings,
    I would like to retrieve the list of all the column names from a public database link. A regular ALL_TAB_COLUMNS doesn't seem to be working.
    Thanks
    John9569

    Hi,
    I think your DBA needed to create a synonym for you to have access of that remote database view.
    CREATE SYNONYM synonym_name
    FOR view_name@db_link;Then you can find the column names by
    DESC   synonym_nameGuru's , please correct me If I am wrong.
    Thanks
    Edited by: user10679113 on Mar 12, 2009 12:28 PM
    Edited by: user10679113 on Mar 12, 2009 12:33 PM

  • Column reference over database link.

    Hi,
    Is it possible to reference a table column across a database link?
    Ex: var1 table.column%TYPE@dblink
    Thanks
    Chad

    Chad,
    Glad it worked ..
    Taking this thread a step further ..
    If you have the privileges to create synonyms then you could do the following:
    create synonym mySynonym
    for table@dblink
    Then use the synonym in the PL/SQL code as follows:
    var1 mySynonym.column%TYPE;
    This will avoid repetitive typing of table.column@dblink and if the dblink name changes then you have to make the change in only one place - the synonym
    Shakti
    http://www.impact-sol.com
    Developers of Guggi Oracle - Tool for DBAs and Developers

  • OWA_UTIL and HTP across database link

    Has anyone figured out how to use the features of OWA_UTIL, such as listprint, across a database link? I can create a drop list on data that is in the portal instance. But if I try to create a list based on a table in a back-end database through a database link, it generates errors.
    Also, I create a procedure to generate a dynamic page portlet using htp calls and it works fine if the procedure is located in the portal instance. But move the code to the back-end database and access via a synonym and database link and it generates errors out of the owa_util package.

    Create a view on your local db using tables over the db link and base your list on that view.

Maybe you are looking for

  • When to use the new file based content repository

    In Service Pack 4 there's a new implementation of the CMSPI interfaces which is configured by using the following implementation class: com.bea.content.spi.internal.FileSystemRepositoryImpl When should one use this new file based repository versus th

  • Oracle Certification

    Guys.      I am planning oracle certified associate in PL/SQL Developer for oracle 11g. Then i went into the following link http://education.oracle.com/pls/web_prod-plq-dad/db_pages.getpage?page_id=39 Then selected Application Developer -> Database -

  • ASM instance backup

    Hello All, I am using Oracle RAC 11g R2 + ASM. I have basic below 2 questions concerning ASM and OCR and voting disks data 1. Is there any way to backup the ASM instance? Is that needed in a production environment? What is the best way to do that ? i

  • Newbie question - DNG

    I'm not trying to cross post (I mistakenly posted this question in the wrong forum) 'I'm trying out LR and I'm liking it for the most part, I'm still delving into the app and I know I'm only scratching the surface but one question I have (right now)

  • IPSec S2S tunnel can not up

    We have about 9 1900 routers and 1 ASA 5510 for partail mesh VPN network. So 8 1900 connect to 1 1900 and ASA located in HQ and datacenter. All worked well however there is one site running really strange. The tunnel between 1900 is up for a while an