Q
Problem solve Get help with specific problems with your technologies, process and projects.

How do you create a link between two databases inside a stored procedure?

An Oracle user asks how to create a link between two databases inside a stored procedure.

How do you create a link between two databases inside a stored procedure? Normally, one does not create database...

objects inside stored procedures. But on the rare occasion that you do have this requirement, you can use the EXECUTE IMMEDIATE command to run the CREATE DATABASE LINK command similar to the following:

BEGIN
   EXEC IMMED 'create database link db_link connect to foo identified
by bar using ''tns_entry'''; END; /

This was last published in March 2008

PRO+

Content

Find more PRO+ content and other member only offers, here.

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide.com

SearchDataCenter

SearchContentManagement

SearchFinancialApplications

Close