08-12-14, 02:01 #1Registered User
- Join Date
- Dec 2013
Unanswered: Database link access issue in plsql block
I have created a database link as follows
create public database link HWPROD
connect to HW_REVIEWDB
identified by "xxxxxxx"
using '(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP )(HOST=rb-engsrv36n.xx.xx.com)(PORT=3800)))(CONNECT_DATA=(si d=xxx152)))';
Database link is created successfully. When issues a sql statement like
select * from dual@HWPROD is works fine.
But when the same is used in PLSQL block it throws error "illegal database charater '-'". This is due to HOST=rb-engsrv36n.xx.xx.com.
It is not possible to change the host name or update the global name of the database as described in this link (Many instances are present on the server)
Could you let me know if there is another work around for this issue?
08-12-14, 09:30 #2Registered User
Provided Answers: 1
- Join Date
- Aug 2003
- Where the Surf Meets the Turf @Del Mar, CA
>Could you let me know if there is another work around for this issue?
a) use double quote marks, CHR(34); as follows (HOST="rb-engsrv36n.xx.xx.com"), which may introduce CaSe Problem.
b) create new DNS entry which would essentially be an alias name to resolve to same IP#You can lead some folks to knowledge, but you can not make them think.
The average person thinks he's above average!
For most folks, they don't know, what they don't know.
Good judgement comes from experience. Experience comes from bad judgement.