Way to success...

--"Running Away From Any PROBLEM Only Increases The DISTANCE From The SOLUTION"--.....--"Your Thoughts Create Your FUTURE"--.....--"EXCELLENCE is not ACT but a HABIT"--.....--"EXPECT nothing and APPRECIATE everything"--.....

Friday, November 18, 2016

Managing Oracle wallets and certificates using orapki utility

Below are the commands to manage oracle wallets and certificates using orapki utility

To create an Oracle wallet:

$ orapki wallet create -wallet wallet_location [-pwd password]


To create an Oracle wallet with auto login enabled:


$ orapki wallet create -wallet wallet_location -auto_login [-pwd password]


To view an Oracle Wallet:
Go To the Wallet Location where cwallet.sso and ewallet.p12 is created

$ orapki wallet display -wallet wallet_location


To view the autologin or password protected oracle wallet:

$ orapki wallet display -wallet wallet_location -pwd <password>


To add a trusted certificate to an Oracle wallet:

$ orapki wallet add -wallet wallet_location -trusted_cert -cert certificate_location -pwd <password>


To add a user certificate to an Oracle wallet:


$ orapki wallet add -wallet wallet_location -user_cert -cert certificate_location -pwd <password>


To remove trusted certificate from an Oracle Wallet:


$ orapki wallet remove -wallet wallet_location -alias 'CN=*.h2hdba.blogspot.com' -trusted_cert -pwd "Welcome1"


To Display Certificate: 


$ orapki cert display -cert <Certificate>

If your oracle wallet is not password protected i.e auto login enabled then do not provide the password or do not pass the password parameter in above commands.


Once the certificates are installed, The "UTL_HTTP" package is been used to make callouts from SQL and PL/SQL and access access data on the Internet:

Run UTL.HTTP test:

SQL> select utl_http.request('https://your_site.com',null,'file:<wallet_location>','<wallet_password>') from dual;

This function returns up to the first 2000 bytes of data retrieved from the given URL.
It can be used directly in SQL queries.



2 comments:

  1. It proved to be Very helpful to me and I am sure to all the commentators here! buy diplomatic passports

    ReplyDelete
  2. Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
    PL/SQL Release 12.2.0.1.0 - Production
    "CORE 12.2.0.1.0 Production"
    TNS for Linux: Version 12.2.0.1.0 - Production
    NLSRTL Version 12.2.0.1.0 - Production

    ORA-29273: HTTP request failed
    ORA-06512: at "SYS.UTL_HTTP", line 1501
    ORA-28750: unknown error
    ORA-06512: at "SYS.UTL_HTTP", line 380
    ORA-06512: at "SYS.UTL_HTTP", line 1441
    ORA-06512: at line 1
    29273. 00000 - "HTTP request failed"
    *Cause: The UTL_HTTP package failed to execute the HTTP request.
    *Action: Use get_detailed_sqlerrm to check the detailed error message.
    Fix the error and retry the HTTP request.

    ReplyDelete