How do you create a link between two databases inside a stored procedure? Normally, one does not create database...
By submitting your personal information, you agree that TechTarget and its partners may contact you regarding relevant content, products and special offers.
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; /
Dig Deeper on Oracle stored procedures
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.