Connect to sqlplus from sun box

Can someone please send me a sample script to connect to sqlplus and execute a .sql script.
Thanks
Kev

In this example, the SQL is embedded in the script. If you want to keep it a file, its sqlplus @filename
The -s switch means silent.
Also included are some sample Oracle extensions, like set echo off, which are useful when running batch scripts.
#!/usr/bin/env bash
ORACLE_HOME=/path/to/oracle
ORACLE_CREDENTIALS=user/pass@sid
ORACLE_HOME=$ORACLE_HOME \
$ORACLE_HOME/bin/sqlplus -s $ORACLE_CREDENTIALS << EOS
set echo off
set feedback off
set heading off
set linesize 120
set pagesize 0
select 'foo' from dual;
EOS

Similar Messages

  • Problem in connecting to sqlplus from windows batch file (DOS)

    Hi All,
    We have a new 10g Oracle database installed on windows server. I am trying to write a windows batch file to
    1) Connect to SQLPLUS
    2) Execute a script
    3) Disconnect from SQLPLUS.
    Example File Name:- execsql.bat
    SET ORACLE_SID=CAUT
    SET SCHEMA_IN=%1
    SET PASS=DEV
    SET script=%2
    sqlplus %SCHEMA_IN%/%PASS%@%ORACLE_SID% @%script%
    if %errorlevel% NEQ 0 echo ERROR: %ERRORLEVEL% else echo OK
    Now if i run this bat file like :- execsql.bat DEV script1.sql
    DEV= schema name,
    script1.sql = this file contains select * from dual;
    The code runs fine, but if i change dual to dual1 the sql error's out but not able to catch the error in the batch file.
    Reason why i would like to catch the error is this batch file would be scheduled through Autosys job scheduler and for autosys any exit code >0 is an error. Please help me in rewriting this batch script.
    Thanks
    Sam.

    Hello,
    What if you run this in SQL*Plus before you run the SELECT:
    whenever sqlerror exit failure

  • Tooooooooo slow connect by sqlplus from windows 2008 to windows 2003

    hello i'm mr.kang from korea
    i wana quick connect by sqlplus below envirunment
    plzzzzzzz help me!!!!!
    have a nice day~:)
    from :
    OS : Windows 2008
    Client : Oracle Database 10g Client Release 2 (10.2.0.3)
    to :
    OS : Windows 2003
    DB : Oracle Database 10g Release 2 (10.2.0.1.0) for Microsoft Windows
    Edited by: user581964 on Oct 31, 2009 8:42 AM

    Fahd Mirza wrote:
    Would you please shed more light on masking the higher order of IP address?
    regardsJust to confirm what Niall said, I just meant to obscure it from public viewing when posting back to here. The 'high-order' end would be the left most octet .. Say your IP address is 111.222.333.444, when posting to a public forum such as this you'd show it as ***.222.333.444 or xxx.222.333.444. This is a security issue, so you don't expose your network to the world. It is best to just obscure the high-order part, because the OP's problem could be due to mis-matched IP addresses, and we'd miss spotting that if the entire address were masked and it is usuallly the low-order end where the discrepancies come.
    and if you think this is being overly cautious .... there was a thread on c.d.o.s a few years back where a careless person posted a question and revealed his entire server/domain name, and it was a U.S. military domain. I called him out on it. He replied that it didn't matter because it couldn't be reached from the outside. Another participant promptly posted back the proof that it was accessible ...

  • Connecting to MySQL from Sun One Studio

    Hi,
    I am trying to connect to the MySQL from the Sun One Studio 5. I followed these steps.
    1. I downloaded the MySQL software and installed on my local computer, it was successful.
    2. I got the drivers [b][b][b]mysql-connector-java-3.0.8-stable-bin.jar and placed it in the <stdudio5>/lib/ext/ directory.
    3. And I successfully got through that one also, and in the database section it showed me the icon for connecting to mysql database. I gave the url, username, and password. It worked fine.
    4. Then I created the connection pool, JDBC resource, and Persistence manager for my server instance. It was also successful.
    5. When I built a cmp bean accessing the table in mySQL database, it is giving me these errors.
    If you notice these error, it is asking for vendor type. But i don't have any option to choose the vendor type when i configured the database resources.
    Can soem body suggest some other method and clear this error. I am struggling with this since a week.
    Thank you.
    [[b]09/Oct/2003:11:12:31] WARNING ( 3476): Cannot get database metadata: database product name.
    java.sql.SQLException: com.sun.enterprise.repository.J2EEResourceException
    java.lang.ClassNotFoundException: org.gjt.mm.mysql.jdbc2.optional.MysqlDataSource
    at com.sun.enterprise.resource.SystemJdbcDataSource.internalGetConnection(SystemJdbcDataSource.java:252)
    at com.sun.enterprise.resource.SystemJdbcDataSource.getConnection(SystemJdbcDataSource.java:154)
    at com.sun.jdo.spi.persistence.support.sqlstore.ejb.TransactionHelperImpl.getConnection(TransactionHelperImpl.java:171)
    at com.sun.jdo.spi.persistence.support.sqlstore.ejb.EJBHelper.getConnection(EJBHelper.java:169)
    at com.sun.jdo.spi.persistence.support.sqlstore.impl.SQLPersistenceManagerFactory.getDBName(SQLPersistenceManagerFactory.java:781)
    at com.sun.jdo.spi.persistence.support.sqlstore.impl.SQLPersistenceManagerFactory.getFromPool(SQLPersistenceManagerFactory.java:709)
    at com.sun.jdo.spi.persistence.support.sqlstore.impl.SQLPersistenceManagerFactory.getPersistenceManager(SQLPersistenceManagerFactory.java:598)
    at com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerFactoryImpl.getPersistenceManager(PersistenceManagerFactoryImpl.java:770)
    at com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerFactoryImpl.getPersistenceManager(PersistenceManagerFactoryImpl.java:660)
    at JAdminEntityBeans.JobinfoBean_1956195957_ConcreteImpl.jdoGetPersistenceManager(JobinfoBean_1956195957_ConcreteImpl.java:1479)
    at JAdminEntityBeans.JobinfoBean_1956195957_ConcreteImpl.ejbFindByTitle(JobinfoBean_1956195957_ConcreteImpl.java:541)
    at JAdminEntityBeans.JobinfoBean_1956195957_ConcreteImpl_RemoteHomeImpl.findByTitle(JobinfoBean_1956195957_ConcreteImpl_RemoteHomeImpl.java:175)
    at JAdminEntityBeans._JobinfoHome_Stub.findByTitle(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at com.sun.forte4j.j2ee.ejbtest.webtest.InvocableMethod$MethodIM.invoke(InvocableMethod.java:231)
    at com.sun.forte4j.j2ee.ejbtest.webtest.EjbInvoker.getInvocationResults(EjbInvoker.java:96)
    at com.sun.forte4j.j2ee.ejbtest.webtest.DispatchHelper.getForward(DispatchHelper.java:189)
    at jasper.dispatch_jsp._jspService(_dispatch_jsp.java:136)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.iplanet.ias.web.jsp.JspServlet$JspServletWrapper.service(JspServlet.java:552)
    at com.iplanet.ias.web.jsp.JspServlet.serviceJspFile(JspServlet.java:368)
    at com.iplanet.ias.web.jsp.JspServlet.service(JspServlet.java:287)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:720)
    at org.apache.catalina.core.StandardWrapperValve.access$000(StandardWrapperValve.java:118)
    at org.apache.catalina.core.StandardWrapperValve$1.run(StandardWrapperValve.java:278)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:274)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:203)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
    at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:157)
    at com.iplanet.ias.web.WebContainer.service(WebContainer.java:598)
    [09/Oct/2003:11:12:31] INFO ( 3476): Bean Jobinfo method ejbFindByTitle: problems running JDOQL query.
    com.sun.jdo.api.persistence.support.JDOFatalInternalException: Failed to get the vendor type for the data store.
    NestedException: java.sql.SQLException: com.sun.enterprise.repository.J2EEResourceException
    java.lang.ClassNotFoundException: org.gjt.mm.mysql.jdbc2.optional.MysqlDataSource
    at com.sun.jdo.spi.persistence.support.sqlstore.impl.SQLPersistenceManagerFactory.getDBName(SQLPersistenceManagerFactory.java:802)
    at com.sun.jdo.spi.persistence.support.sqlstore.impl.SQLPersistenceManagerFactory.getFromPool(SQLPersistenceManagerFactory.java:709)
    at com.sun.jdo.spi.persistence.support.sqlstore.impl.SQLPersistenceManagerFactory.getPersistenceManager(SQLPersistenceManagerFactory.java:598)
    at com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerFactoryImpl.getPersistenceManager(PersistenceManagerFactoryImpl.java:770)
    at com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerFactoryImpl.getPersistenceManager(PersistenceManagerFactoryImpl.java:660)
    at JAdminEntityBeans.JobinfoBean_1956195957_ConcreteImpl.jdoGetPersistenceManager(JobinfoBean_1956195957_ConcreteImpl.java:1479)
    at JAdminEntityBeans.JobinfoBean_1956195957_ConcreteImpl.ejbFindByTitle(JobinfoBean_1956195957_ConcreteImpl.java:541)
    at JAdminEntityBeans.JobinfoBean_1956195957_ConcreteImpl_RemoteHomeImpl.findByTitle(JobinfoBean_1956195957_ConcreteImpl_RemoteHomeImpl.java:175)
    at JAdminEntityBeans._JobinfoHome_Stub.findByTitle(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at com.sun.forte4j.j2ee.ejbtest.webtest.InvocableMethod$MethodIM.invoke(InvocableMethod.java:231)
    at com.sun.forte4j.j2ee.ejbtest.webtest.EjbInvoker.getInvocationResults(EjbInvoker.java:96)
    at com.sun.forte4j.j2ee.ejbtest.webtest.DispatchHelper.getForward(DispatchHelper.java:189)
    at jasper.dispatch_jsp._jspService(_dispatch_jsp.java:136)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.iplanet.ias.web.jsp.JspServlet$JspServletWrapper.service(JspServlet.java:552)
    at com.iplanet.ias.web.jsp.JspServlet.serviceJspFile(JspServlet.java:368)
    at com.iplanet.ias.web.jsp.JspServlet.service(JspServlet.java:287)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:720)
    at org.apache.catalina.core.StandardWrapperValve.access$000(StandardWrapperValve.java:118)
    at org.apache.catalina.core.StandardWrapperValve$1.run(StandardWrapperValve.java:278)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:274)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:203)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
    at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:157)
    at com.iplanet.ias.web.WebContainer.service(WebContainer.java:598)

    The AS7 error suggests that you have not set up the server startup classpath to include the driver jar. The steps to do this are included in the article mentioned in Chris's reply, namely:
    http://developers.sun.com/tools/javatools/tips/tip03-08-22.html
    Note especially the part starting with Step 3 under the section "Enabling the JDBC Driver in the IDE."
    -Jane

  • Database Connection to Oracle from Sun Studio

    I am trying to connect to Oracle 9i from the Sun IDE.
    When I test the driver from the databases in the runtime tab, it gives me the following message:
    Internal test driver incomplete. The driver may not support DatabaseMetadata methods.
    The output window shows this:
    Warning: No tables were found. Check your database.
    Warning: No views were found. Check your database.
    Warning: No procedures were found. Check your database.
    If I try to connect, it seems to connect successfully.
    When I expand the jdbc folder it show 3 folders, one for tables, one for views and one for procedures, but they are empty.
    I also set up the classpath to point to the drivers.
    Anyone know the answer?
    Jim

    I was successful and here're some pointers:
    When you configure the new data source for Oracle, configure the server type for Oracle Bundle and define the proper driver class name and add the proper jar file
    Also:
    Check the database URL
    Userid/password
    Typicaly the Driver Class can be: oracle.jdbc.driver.OracleDriver
    And the DB URL: jdbc:oracle:thin:@<host>:1521:<SID>
    (If connecting using thin drivers)
    Good luck ;-)

  • Problem connecting DataBase Link from windows oracle to oracle on Linux

    I'm facing a problem with database links from windows oracle to Oracle hosted on Linux server.
    I'm able to successfully create the Database Link using the following query on oracle database hosted on a windows server
    CREATE DATABASE LINK SampleDB
    CONNECT TO myuser IDENTIFIED BY password
    USING 'sample';
    The tns names entry on windows for database in Linux server is as follows
    DSOFT =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.100)(PORT = 1521))
    (CONNECT_DATA =
    (SERVICE_NAME = sample)
    But while executing the query "select count(*) from doctor@SampleDB;" in sql developer on windows, I'm getting the following error
    SQL Error: ORA-12154: TNS:could not resolve the connect identifier specified
    12154. 00000 - "TNS:could not resolve the connect identifier specified"
    *Cause:    A connection to a database or other service was requested using
    a connect identifier, and the connect identifier specified could not
    be resolved into a connect descriptor using one of the naming methods
    configured. For example, if the type of connect identifier used was a
    net service name then the net service name could not be found in a
    naming method repository, or the repository could not be
    located or reached.
    Using the above tns entries, i'm successfully able to connect to the database in Linux server through sql developer installed on the windows machine. Then why i'm getting this error while executing the query on Database Link?. Can any one help me?

    1005745 wrote:
    I'm facing a problem with database links from windows oracle to Oracle hosted on Linux server.
    I'm able to successfully create the Database Link using the following query on oracle database hosted on a windows server
    CREATE DATABASE LINK SampleDB
    CONNECT TO myuser IDENTIFIED BY password
    USING 'sample';
    The tns names entry on windows for database in Linux server is as follows
    DSOFT =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.100)(PORT = 1521))
    (CONNECT_DATA =
    (SERVICE_NAME = sample)
    But while executing the query "select count(*) from doctor@SampleDB;" in sql developer on windows, I'm getting the following error
    SQL Error: ORA-12154: TNS:could not resolve the connect identifier specified
    12154. 00000 - "TNS:could not resolve the connect identifier specified"
    *Cause:    A connection to a database or other service was requested using
    a connect identifier, and the connect identifier specified could not
    be resolved into a connect descriptor using one of the naming methods
    configured. For example, if the type of connect identifier used was a
    net service name then the net service name could not be found in a
    naming method repository, or the repository could not be
    located or reached.
    Using the above tns entries, i'm successfully able to connect to the database in Linux server through sql developer installed on the windows machine. Then why i'm getting this error while executing the query on Database Link?. Can any one help me?A database link is acting as a client to the target, remote database in exactly the same fashion and using exactly the same tns infrastructure as any other client trying to connect to that remote database. your ORA-12154 when querying a db link means exactly the same as if you had gotten it trying to connect with sqlplus, from the same server. Check the link SB provided. Keep in mind that the tnsnames file of concern is the one on the source database server.

  • Calling sqlplus from unix script

    hello,
    I am trying to connect to sqlplus from shell:
    #!/bin/bash
    SERVER_NAME=ORA1
    sqlplus -s SYS/PASSWD@$SERVER_NAME AS SYSDBA <<EOF
    select * from v\$version
    EOF
    However, the output is:
    Usage: SQLPLUS [ [<option>] [<logon>] [<start>] ]
    where <option> ::= -H | -V | [ [-L] [-M <o>] [-R <n>] [-S] ]
    <logon> ::= <username>[<password>][@<connect_string>] | / | /NOLOG
    <start> ::= @<URI>|<filename>[.<ext>] [<parameter> ...]
    "-H" displays the SQL*Plus version banner and usage syntax
    "-V" displays the SQL*Plus version banner
    "-L" attempts log on just once
    "-M <o>" uses HTML markup options <o>
    "-R <n>" uses restricted mode <n>
    "-S" uses silent mode
    Do you have any idea about that?
    Thanks.

    the connection was establised. thanks.
    any idea why I am getting the same output twice for the following statement?
    #!/bin/bash
    ORACLE_SID=ORA1
    export ORACLE_SID
    sqlplus -s SYS/PASSWD@$ORACLE_SID AS SYSDBA <<EOF
    select SUM(bytes) from dba_data_files where tablespace_name = 'tts1';
    EOF
    the output is
    SUM(BYTES)
    3.4773E+10
    SUM(BYTES)
    3.4773E+10

  • Not able to connect to datatbase from sqlplus

    Hi,
    I migrated database from windows xp to windows 2003,after migration im able to start the services and listener
    when i tried to connect with sqlplus
    Iam getting the following error
    ERROR: ORA-12560: TNS:protocol adapter error
    Kindly help me on this issue.
    Regards,
    Pradeep madhavan

    user12287748 wrote:
    ERROR: ORA-12560: TNS:protocol adapter errorThis is a generic error that points to some problem with the IP stack on that platform, or the process (e.g. sqlplus) inability to use the protocol stack.
    You need to start with the very basics. Is there an IP stack? What does ipconfig return? Is the IP address valid? Is the netmask valid? Is the sqlplus executable allowed to access the IP stack (firewall/security software can prevent this)? Etc.
    Once this has been checked, you need to check connectivity. Does ping show a response when sending ICMP echoes to the server? What does tracert say?
    Then when you get to testing sqlplus (after the prior checks succeeded), you need to make sure that it firstly uses the correct/intended tnsnames.ora and sqlnet.ora files.. and that secondly, the configuration settings in these files are valid.

  • Sqlplus failed on a SUN box

    HI, All,
    I got some problem using sqlplus on a SUN box. the following is the error message:
    ERROR: ORA-01034: ORACLE not available
    ORA-07429: smsgsg: shmget() failed to get segment.
    SVR4 Error: 2: No such file or directory
    the prolem is that I could not find the ORA-07429 in the 8i Error Messages Reference.
    the oracle server is 8i but the sqlplus is 3.3.
    thanks.
    null

    Make sure that the database is started and opened.
    Make sure that your ORACLE_HOME and ORACLE_SID are set properly.

  • When connect the Database from Toad , Sqlplus giving the error

    when connect the Database from Toad , Sqlplus giving the error
    recent changes 12.1.1 installatiojn
    Oracle SQL plus encountered a problem and needs to close we are sorry for convenienvce
    Oracle Forms Designner has encountered a probloem and needs to close we are sorry for the convenience
    Thanks & Regards,
    sree

    when connect the Database from Toad , Sqlplus giving the error recent changes 12.1.1 installatiojnHave you tried using the same user via simple sqlplus on the database server or apps tier server itself? Please try the same database user/login on the database server using the sqlplus available on the server itself. See what message do you get. If the the login happens, then try with the tns entry e.g. sqlplus username/password@prod and see if that works on the db server. If both of these conditions work the check where is Toad picking up the tns entry from on the client pc/laptop. If first test fails, then check if the account is locked.
    Hope this helps.

  • MSI MEGA 533 with FM Radio won't connect on USB! Brand new from a box !!!

    hello,
    i'm having trouble connecting MSI MEGA 533 with FM Radio, on usb port on my computer.
    I've tried to connect it on USB 2.0 port on laptop and desktop computer, with MS Windows XP SP2 installed, nothing happens. When I start player it works like a charm, i can listen to radio stations, record radio station, and record voice, but when i try to connect it to USB via cable from a box nothing happens.
    I've tried to downgrade it to firmware version from cd, with a standard procedure, hold play button, start download software, connect via usb cable, and the player is not detected by computer.
    PLEASE if there is a way you can help post your reply as soon as possible.
    Thanks

    Hi gagac
    Try uninstalling the current driver on your computer and download the following driver.
    http://rapidshare.de/files/20262928/MS5533.zip.html
    This driver is a backup copy that I uploaded on rapidshare from my Original CD Rom that came with my player & I know that it works with firmware v1.00.06. 
    What I find is unusual is that you got firmware v1.00.06 on your player straight out of the box as it usually comes with v1.00.01 or v1.00.02. 
    If the above driver doesn't work, and since that you have Windows XP, you may want to try upgrading to firmware v2.00.02. NOTE: You will need to also download driver v1.672 from the MSI Website as this is the only driver that works with v2.00.02.   
    CARE: You may want to read the below topic first before upgrading to v2.00.02 as there have been some issues concerning driver v1.672 & v2.00.02.
    https://forum-en.msi.com/index.php?topic=96066.0
    Good Luck. 

  • Connecting to 11.5.10 application through sqlplus from a client

    al salam 3al man etaba3 al hoda
    I have intalled appl 11.5.10 and i need to connect to the database through sqlplus from another pc but i cann't connect
    also i cann't see the database from the eterprise manager
    i heard that there are some new security issues at that version that must be set before i can be ble to do that but i don't know details about that.
    thanks

    Your httpd.conf should have:
    include "<your Apache home>/Apache/conf/oracle_apache.conf"
    and your oracle_apache.conf should have:
    include "<your Apache home>/Apache/conf/apps.conf"
    and your apps.conf should have:
    <Location ~ /(oa_servlets|servlets|servlet|jsp|configurator|mobile|forms|discoverer4i|emailcenter|soap/servlet|webservices|dmsOACore|dmsDisco|dmsForms|pricing)/framework>
    Order deny,allow
    Deny from all
    Allow from <your hostname without domain name>
    Allow from <your hostname without domain name>.sandia.gov
    </Location>

  • Sqlplus can't connect to database from within a Virtual PC

    Yes I know it's not supported but this question is for those people who want to help or have actually got it working :-)
    I have an XP machine with a 10gR2 database.
    I have a virtual machine on that XP machine which has the 10gR2 client installed on it.
    While the configuration doesn't necessarily make sense (normally you'd put the database in the VM ) it's done for testing reasons.
    All firewalls are off. The database is up and connections to is are fine from other machines.
    The virtual PC can ping the host and tnsping the listener without a problem but any attempt to connect using sqlplus gives an error
    ERROR:
    ORA-12154: TNS:could not resolve the connect identifier specified
    C:\Documents and Settings\Administrator>tnsping myc10a
    TNS Ping Utility for 32-bit Windows: Version 10.2.0.1.0 - Production on 06-AUG-2
    008 10:10:02
    Copyright (c) 1997, 2005, Oracle. All rights reserved.
    Used parameter files:
    C:\oracle\product\10.2.0\client_1\network\admin\sqlnet.ora
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = pwrwks10
    20)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME
    = MYC10)))
    OK (20 msec)
    C:\Documents and Settings\Administrator>sqlplus cms/cms@myc10a
    SQL*Plus: Release 10.2.0.1.0 - Production on Wed Aug 6 10:10:06 2008
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    ERROR:
    ORA-12154: TNS:could not resolve the connect identifier specified
    It's quite obviously an issue with the virtual PC. Has anyone tried this and have they figured out how to get it to work?
    Regards,
    David

    ERROR:
    ORA-12154: TNS:could not resolve the connect
    identifier specified
    C:\Documents and Settings\Administrator>sqlplus
    cms/cms@myc10a
    SQL*Plus: Release 10.2.0.1.0 - Production on Wed Aug
    6 10:10:06 2008
    Copyright (c) 1982, 2005, Oracle. All rights
    reserved.
    ERROR:
    ORA-12154: TNS:could not resolve the connect
    identifier specifiedORA-12154 means "I looked in the TNSNAMES.ORA file I am trying to use (out of the potentially several on the machine) but I could not find an entry with "myc10a =", or "myc10a.{default_domain in the sqlnet.ora} ="
    All tnsnames.ora entries look like
    alias = description( ... )
    and it can not find your alias. You might have several tnsnames.ora files. Or your file is not correct. Or you also have a sqlnet.ora file that contains a default domain entry, which would be appended to any alias passed in without a '.domain'
    Suggest you post the tnsnames.ora and the sqlnet.ora
    (And yes, I have that configuration working.)
    Message was edited by:
    Hans Forbrich

  • Hello, I'm trying to connect my new TiVo XL4 box to my home network via an ethernet cable connection to my Airport Express but the TiVo box is not seeing the network. I have a green light emanating from the Airport Express so it is connected. Plz advise.

    Hello, I'm trying to connect my new TiVo XL4 box to my home network via an ethernet cable connection to my Airport Express but the TiVo box is not seeing the network. I have a green light emanating from the Airport Express so it is connected. Please advise.

    If you have not already done so, I suggest that you temporarily disconnect the Ethernet cable from the AirPort Express that goes to the Tivo box.
    Instead, turn off the wireless on a laptop and connect the laptop to the Ethernet port on the Express. See if you can get an Internet connection on the laptop.
    If you still cannot get an Internet connection on the laptop, try another Ethernet cable that you know is working correctly.
    Post back on your results.

  • Connection to db fails from client if connecting with sqlplus user/ps@NAME

    Hi
    I have just installed Oracle client 11.2 on a linux server.
    When I connect with sqlplus apmr/******@apm
    I am getting:
    SQL*Plus: Release 11.2.0.2.0 Production on Thu Mar 29 11:11:17 2012
    Copyright (c) 1982, 2010, Oracle. All rights reserved.
    ERROR:
    ORA-12545: Connect failed because target host or object does not exist
    BUT, if I am connecting with /nolog and then insert user/password --> it success!!!
    Could anyone solve this mystery ? :-)
    sqlplus /nolog
    SQL*Plus: Release 11.2.0.2.0 Production on Thu Mar 29 11:12:20 2012
    Copyright (c) 1982, 2010, Oracle. All rights reserved.
    SQL> conn apmr_larisa@apm
    Enter password:
    Connected.
    Thanks
    Larisa

    884714 wrote:
    Thanks a lot for the response. I am getting the following error :
    java.sql.SQLException: Io exception: The Network Adapter could not establish the connection.Before asking you to get the help from your DBA, i would suggest to check couple of things like:
    1) Write a standalone program and check whether everytime you are getting connection. If answer is yes.
    2) Check whether in your web application do jdbc jar's are there (in lib folder) . If answer is yes. Check the version of jars. because the application first checks the dependant jars in application lib folder, if not found then it checks at classpath.
    So this might casuse a problem.
    If no luck after doing above steps, then i would suggest to ask the DBA, does DB goes down frequently? and show him that error. Because the error is pure say's SID is not up and running.

Maybe you are looking for