Create readonly dblink

Dear,
i would like to create a dblink from one db to another with read only permission but seems could not find anything in the doc
regarding readonly dblink.
Please help if you know to create a read only dblink.
Thanks,
Tom

Tom,
I fail to see the problem.
Ideally one doesn't specify the user at all in the connect to clause of the create database link command.
In that case Oracle will use the username and password of the current user and use it to connect to the target database.
The other alternative is to setup a specific user in the target database and to hardcode this user in the create database link command in the source database.
I fail to see why this shouldn't work in your situation.
Sybrand Bakker
Senior Oracle DBA

Similar Messages

  • Problem while selecting a table after creating the dblink

    Hi,
    We have created the dblink for oracle to sql server and it created successfully,
    But while selecting the table from oracle we are getting the below issue,
    select * from "sysdiagrams"@omniyat;
    ERROR at line 1:
    ORA-00942: table or view does not exist
    [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name
    'sysdiagrams'. {42S02,NativeErr = 208}[Microsoft][ODBC SQL Server Driver][SQL
    Server]Statement(s) could not be prepared. {42000,NativeErr = 8180}
    ORA-02063: preceding 2 lines from OMNIYAT
    Kindly provide us the solution to resolve this issue.
    Regards
    Sham

    Please see:
    Odbc Connection From Oracle To SQL*Server Fails With Errors Ora-28546 and Ora-2063 When Using Connection via Database Link. (Doc ID 1389492.1)
    To BottomTo Bottom
    Error 08001,NativeErr = 11 Instance Invalid or Not Running Connecting to SQL*Server Using Dg4MSQL (Doc ID 1349023.1)
    How to Resolve Common Errors Encountered while using Database Gateways (DG4IFMX, Dg4MSQL, DG4SYBS), DG4ODBC or Generic Connectivity (Doc ID 234517.1)
    Thanks,
    Hussein

  • Create a dblink oracle to postgres with dg4odbc

    Hi,
    I'm trying to create a dblink from a database Oracle (10.2.0.3) to PostgreSQL database (8.3.11) with DG4ODBC (11.2.0.1.0).
    I've installed the postgres driver 64 bit :
    file /usr/lib64/psqlodbc.so
    /usr/lib64/psqlodbc.so: ELF 64-bit LSB shared object, AMD x86-64, version 1 (SYSV), strippedI'm configuring the /oracle/.odbc.ini :
    [record]
    Driver=/usr/lib64/psqlodbc.so
    Description  = PostgreSQL ODBC
    Servername       = cdxlan035
    Port         = 5435
    Username         = rec_lct
    Password     = rec_lct
    Database     = REC_TESTI'm configuring the /oracle/product/DG4ODBC/hs/admin/initrecord.ora like this :
    # HS init parameters
    HS_FDS_CONNECT_INFO = record
    HS_FDS_TRACE_LEVEL = 4
    HS_FDS_TRACE_FILE_NAME = /oracle/product/DG4ODBC/hs/log/hsodbc.trc
    HS_FDS_SHAREABLE_NAME = /usr/lib64/psqlodbc.so
    # ODBC specific environment variables
    set ODBCINI=/oracle/.odbc.iniI'm configuring the /oracle/product/DG4ODBC/network/admin/listener.ora
    LISTENER_HS =
      (DESCRIPTION_LIST =
        (DESCRIPTION =
          (ADDRESS = (PROTOCOL = TCP)(HOST = cdxlan036.douane)(PORT = 1525))
    ADR_BASE_LISTENER_HS = /oracle/product/DG4ODBC
    SID_LIST_LISTENER_HS =
      (SID_LIST =
        (SID_DESC =
          (PROGRAM = dg4odbc)
          (ORACLE_HOME = /oracle/product/DG4ODBC)
          (SID_NAME = record)
          (ENVS=LD_LIBRARY_PATH=/usr/lib64:/oracle/product/DG4ODBC/lib:/oracle/product/10.2.0/lib)
      )I'm updating my /oracle/product/10.2.0/network/admin/tnsnames.ora :
    RECORD2 =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = cdxlan036)(PORT = 1525))
        (CONNECT_DATA =
          (SID = record)
        (HS=OK)
       )In last i'm creating the dblink :
    CREATE  DATABASE LINK "RECORD"  CONNECT TO "rec_lct" IDENTIFIED BY "rec_lct"  USING 'RECORD2';When i'm trying to select my postgres database, that doesn't work. Here the /oracle/product/DG4ODBC/hs/log/record.log :
    [oracle@cdxlan036 log]$ cat record_agt_30445.trc
    Oracle Corporation --- MONDAY    FEB 27 2012 17:11:31.204
    Heterogeneous Agent Release
    11.2.0.1.0
    Oracle Corporation --- MONDAY    FEB 27 2012 17:11:31.204
        Version 11.2.0.1.0
    Entered hgogprd
    HOSGIP for "HS_FDS_TRACE_LEVEL" returned "4"
    Entered hgosdip
    setting HS_OPEN_CURSORS to default of 50
    setting HS_FDS_RECOVERY_ACCOUNT to default of "RECOVER"
    setting HS_FDS_RECOVERY_PWD to default value
    setting HS_FDS_TRANSACTION_LOG to default of HS_TRANSACTION_LOG
    setting HS_IDLE_TIMEOUT to default of 0
    setting HS_FDS_TRANSACTION_ISOLATION to default of "READ_COMMITTED"
    setting HS_NLS_NCHAR to default of "AL32UTF8"
    setting HS_FDS_TIMESTAMP_MAPPING to default of "DATE"
    setting HS_FDS_DATE_MAPPING to default of "DATE"
    setting HS_RPC_FETCH_REBLOCKING to default of "ON"
    setting HS_FDS_FETCH_ROWS to default of "100"
    setting HS_FDS_RESULTSET_SUPPORT to default of "FALSE"
    setting HS_FDS_RSET_RETURN_ROWCOUNT to default of "FALSE"
    setting HS_FDS_PROC_IS_FUNC to default of "FALSE"
    setting HS_FDS_CHARACTER_SEMANTICS to default of "FALSE"
    setting HS_FDS_MAP_NCHAR to default of "TRUE"
    setting HS_NLS_DATE_FORMAT to default of "YYYY-MM-DD HH24:MI:SS"
    setting HS_FDS_REPORT_REAL_AS_DOUBLE to default of "FALSE"
    setting HS_LONG_PIECE_TRANSFER_SIZE to default of "65536"
    setting HS_SQL_HANDLE_STMT_REUSE to default of "FALSE"
    setting HS_FDS_QUERY_DRIVER to default of "TRUE"
    setting HS_FDS_SUPPORT_STATISTICS to default of "FALSE"
    Parameter HS_FDS_QUOTE_IDENTIFIER is not set
    setting HS_KEEP_REMOTE_COLUMN_SIZE to default of "OFF"
    setting HS_FDS_GRAPHIC_TO_MBCS to default of "FALSE"
    setting HS_FDS_MBCS_TO_GRAPHIC to default of "FALSE"
    Default value of 64 assumed for HS_FDS_SQLLEN_INTERPRETATION
    setting HS_CALL_NAME_ISP to "gtw$:SQLTables;gtw$:SQLColumns;gtw$:SQLPrimaryKeys;gtw$:SQLForeignKeys;gtw$:SQLProcedures;gtw$:SQLStatistics;gtw$:SQLGetInfo"
    setting HS_FDS_DELAYED_OPEN to default of "TRUE"
    setting HS_FDS_WORKAROUNDS to default of "0"
    Exiting hgosdip, rc=0
    ORACLE_SID is "record"
    Product-Info:
      Port Rls/Upd:1/0 PrdStat:0
      Agent:Oracle Database Gateway for ODBC
      Facility:hsa
      Class:ODBC, ClassVsn:11.2.0.1.0_0008, Instance:record
    Exiting hgogprd, rc=0
    Entered hgoinit
    HOCXU_COMP_CSET=1
    HOCXU_DRV_CSET=31
    HOCXU_DRV_NCHAR=873
    HOCXU_DB_CSET=31
    HOCXU_SEM_VER=102000
    Entered hgolofn at 2012/02/27-17:11:31
    HOSGIP for "HS_FDS_SHAREABLE_NAME" returned "/usr/lib64/psqlodbc.so"
    Entered hgolofns at 2012/02/27-17:11:31
    libname=/usr/lib64/psqlodbc.so, funcname=SQLAllocHandle
    peflerr=6521, libname=/usr/lib64/psqlodbc.so, funcname=SQLAllocHandle
    hoaerr:28500
    Exiting hgolofns at 2012/02/27-17:11:31
    Failed to load ODBC library symbol: /usr/lib64/psqlodbc.so(SQLAllocHandle)
    Exiting hgolofn, rc=28500 at 2012/02/27-17:11:31
    Exiting hgoinit, rc=28500 with error ptr FILE:hgoinit.c LINE:337 FUNCTION:hgoinit() ID:Loading ODBC aray of function ptrs
    Entered hgoexit
    HS Gateway:  NULL connection context at exit
    Exiting hgoexit, rc=0 with error ptr FILE:hgoexit.c LINE:108 FUNCTION:hgoexit() ID:Connection contextWhat's wrong with my configuration?
    thanks for your help
    regards,
    Mathieu

    HS_FDS_SHAREABLE_NAME needs to point to the ODBC driver manager. Commonly the ODBC driver manager is a separate library (common name is libodbc.so). It can be downloaded for example from unixodbc.org. Only a few rare ODBC drivers (some ODBC drivers from MySQL and also some IBM DB2 drivers have a built in ODBC driver manager into the ODBC driver itself, all other require a stand alone ODBC driver manager).
    Background info:
    In general the ODBC set up consists of 2 parts, an ODBC driver manager and an ODBC driver itself. The ODBC driver manager is providing generic ODBC functions and it is also responsible to load the driver specified in the odbc.ini file. The ODBC driver itself is then dedicated for a foreign database and provides specific foreign database functions.

  • How to create readonly backup

    I  have one Database, and I want to create one readonly backup so that If give that to someone they can just read the Data. Can we do this in sql server.
    Regards Vikas Pathak

    I  have one Database, and I want to create one readonly backup so that If give that to someone they can just read the Data. Can we do this in sql server.
    Regards Vikas Pathak
    You cannot create readonly backup in SQL Server as a fact there is no concept of read only backup. If you give somebody your backup they can see data and can restore and modify it but that wont affect your original database unless you restore that backup on
    prod server
    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it
    My Technet Wiki Article
    MVP

  • How to create a dblink

    HI,
    Here there are two databases A and B.
    The Database A is the one where I am working. I need to get a data from Database B by connecting thru DB link.
    Database
    A
    Table1
    DataBase
    B
    Table2
    I had to get data from database (B) Table2 and insert it in database (A) table1.
    For that do I need any priviliges to create DB link
    Any example will really help me.
    Thanks in advance

    How to know whether my dblink is active or not
    This is my TNS entry
    hello =
    (DESCRIPTION = (ADDRESS = (PROTOCOL=TCP)(HOST=hello.com)(PORT=1550))
    (CONNECT_DATA = (SID = orcl))
    create database link link1
    connect to scott identified by tiger
    using 'orcl';
    when i am executing the below querry its errored out.
    Error:TNS could not resolve the connect identifier specified.
    I am connecting to client server thats different server. Do i need to have some privileges and any parametrs to set.
    Thanks

  • How to create a DBlink from oracle database on unix to sqlserver

    Hi
    I need to create a database link from oracle database on solaris machine to sqlserver database.I found that the database link cannot be created from oracledatabase 10g to microsoft sqlserver.So i am planning to go for another windows server where i can pull this data from sqlserver to oracle 10g database on windows and then from windows to unix.
    Can you explain me how can i create a database link from orace 10g on windows to sqlserver.

    HI
    Thanks for your response.
    But the thing is i am looking whether if u can create a database link from oracle to sqlserver from unix.If that's the case what is the driver i require and if not how can i do it ?
    I am ready to create a intermediate windows server where i can pull the table temporarily and then from there to unix box.
    If i can do it windows how can i achieve that.
    Thanks

  • Steps to create readonly credential for BPEL console

    Hi,
    I would like to create read only user for BPEL, ESB, EM Console. Please share me steps to create the same. And also let me know how to disable the radio buttons for read only user, for example "Abort, Cancel, Delete, Migrate, Resume" buttons that are available under Instance tab in BPEL Console web page.
    Let me know in case of anything else required from my side so that i can provide the same.
    Regards,
    Sachikanta

    Thanks a Lot Arik,
    Sorry I forgot to mention the version of BPEL we are currently using. We are using 10.1.3.5 version as of now and we are not using weblogic server. So my doubt here whether i can follow same document for 10.1.3.5 version...? I mean the below url what you have provided will work for 10.1.3.5 version, because i can see it's for v11G.
    http://docs.oracle.com/cd/E21764_01/oid.1111/e10029/oracle_and_oid.htm
    http://docs.oracle.com/cd/E21764_01/web.1111/e13710/realm_chap.htm
    Please advise.
    Regards,
    Sachikanta
    Edited by: 933131 on Jul 9, 2012 5:25 AM

  • Trying to create Readonly Smartview user - HFM 9.3.1, SV 11.2.3

    If I grant a test user in Native Directory (only) Application Administrator, they can then refresh Smartview enabled Excel spreadsheets.
    I've tried breaking down the role and granting the user each and every individual right that comprises the Application Administrator Role and the user still cannot refresh the spreadsheet.
    Any ideas?
    Thanks, Mike

    You are in 9.3.x right?  Workbench is an FDM utility so it would not play in here, you would be in shared services and you would go to Projects and select the HFM application, right click on the app and go to provision. I'm pretty sure, it's been a while since I've been in 9.3
    As far as if it is on the actual entity, that is entirely application specific, security classes can be assigned to any dimension (I Don't think you can do period or year) but they can be on scenarios, accounts, customs, this would be defined in the HFM metadata.
    Regards
    JTF

  • I can't create form using dblink

    I have created a dblink (public) pointing to a table in the remote database. Also I have created some reports using this dblink and it works fine. The problem is that when I create a form based on table or view using this dblink, I get the error "page not found".
    Can anybody help me?
    Thanks!!

    You need to create the link in the public schema. I can't remember if you also have to create the form in the public schema though I don't think that is the case. Remember to grant public access to the link.

  • We can't create form using dblink  and synonim

    We have created a dblink pointing to a table in the remote database.
    When we create a form based on table or view using this dblink, we get the error "page not found".
    We read from
    Re: I can't create form using dblink
    that we must create a synonim, and this was done creating one in the same schema of the db-link using the "Database Objects" of oracle portal 10g (external db is an oracle 9.0.2).
    The new synonim work (tested with reports and pl/sql page)
    but if we click on "Grant Access" (of the synonim) we get the following error :
    Error: The underlying object of the synonym does not exist, is a remote object or is not of type function, procedure, package, sequence, synonym, table or view. (WWV-17076)
    Does form work only with table and view of the portal database (not external one)? or have we loose something in the creation of the synonim?
    Have someone succesfully created a form based on a db-link towards an external database?
    Thanks to all.

    Hei guys, has nobody created succesfully a data-driven forms based on a dblink towards an external database?
    I can't believe this!!!!

  • How to create and Pass DBLINK name at the run time

    Hi,
    Please help me out ....
    ACCEPT DB_USER PROMPT 'Enter the DB user name :'
    like this i will get the DB_USER name and i want to create one dblink with that userbame at the runtime
    and in all my .sql file i have to append that user name and dblink .. how to do this ....
    for example ,
    1.sql file contains a query like this
    select *
    from <user>.emp@<dblink>
    where ename= 'KING'
    ACCEPT DB_USER PROMPT 'Enter the DB user name :'
    user enter : SCOTT
    and the dblink should create a name like SCOTT_DBLINK
    and it should make the select clause in the .sql file as
    SELECT *
    FROM SCOTT.EMP@SCOTT_DBLINK
    WHERE ename = 'KING';

    Hi,
    Do you want to actually CREATE DATABASE LINK on the fly? - Don't there are all sorts of implications there.
    If not, go ahead and read about [SQL*Plus Substitution Variables|http://www.oracle.com/technology/support/tech/sql_plus/htdocs/sub_var.html]
    Regards
    Peter

  • Can a dblink be created with select only privilege

    I have created dblink from one instance to another instance.With dblink we can perform dml operations on a table.But i want to restrict insert,update,delete rights and grant only select.Is this possible

    my problem is there is a user named ABC in mango instance with >insert,update,delete privs.
    there is another user CDE in apple instance with insert,update,delete privs.
    Now i have created a dblink on user ABC to CDE as a fixed user.So now user >ABC can do all insert,update,delete operations on user CDE tables.This I want to >restrict.I want user ABC to just view CDE tables instead of update,insert and >delete operations. Create a new user CDE1 and grant select only privilege on all tables of CDE.
    create a dblink using CDE1 this will solve the issue?
    Justin explains the same in his previous reply.
    HTH

  • Creating Dblink

    Dear Experts,
    I am using given bellow Query to create remote Dblink
    create public database link TEST
    connect to home
    identified by <pwd>
    using 'dbhome.WORLD';
    when i try to retrieve rows from a table exist in home user thats giving me error
    ORA-12154: TNS:could not resolve the connect identifier specified
    waiting

    Hi,
    you should check youre tnsnames.ora file where that connect string should be.
    You wrote wrong name of db to which you ar trying to connect.
    Maybe is not dbhome.WORLD but just dbhome.
    Try tnsping dbhome.WORLD from command prompt on machine where is the database on which you are trying to create db link, and paste the output here if you wish.

  • Create dblink to a non-domain db

    How can i create a dblink from a domain db to a non-domain db.
    I keep getting the usual error:
    ORA-02085: database link DISP.world connects to DISP
    If i alter session set global_names = false
    then i can get DISP dblink to work but i mess up all the others.
    I have no control over the non-domain db i am trying to connect to so i cannot add this to a domain. Is there any way to work around this.
    My domain db is 8i while the other non-domain db is 9i
    James.

    What kind of objects are you creating over the dblink. If these are views or synonyms try the following:
    1) Alter system set global_names=false;
    2) CReate dblink;
    3) Create objects;
    4) alter system set global_names=true;
    Though 'select * from global_name@dblink' will not work but you will be able to select from the objects.

  • How to create dblink to sqlserver in unix?

    I have a oracle database(9i) running in unix server(AIX).
    and I need to create a dblink to sqlserver. So all clients can use this dblink to query data from sqlserver.
    Q:
    How to create dblink to sqlserver in unix?
    Thanks for your replys

    Hi dear ,
    I installed oracle db 10g R2 in Linux 4.
    then installed the Oracle client in Win2k3 Server.
    then made a odbc system dns for existing Sqlserver.
    Now setting a Heterogeneous connection in that for that
    my oracle service is orcl
    ssql service is sqlserver
    i started the listner
    checked tnsping , it was successful,
    then i created a link in oracle database
    when i make select query for a table i get the following error,
    can anyone give some idea why this error comes??
    ERROR:
    ORA-28545: error diagnosed by Net8 when connecting to an agent
    Unable to retrieve text of NETWORK/NCR message 65535
    ORA-02063: preceding 2 lines from SQLSERVER
    Thanks in Advance
    Regards
    Raja Kumar

Maybe you are looking for

  • No bluetooth mouse or keyboard on login on MacBook

    Dear experts, Over the weekend I made a fresh SL install (plus update to 10.6.1) onto a new harddisk on my white MacBook2,1. Imported my old users from the old 10.5.8 harddisk. So far things have been fine except for one: At the login screen my bluet

  • Please Help, Ipod Not Working Correctly

    Hi, I recentely downloaded an episode of monk, and when I went to put it on my iPod it doesn't work. I click it in the iPod, and then the screen goes blank and doesnt ever play, then it returns to the main screen after 30 seconds. How can I fix this?

  • WHT Vendor onaccount payment

    Hi friends, We want to pay a vendor on account payment but not advance payment(through f-48) and not against bills (f-53 or f-58).  We are trying to post through f-02.  Then tds is not proposing. Finally we want to pay onaccount payment but not throu

  • Library size differences; working Lib vs. TM backup vs. Vault

    My Aperture Library file is 81.5GB. On my TimeMachine Backup it is 55.47GB and the Aperture Vault shows 67.5 GB. I am aware that using Vault in Aperture the thumbnails don't backup, that's fine. My curiosity is why is the TimeMachine backup a differe

  • Illustrator 10 on Windows 7 PC

    I had Illustrator on a workstation running Windows XP Professional Service Pack 3. The OS crashed and I upgraded the workstation to Windows 7 Professional. I reinsallted Illustrator 10 and all seemed to go well - including activation.  When I go to r