以下数据库链接在Toad中有效:
create database link mylink
connect to USERNAME identified by PASDWORD using '//host:port/sid';
select * from dual@mylink;
如何使用groovy创建此链接?
我尝试了这个:
sql.executeUpdate('create database link mylink connect to USERNAME identified by PASSWORD using "//host:port/sid"')
这给出了错误:
java.sql.SQLSyntaxErrorException: ORA-02010: missing host connect string
最佳答案
// host:port / sid应该在单引号之间