How to build generic sqlpus connection string?

I need to create a generic script that opens a session of sqIplus. Is it possible to pass unix variable to sqlplus running to open sql more shell? Something like

Oracle database version is 11.2.0.4.0

#!/bin/bash
USERID=$1
PWD=$2
DB=$3
#envoke oracle Shell
sqlplus -s ${USERID}/$PWD}@{DB} << EOF




Of course, this does not... just .but try to illustrate what I'm trying to achieve.

Thank you

Neeraj

Dashboard L option is to try the connection ONCE and ONLY once.  If it don't then SQL * more will not attempt to connect more than 2 times, then exit.  I have the-L option because our DBAs set up such connections with 3 attempts, that our accounts are blocked and we need to get unlocked!

Tags: Database

Similar Questions

  • How to recover the sqlplus connection string?

    I would get connection string of the sql syntax, but cannot find how.

    Thank you for helping me!
    m.

    How to recover the sqlplus connection string?

    In sql * more type

    DEFINE _CONNECT_IDENTIFIER
    
  • Connection string - Coldfusion Administrator

    Is it possible to have more than one parameter configuration connection string in CF8?

    CF Admin only allows me to do one or the other but not both.  I need to put two ways...

    jdbcCompliantTruncation = false

    zeroDateTimeBehavior = convertToNull

    I tried many options.  At last CF8 Admin allow me to do this... connectstring = "jdbcCompliantTruncation = false;" zeroDateTimeBehavior = convertToNull' but it didn't fix the error in my application.

    I choose the error I like better, but this is hardly a solution.  Can someone please?

    ConnectString = "jdbcCompliantTruncation = false;" zeroDateTimeBehavior = convertToNull

    Have you tried to separate the parameters with a '&', as in a URL?

    jdbcCompliantTruncation = false & zeroDateTimeBehavior = convertToNull

    I choose the error I like better, but it's almost a

    solution.

    Ah. Is not so popular eenie meenie miney moe building method of connection strings.

  • How to build JDBC connection strings in groovy?

    Hi all

    We want to access JDBC SQL/away with HQ groovy plugin.

    Of course, we do not want to use a hard-coded connection string.

    (1) are there HQ properties that return the parameters required to create the connection string?

    (2) normally, we would use def sql = Sql.newInstance (...

    I prefer a HQ method to get an instance - say from a connection pool - fully configured SQL does not exist?

    See you soon,.

    -d-

    Don't forget to close this topic though:

    Util.endConnection)

    Charles

  • How to make an array of strings?

    Hello

    In my VI, I send 3 channels or more than one server to a client via a TCP/IP connection. the problem is that when I press the Send button I need all the channels to be sent together so I guess I need a table, but unfortunately I do not know how to build the table. I join my example in this post.

    I appreciate the help!

    Rambaldi.


  • could not find a server reports and analysis hyperion running on localhost port 6800. Please check your connection string server and verify that the server is

    Hi all

    We have properly installed and configured Hyperion Reporting and analysis 11.1.2.4 in windows 2012 server however when I try to logint to the workspace, I get an error like "start-up of the specified document does not exist in the repository." "Select a new start under the General Preferences tab document" monitoring of "could not find a server reports and analysis hyperion running on localhost at port 6800. Please check your connection string server and verify that the server is up '.



    10.PNG


    11.PNG

    HyS9RaFramework_epmsystem2-syserr:

    GsmNotFound

    com.brio.one.services.globalservicemanager.GSMException: GsmNotFound

    at com.brio.one.services.globalservicemanager.GSMFactory.getGSM (unknown Source)

    to com.brio.one.client.ClientFactory. < init >(Unknown Source)

    to com.brio.one.client.ClientFactory. < init >(Unknown Source)

    to com.brio.one.client.ClientFactory$ ClientFactoryInitializer.connect (unknown Source)

    at com.brio.one.client.ClientFactory.getClientFactoryConnect (unknown Source)

    at com.brio.one.client.ClientFactory.getDefaultGSM (unknown Source)

    at com.brio.one.web.properties.ApplicationProperties.getDefaultGSM (unknown Source)

    at com.brio.one.web.properties.ApplicationProperties.getDefaultGSMContext (unknown Source)

    at com.sqribe.WS.WSBaseServlet.setDefaultGSMContext (unknown Source)

    at com.sqribe.WS.WSBaseServlet.initLogging (unknown Source)

    at com.sqribe.WS.WSBaseServlet.loadConfiguration (unknown Source)

    at com.sqribe.WS.WSBaseServlet.init (unknown Source)

    to weblogic.servlet.internal.StubSecurityHelper$ ServletInitAction.run (StubSecurityHelper.java:283)

    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)

    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)

    at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:64)

    at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:58)

    to weblogic.servlet.internal.StubLifecycleHelper. < init > (StubLifecycleHelper.java:48)

    at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:539)

    at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:1981)

    at weblogic.servlet.internal.WebAppServletContext.loadServletsOnStartup(WebAppServletContext.java:1955)

    at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1874)

    at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3155)

    at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1518)

    at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:487)

    to weblogic.application.internal.flow.ModuleStateDriver$ 3.next(ModuleStateDriver.java:427)

    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)

    at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)

    at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:201)

    at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:249)

    to weblogic.application.internal.flow.ModuleStateDriver$ 3.next(ModuleStateDriver.java:427)

    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)

    at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)

    at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:28)

    to weblogic.application.internal.BaseDeployment$ 2.next(BaseDeployment.java:672)

    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)

    at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:212)

    at weblogic.application.internal.EarDeployment.activate(EarDeployment.java:59)

    at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161)

    at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)

    at weblogic.deploy.internal.targetserver.BasicDeployment.activate(BasicDeployment.java:184)

    at weblogic.deploy.internal.targetserver.BasicDeployment.activateFromServerLifecycle(BasicDeployment.java:361)

    to weblogic.management.deploy.internal.DeploymentAdapter$ 1.doActivate(DeploymentAdapter.java:52)

    at weblogic.management.deploy.internal.DeploymentAdapter.activate(DeploymentAdapter.java:200)

    to weblogic.management.deploy.internal.AppTransition$ 2.transitionApp(AppTransition.java:31)

    at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:261)

    at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:246)

    at weblogic.management.deploy.internal.ConfiguredDeployments.activate(ConfiguredDeployments.java:170)

    at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:124)

    at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:181)

    at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:97)

    at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)

    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)

    at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)

    In the workspace, it shows that the Service is pending.

    14.PNG

    EMP Diagnostic Report:

    13.PNG

    Can help kindly out how should I solve this problem.

    I restarted the services and rebooted the Machine but still getting the same error.

    Kind regards

    VJ


    Hello

    I've reconfigured the Reporting, analysis, and everything by, I chose "Drop table" and the issue was resolved.

    Kind regards

    VJ

  • How to enable detailed connection tracing ODI Studio? and how do I resolve a connection problem.

    Is it possible to get a detailed trace of connection attempts from the studio of ODI on my deposit work?

    I tried to enable tracing in changeant...\oracledi\client\odi\bin\ODI-logging-config.xml according to the instructions that I found here: http://haithanh8x.blogspot.com/2013/03/ODI-11g-agent-logging-tracing.html

    The studio.log file has been created, but it is empty.

    I use studio ODI and basically I want to troubleshoot why I can't connect to the repository. When I try the Test button, I get an error "Invalid repository connection", here is the error that is displayed under Details:

    oracle.odi.core.config.WorkRepositoryResourceFailureException: ODI-10182: Uncategorized exception for access to the repository.

    Could not make JDBC connection; nested exception is java.sql.SQLException: Exception occurred while getting connection: oracle.ucp.UniversalConnectionPoolException: cannot get data source connection: java.sql.SQLRecoverableException: IO error: the network adapter could not establish the connection

    at oracle.odi.core.repository.Repository.getWorkRepository(Repository.java:195)

    at oracle.odi.core.OdiInstance.createWorkRepository(OdiInstance.java:531)

    .........

    .....

    ..

    Other important details:

    1.-s' Please note that before I use the Test button under the repository login Panel, I'm able to choose my work deposit that was recovered in the receiving of work section using the magnifying glass.

    2 - I am able to connect to the database with SQLDeveloper using JDBC, in fact I can connect with exactly the same connection string that I use in ODI, also I have no problems connecting to the database using SQLPlus.

    3. - this repository database is on a cluster and as mentioned, I have no problems to connect to it with other tools. Don't know if being in a cluster makes a difference (I tried hostname, scan name and the names of vip to connect)

    4 - this database is running in another server, and I have had no problems connecting to the front. In fact, I restore to a different server no CARS and was able to use ODI. (maybe something in the new RAC server that does not allow the connection?)

    I would like to get a path to better understand what is happening while the Studio tried to connect to the repository. It seems to me it is able to read the name of the repository work so I don't understand why there are connection problems later.

    Question: is it the fact that I am able to read the repository name means JDBC work? (Please confirm)

    I'm running out of ideas on what to try, so your help is appreciated.

    Thank you!

    Answer the questions:

    1-to get a detailed trace

    One option is to use a thick connection instead of a thin. This requires the installation of customer Oranet and settings but allows you to trace the SQL in the side server. That will let you know what the problem is.

    2. to turn on tracing

    Under search support Oracle Oracle Data integrator, there is an information center that includes detailed instructions and examples (files) on how to configure tracing.

    3 - If the test button works and pulls the name of the repository work means that the connection works, unfortunately, is not sufficient because ODI does not use the connection string supplied to connect to the repository instead, it uses the language sql stored in the repository and uses SQL to connect, so location you will see two connections for the initial attraction of the repository data, and then the other link with the chain withdrew from the database. In this case, the problem was that the database of repository has been migrated to another server, the previous server that the connection was made with localhost, but it does not work on the current server, because it runs on CARS, so outside the ODI, I updated the SQL used to connect with the SCAN name instead , and I was able to connect. The SQL is illustrated in the trace obtained using a thick client.

  • Cman is not like the thin driver Jdbc connection strings, it?

    Hello

    I use Oracle connection Mgr 11.2 to filter my clients access to data bases.

    I configured and allowed a PC to connect to a certain database and when

    using SQL * more or this client Toad, passing through cman, it works fine.

    But now the same guy installed SQL Developer, and it seems * impossible *.

    to make connections through my server cman, they routinely get rejected

    with

    ORA-12529, TNS: connect rejected based on the current filter rules

    If I try to go through the login option of TNS (who works with

    sqlplus...) or through advanced = > and then "JDBC: thin @ < complete block of TNS > '!

    (using "basic" does not seem possible because it only allows to specify the name of the host, port, and SID...)

    Has anyone ever encountered this problem before? How does SQL Developer gets rejected

    even when you use the option of TNS, which also works fine with sqlplus/Toad?

    And is it possible to have a Jdbc thin connection string access via a configuration cman?

    Thank you very much in advance for any advice...

    Kind regards

    SEB


    Not a familiar topic for me, but I came across a note in the developer's Guide to the JDBC and the reference, Advanced Topics, on the definition of AUTHENTICATION_LEVEL = 0 in the cman_profile of the cman.ora file entry for when JDBC Thin is currently in use.  Don't know if with the help of old 10g doc is valid here, but I guess that he check could not not bad:

    23 advanced subjects

    In turn, since this user has a customer Oracle installed on the PC and use SQL * Plus, you can try the driver JDBC OCI/thickness.  Select thickness OIC via...

    Tools > Preferences > Datatbase > advanced > use OIC/thickness box

    In addition, for SQL Developer 4.0.x includes the Advanced preferences, this to point to a specific Oracle client installation...

    Checkbox use Oracle Client

    Configure...

    Hope this helps,

    Gary

    SQL development team

    Post edited by: Gary Graham

  • AMT for Oracle 11 g RAC connection string

    Dear all,

    In earlier versions, 2-node Oracle RAC, we used to use the connection string (in tnsnames.ora) as:

    < TNS name > =.

    (DESCRIPTION =

    (ADDRESS_LIST =

    (ADDRESS = (PROTOCOL = TCP) (HOST = VIP-Node1) (PORT = < PortNumber >))

    (ADDRESS = (PROTOCOL = TCP) (HOST = VIP-Node2) (PORT = < PortNumber >))

    (LOAD_BALANCE = yes)

    )

    (CONNECT_DATA =

    (SERVICE_NAME = < ServiceName >)

    )

    )

    With Oracle 11 g RAC, we now SCAN in place; How TNS entry will look like? It will be like:

    < TNS name > =.

    (DESCRIPTION =

    (ADDRESS_LIST =

    (ADDRESS = (PROTOCOL = TCP) (HOST = name SCAN) (PORT = < PortNumber >))

    )

    (CONNECT_DATA =

    (SERVICE_NAME = < ServiceName >)

    )

    )

    Kind regards

    Mohammed Riaz

    Yes.

  • Format of the connection string to connect to Oracle DB via LDAP

    Hello

    I have an Oracle database and its details are configured in LDAP. I have the c# code that I want to connect to Oracle DB using LDAP details. So I wrote the code to connect to the Oracle DB, but not able to connect. Implementation error at the con. Open() statement: "ORA-12154: TNS: could not resolve the connect identifier specified.

    Code:
    --------
    String s = "Data Source = @ldap://abc.pq.xyz.com: 11389/myldap, cn = OracleContext, dc = pq, dc = xyz, dc = com; User Id = MyDB; Password = MyPass";

    Con OracleConnection = new OracleConnection (constr.);
    con. Open();

    I need help in the formation of the connection string.

    user8786648 wrote:
    Hello

    I have an Oracle database and its details are configured in LDAP. I have the c# code that I want to connect to Oracle DB using LDAP details. So I wrote the code to connect to the Oracle DB, but not able to connect. Implementation error at the con. Open() statement: "ORA-12154: TNS: could not resolve the connect identifier specified.

    Code:
    --------
    String s = "Data Source = @ldap://xyz.us.oracle.com: 11389/xyz_ldap, cn = OracleContext, dc =, dc = oracle, dc = com; User Id = xyz; Password = xyz";

    Con OracleConnection = new OracleConnection (constr.);
    con. Open();

    I need help in the formation of the connection string.

    This isn't how you use LDAP for Oracle name resolution.

    You must configure the LDAP protocol. ORA and SQLNET. ORA files properly.

    For example, you can review the LDAP protocol. Documentation of ORA here:

    http://docs.Oracle.com/CD/E11882_01/network.112/e10835/LDAP.htm#i500397

    And the SQLNET. Documentation of ORA here:

    http://docs.Oracle.com/CD/E11882_01/network.112/e10835/SQLNET.htm#i500318

    A quick search on the terms "example of oracle ldap.ora", shot to the top of several examples.

    Also, if these are real values that you posted in your example of a connection string, you can change.

  • info from the connection string

    Hello
    Anyone know if it is possible to get information from the connection string in sql / plsql?
    You can do
    SELECT user to double;
    and you get the current user. Is it possible to get the current connection string information too?
    Thanks in advance.
    Monika

    What happened to create an external table reading the newspaper to the listener?

    How to make an In - Database listener.log File

  • What is the best Connection string for the application to connect to standby mode active

    I have setup a primary database and a database of active standby on both servers in a different city.

    Now for people to test, what is the best tnsnames chains that I provide them?

    In addition, how do I test?

    Thanks in advance.

    No I don't think so. (I'd use the Uwe Hesse document, it is the best!)

    In my test document I just created on the primary and assumed Data Guard "moved" a copy for my watch.

    Pretty easy to check and the worst thing that can happen is that he barks cause there is already.

    Its a great solution

    This configuration offers many advantages:

    Guests can reconnect using the same connection string.

    Need to communicate with customers is reduced, especially after hours.

    Primary maintenance may occur with only minor interruption of service.

    Name of databases may be different without impact to the customer.

    Best regards

    mseberg

    Published by: mseberg on December 6, 2011 16:03

    Planner for Oracle 11 has a feature allowing employment to go with the main role too.

    DBMS_SCHEDULER.set_attribute ('primary_job', 'database_role', 'PRIMARY');

    It is worth I think.

  • Simple sqlplus connection string...

    I have only the following information to connect to the oracle server:

    IP address: xx.xx.xx.xx
    Port: 1521
    name of the data base: EDB
    name: OUSER
    Password: xxxx

    How to use and shape the string to connect to this server using sqlplus connection?

    user11356487 wrote:
    Sorry, I thought that I pasted the error message, but it's here...

    ERROR:
    ORA-12514: TNS:listener does not currently know of service requested in connect
    descriptor
    

    Ok. Then you are to reach a listener to this ip address and port. Problem is that the listener does not a service called 'EDB '. A couple of things come to mind

    (1) if the server is on a * nix, everything is case sensitive.  Try 'edb' rather than 'EDB '.
    (2) the database is not himself registered as "edb" (or "EDB"), in which case you will need to know what he is saved as. The usual way is to log on to the server and the number

    $> lsnrctl status
    

    which lists all the names of service for which the listener will accept connection requests.

  • ASP connection string problems

    Hello

    I have inherited a website and need to make some urgent changes, currently all recordsets is handcoded and is in an absolute mess, I migrated to SQL server to allow me to create new recordsets through DWMX, but the site is far from ready to move to the new DB and I am unable to connect to the DB access.

    The database is a db access with a security.mdw file that controls access how can I make changes to my connection string to connect? I have included my latest effort below.

    Dim MM_conTest_STRING
    MM_conTest_STRING. Mode = adModeReadWrite
    MM_conTest_STRING. Provider = "Microsoft.Jet.OLEDB.4.0".
    MM_conTest_STRING. ("Properties (" Jet OLEDB: System Database ") = Server.MapPath("***\Security.mdw ")
    MM_conTest_STRING. Properties ("User ID") = «*»
    MM_conTest_STRING. Properties ("password") = «*»
    MM_conTest_STRING. "Open Server.MapPath("***\Database.mdb")
    MM_conTest_STRING = "DRIVER = {Microsoft Access Driver (*.mdb)}; DBQ ="& Server.MapPath("***\Database.mdb")

    However this only gets me the following error message:
    Microsoft VBScript runtime (0x800A01A8)
    Object required: "
    fporiginal/connections/conTest.asp, line 9

    If I remove everything except the last line, I get the following error:
    Microsoft OLE DB provider for ODBC (0x80004005) drivers
    [Microsoft] [ODBC Microsoft Access driver] You do not have the necessary permissions to use the object '(unknown) '. Ask your system administrator or the person who created this object establish the appropriate permissions for you.
    / fporiginal/categories.asp, line 15

    Any help gratefully received

    See you soon
    Ossie

    Duh! for anyone interested is solved my problem - the answer:

    MM_ConTest_String = "Driver = {Microsoft Access Driver (*.mdb)}; DBQ ="& Server.MapPath("***\Database.mdb") &" SystemDB = "& Server.MapPath("***\Security.mdw") &"; UID = *; pwd = *** "

  • "How to build a reusable toolbar...". "does not.

    I tried to run this suggested in the corner of code document "how to build a reusable tools with Oracle ADF declarative components toolbar".
    I created the toolbar and deployed.
    I have inserted the pot in my project and create a new page.
    I've included the toolbar and hanging methods to the link of the page.
    When I run the page I see the boolbar as well as the data in the table, however, when I click on the button, that nothing has changed (the location of the selection remains unchanged).
    I missed something?
    Should I set a partial trigger?
    TKS
    Tullio

    When you create the declarative element, you now define an attribute and call it something like DataSet (of type String).

    In the declarative component, select the button and for its property TEXT put something like ' next #{uploading. '. DataSet}"- without the quotes.

    This will define that button to show following PGE label if you value DataSet Emp when you use the declarative component.

    So, now you repapckage upward and deploy the library of the ADF and now when you use the component, you can set the DataSet attribute (in the property inspector when you select the instance of the declarative component).

    Hope this helps

    Grant

Maybe you are looking for

  • Question of battery for a Satellite L20

    Is it possible to put a larger battery than 4300mAh in L20 - 101? Is there another compatible battery?

  • How can I stop my internet explore uninstall

    Please help me I have windows 7 and xp problems I don't know how to restore reset my netbooks. where can iget a product keys for them my netbooks mine don't work. How cani has know if someone keeps track of my netbooks via mobile phone I had problems

  • Ansd valet Plus Windows 8.1

    I try to install my new computer to an existing M20 W8.1... Get a msg incompatible or will not work before this system. Any suggestions?

  • (Redirected) Its an urgent request for everyone, please post the solution to the problem in my laptop.

    My laptop model number is Inspiron 7520 15RSE. with i5 processor. and the amd graphics card. I have 4 experience problems in my laptop. 1. whenever I press the power button to turn on my laptop, my screen becomes yellow with a horizontal silver line

  • SQL execution time

    HelloI was wondering if anyone could advise on the best way to capture the following in an 11g database.Say that we have;-a piece of SQL execution by up to 50 times per minute.-unique execution times vary.Aside from dba_hist_sqlstat and generate a so