{"id":964,"date":"2013-02-05T17:44:34","date_gmt":"2013-02-05T17:44:34","guid":{"rendered":"http:\/\/www.juniovitor.com\/?p=964"},"modified":"2013-02-05T17:44:34","modified_gmt":"2013-02-05T17:44:34","slug":"gerando-ddl-para-dblink-oracle","status":"publish","type":"post","link":"https:\/\/www.juniovitor.com\/?p=964","title":{"rendered":"Gerando DDL para DBLink Oracle"},"content":{"rendered":"<p>Pessoal,<\/p>\n<p>Segue uma dica para aqueles que precisam gerar um DDL de um DBLink Oracle.<\/p>\n<p>Segue c\u00f3digo:<\/p>\n<pre class=\"brush:sql\">\r\nDECLARE\r\n   v_output      CLOB          := NULL;\r\n   v_owner       VARCHAR2 (30) := '&OWNER';\r\n   v_link_name   VARCHAR2 (30) := '&NOME_DBLINK';\r\nBEGIN\r\n   DBMS_OUTPUT.put_line ('DDL For Database Links');\r\n\r\n   FOR tt IN (SELECT owner, db_link\r\n                FROM dba_db_links\r\n               WHERE owner LIKE v_owner AND db_link LIKE v_link_name)\r\n   LOOP\r\n      SELECT DBMS_METADATA.get_ddl ('DB_LINK', tt.db_link, tt.owner)\r\n        INTO v_output\r\n        FROM DUAL;\r\n\r\n      DBMS_OUTPUT.put_line (v_output);\r\n   END LOOP;\r\nEND;\r\n<\/pre>\n<p>Qualquer d\u00favida comente!<\/p>\n<p>Abs,<br \/>\nJunio Vitor<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Pessoal, Segue uma dica para aqueles que precisam gerar um DDL de um DBLink Oracle. Segue c\u00f3digo: DECLARE v_output CLOB := NULL; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[163,164,622],"class_list":["post-964","post","type-post","status-publish","format-standard","hentry","category-oracle","tag-dblink","tag-ddl","tag-oracle"],"_links":{"self":[{"href":"https:\/\/www.juniovitor.com\/index.php?rest_route=\/wp\/v2\/posts\/964"}],"collection":[{"href":"https:\/\/www.juniovitor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.juniovitor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.juniovitor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.juniovitor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=964"}],"version-history":[{"count":2,"href":"https:\/\/www.juniovitor.com\/index.php?rest_route=\/wp\/v2\/posts\/964\/revisions"}],"predecessor-version":[{"id":966,"href":"https:\/\/www.juniovitor.com\/index.php?rest_route=\/wp\/v2\/posts\/964\/revisions\/966"}],"wp:attachment":[{"href":"https:\/\/www.juniovitor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=964"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.juniovitor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=964"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.juniovitor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=964"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}