Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword
Like this
8Activity
0 of .
Results for:
No results containing your search query
P. 1
What are the steps to create dblink

What are the steps to create dblink

Ratings: (0)|Views: 801|Likes:
Published by SHAHID FAROOQ

More info:

Published by: SHAHID FAROOQ on Aug 29, 2009
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less

12/17/2012

pdf

text

original

 
.
What are the steps to create dblink?
Oracle Server - Enterprise Edition - Version: 10.2.0.1 to 11.1.0.8Information in this document applies to any platform
Solution
Steps to create dblink:1)If you are creating public dblink, you will need a user with the following permissions:create public database link drop public database link If you are creating dblink, you will need a user with the following permission:create database link 2) Check the value of global_namesIf the value of the GLOBAL_NAMES initialization parameter is TRUE, then the database link musthave the same name as the database to which it connects.Please note: global_names is required to be TRUE for replication.SQL> set linesize 121SQL> col name format a30SQL> col value format a30SQL> SELECT name, valueFROM gv$parameter WHERE name ='global_names';3) Determine database global name:The GLOBAL_NAME is made up of the db_name and the db_domain, and the first element (before thefirst . in a global name is treated as the 'db_name' and the rest of the global_name is treated asthe 'db_domain'.To find db_domain and db_name:SQL> set linesize 121SQL> col name format a30SQL> col value format a30SQL> SELECT name, valueFROM gv$parameter WHERE name IN ('db_name', 'db_domain');If db_domain is not set, it defaults to REGRESS.RDBMS.DEV.US.ORACLE, Please refer to below note
 
for more information: Note 578668.1When Creating A Database Using DBCA, GLOBAL_NAME Includes The Domain SuffixREGRESS.RDBMS.DEV.US.ORACLE.COM By DefaultTo find global_Name:SQL> col value$ format a40SQL> col comment$ format a40SQL> SELECT *FROM props$WHERE name LIKE '%GLOBAL%';If you want you can change it using:ALTER DATABASE RENAME GLOBAL_NAME TO <The name you want to change it to>;SQL> SELECT *FROM props$WHERE name LIKE '%GLOBAL%';3) Create the database link:SQL> CREATE [SHARED] [PUBLIC] DATABASE LINK <link_name>CONNECT TO CURRENT_USER USING '<service_name>';Please note that:* The single quotes around the service name are mandatory* The service name used above must be in the TNSNAMES.ORA file on the server. If it does not existyou can create one like below:connection_link =(DESCRIPTION =(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST = <Destination host name>)(PORT = 1521)))(CONNECT_DATA =(SERVICE_NAME = <Destination service name>)))4) Make sure that the database link is created:SQL> set linesize 121SQL> col db_link format a20SQL> col username format a20SQL> col password format a20

Activity (8)

You've already reviewed this. Edit your review.
1 hundred reads
1 thousand reads
XueFen Ooi liked this
yelin12 liked this
lotusdba liked this
inatech liked this
Prabha Karan liked this
karthis2020 liked this

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->