Operating System - OpenVMS
1828406 Members
3876 Online
109977 Solutions
New Discussion

Re: Oracle10g Client - SQLPLUS Error

 
SOLVED
Go to solution
IFX_1
Frequent Advisor

Oracle10g Client - SQLPLUS Error

There's a problem running SQLPLUS on MGR account in our Oracle10g client. However I don't encounter running the same command using ORACLE10G account.

Pls note though that running SQLPLUS under MGR using "...@beyield" results an error but running SQLPLUS under MGR using "...@beyield.company.com" is OK.

Pls see below for details.

-----------------------------
ORACLE10G ACCT
-----------------------------

ORACLE10G$ $ sqlplus vf_edc_admin/dwhedc_vf@beyield
SQL*Plus: Release 10.1.0.3.0 - Production on Fri Aug 29 11:13:22 2008
Copyright (c) 1982, 2004, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Release 10.2.0.3.0 - 64bit Production

----------------------
MGR ACCT
----------------------

1) OK

ADMIN$ $ sqlplus vf_edc_admin/dwhedc_vf@beyield.company.com
SQL*Plus: Release 10.1.0.3.0 - Production on Fri Aug 29 13:48:27 2008
Copyright (c) 1982, 2004, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Release 10.2.0.3.0 - 64bit Production

2) NOT OK
MGR$ $ sqlplus vf_edc_admin/dwhedc_vf@beyield
SQL*Plus: Release 10.1.0.3.0 - Production on Fri Aug 29 11:14:07 2008
Copyright (c) 1982, 2004, Oracle. All rights reserved.
ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified

Enter user-name: vf_edc_admin
Enter password:
ERROR:
ORA-12162: TNS:net service name is incorrectly specified



----------------------
TNSNAMES ENTRY
----------------------
beyield.world =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = servername.company.com)(PORT = 1521))
)
(CONNECT_DATA =
(SID = beyield)
(SERVER = DEDICATED)
(GLOBAL_NAME = beyield.world)
)
)

BEYIELD.company.COM =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = servername.company.com)(PORT = 1521))
)
(CONNECT_DATA =
(SID = beyield)
(SERVER = DEDICATED)
)
)
4 REPLIES 4
IFX_1
Frequent Advisor

Re: Oracle10g Client - SQLPLUS Error

By the way, OpenVMS version is 8.3
Marc Van den Broeck
Trusted Contributor

Re: Oracle10g Client - SQLPLUS Error

What do you have specified in sqlnet.ora for your default domain?
If nothing add
NAMES.DEFAULT_DOMAIN = world

You can also try to connect @beyield.world because you specified beyield.world in your tnsnames.ora

Rgds
Marc
IFX_1
Frequent Advisor

Re: Oracle10g Client - SQLPLUS Error

Finally found the cause of the problem. Thanks Marc for leading me to examine sqlnet.ora.

As with tnsnames.ora, sqlnet.ora also needs conversion in OVMS 8.3.

$ CONVERT/FDL=SYS$INPUT x.x sqlnet.ora
RECORD
CARRIAGE_CONTROL carriage_return
FORMAT stream_LF
^Z
Hein van den Heuvel
Honored Contributor
Solution

Re: Oracle10g Client - SQLPLUS Error

Thanks for following up with a resolution!
Much appreciated.

fwiw, I wrote a modest DCL script to check Oracle files line LISTENER.ORA, TNSNAMES, SQLNET...
It suggests a 1-line fix for those files that need it.


$! --- Check_fix_oracle_file.com ----
$if p1.eqs."" then goto help
$!p1 = f$elemenent(0,";",p1) + ";0"
$old = ""
$loop:
$ file = f$search(p1)
$ if file.eqs."" then exit
$ if file.eqs.old then exit
$ old = file
$ rat = f$file(file,"rat")
$ rfm = f$file(file,"rfm")
$ if rat .eqs. "CR" .and. rfm .eqs. "STMLF" then goto loop
$ name = f$pars(file,,,"NAME") + f$pars(file,,,"TYPE")
$ write sys$output name, ": RFM/RAT = ''rfm'/''rat'. Should be STMLF/CR."
$ write sys$output "Issue: $ CONVERT/FDL=""RECORD; FORMAT STREAM_LF;
CARRIAGE CARRIAGE"" ''name' ''name'"
$ goto loop
$help:
$type sys$input:

-- Please provide (wildcarded) file specification as parameter

$exit


Cheers,
Hein.