title: How to create database link dynamically
body: <p>I am new in oracle db...
  I need to create a database link by passing link name and connection string as variable.</p>
  
  <pre><code>DECLARE DBLINK_NAME varchar(100) :='newdblink';
  Connection varchar(250) := '(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(Host=host.name.com)(Port=1521))(CONNECT_DATA=(SID=host)))';
  BEGIN
  EXECUTE IMMEDIATE 'CREATE DATABASE LINK' ||DBLINK_NAME||
  'CONNECT TO SCHEMA_NAME IDENTIFIED BY password USING '||Connection;
  END;
  </code></pre>
  
  <p>Can any one tell me what wrong in passing this variable value in execute statement?
  I am doing using TOAD and oracle 11g.</p>