5 Replies Latest reply on Dec 22, 2016 2:32 PM by pjhitchman

    What is the purpose of the "SET WALLET" parameter?

    Gaz in Oz

      I've been looking into Oracle wallet and the interaction with sqlcl.

       

      While I was looking at the output from

      SHOW ALL+

      I noticed a line stating

      No Wallet location defined

      ...so, I tried the following:

      SQL> SET wallet

      Usage: set wallet <PATH TO WALLET>

      OK, lets try setting it

      Note: using wallet connect syntax, connecting to a remote db needs the custom URL syntax of "/@jdbc:oracle:oci8:@remotedb", whereas local does not.:

      E:\Oracle>sql /@xe

       

      SQLcl: Release 4.2.0 Production on Sun Oct 02 17:27:55 2016

       

      Copyright (c) 1982, 2016, Oracle.  All rights reserved.

       

              Dont forget to attend Oracle OpenWorld September 18 to 22, 2016

       

      Connected to:

      Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production

       

      SQL> SHOW wallet

      No Wallet location defined

       

      SQL> SET wallet \oracle\wallet

      Oct 02, 2016 5:28:14 PM oracle.dbtools.raptor.newscriptrunner.ScriptExecutor run

      SEVERE: oracle.dbtools.raptor.newscriptrunner.commands.SetWallet.handleEvent(SetWallet.java:38)

      java.lang.ArrayIndexOutOfBoundsException: 3

              at oracle.dbtools.raptor.newscriptrunner.commands.SetWallet.handleEvent(SetWallet.java:38)

              at oracle.dbtools.raptor.newscriptrunner.CommandRegistry.fireListeners(CommandRegistry.java:427)

              at oracle.dbtools.raptor.newscriptrunner.ScriptRunner.run(ScriptRunner.java:213)

              at oracle.dbtools.raptor.newscriptrunner.ScriptExecutor.run(ScriptExecutor.java:331)

              at oracle.dbtools.raptor.newscriptrunner.ScriptExecutor.run(ScriptExecutor.java:221)

              at oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.process(SqlCli.java:342)

              at oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.processLine(SqlCli.java:350)

              at oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.startSQLPlus(SqlCli.java:1042)

              at oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.main(SqlCli.java:422)

       

      SQL>

       

      Just wondering, if I could successfully set it:

      . What is its intended purpose?

       

      Thanks,

       

      Gaz.

        • 1. Re: What is the purpose of the "SET WALLET" parameter?
          Gaz in Oz

          Self explanetary I guess. just doesn't work.

          • 2. Re: What is the purpose of the "SET WALLET" parameter?
            thatJeffSmith-Oracle

            It sets oracle.net.wallet.location property and enables oracle.net.ssl_server_dn_match

             

            it wants a directory for your Wallet

             

            https://docs.oracle.com/middleware/1212/wls/JDBCA/oraclewallet.htm#JDBCA602

            • 3. Re: What is the purpose of the "SET WALLET" parameter?
              pjhitchman

              Hi

              I have been trying this set wallet command and I get the same exception:

              SQL> set wallet /oracle/app/oracle/product/11.2.0/client_1/network/admin

              Dec 21, 2016 4:43:54 PM oracle.dbtools.raptor.newscriptrunner.ScriptExecutor run

              SEVERE: oracle.dbtools.raptor.newscriptrunner.commands.SetWallet.handleEvent(SetWallet.java:38)

              java.lang.ArrayIndexOutOfBoundsException: 3

                      at oracle.dbtools.raptor.newscriptrunner.commands.SetWallet.handleEvent(SetWallet.java:38)

                      at oracle.dbtools.raptor.newscriptrunner.CommandRegistry.fireListeners(CommandRegistry.java:428)

                      at oracle.dbtools.raptor.newscriptrunner.ScriptRunner.run(ScriptRunner.java:213)

                      at oracle.dbtools.raptor.newscriptrunner.ScriptExecutor.run(ScriptExecutor.java:331)

                      at oracle.dbtools.raptor.newscriptrunner.ScriptExecutor.run(ScriptExecutor.java:221)

                      at oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.process(SqlCli.java:351)

                      at oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.processLine(SqlCli.java:359)

                      at oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.startSQLPlus(SqlCli.java:1069)

                      at oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.main(SqlCli.java:431)

               

              I found that if I set it on the java command line:

               

              JAVA_OPTS="-Doracle.net.wallet_location=/oracle/app/oracle/product/11.2.0/client_1/network/admin"

              then it gets picked up:

               

              SQL> show wallet

              Wallet set to: /oracle/app/oracle/product/11.2.0/client_1/network/admin

              How are you supposed to set this interactively?

               

              Thanks

              Pete

              • 4. Re: What is the purpose of the "SET WALLET" parameter?
                Gaz in Oz

                Hi Pete,

                 

                Use "script" command to set wallet interactively...

                For example:

                SQL> show wallet

                No Wallet location defined

                SQL> script

                  2     var System  = Java.type("java.lang.System");

                  3     System.setProperty("oracle.net.wallet_location", "/oracle/app/oracle/product/11.2.0/client_1/network/admin");

                  4  /

                SQL> show wallet

                Wallet set to: /oracle/app/oracle/product/11.2.0/client_1/network/admin

                SQL>

                 

                Cheers,

                 

                Gaz.

                • 5. Re: What is the purpose of the "SET WALLET" parameter?
                  pjhitchman

                  Thanks Gaz.

                  Being on the ball as usual, I am new to sqlcl and yet to get as far as using the

                  "script" command to run JavaScript or other compatible scripting languages!

                   

                  Regards

                  Pete