Thursday, January 24, 2019

Convert Java SQL String to Oracle SQL Format in TOAD


At times Toad might reset the capability to strip off / convert the the SQL in Java string format to SQL format. You can have that back, here is how...
1.      View -> Toad Options -> Editor - Code Assist
2.      Under "Make Code"
3.      Click on "Add"



4.      Copy Past below
Name: Java
Quote Character: "
Escape Character: \

{ Java Language Template }
"%SqlText% " +
"%SqlTextNext% " +
like this…

5.      Once you apply these changes:
                                      i.      Copy the SQL in java string format in SQL Editor
                                    ii.      Select the entire text
                                  iii.      Go to Editor -> Strip Code Statement
OR
                                   iv.            CTRL + P

Wednesday, January 23, 2019

Trust Store, Key Store, One Way SSL and Two Way SSL

For simplicity, below 2 definitions are from Server Side SSL implementation

TrustStore:
Client stores the certificates it TRUSTS. These are used to verify the Certificate presented by the Server.
KeyStore:
Server stores Private Key and own Identity Certificate which is used to present to other parties (Server or Client) to verify its identity

Server Side SSL:
In this case Server (for instance Tomcat / WebSphere) will hold the Key Store (Private Key + Identity Certificate)
Server will present this Certificate to the requesting Client
Client will lookup the presented Certificate with the list of Certificates available in it's TrustStore

Client Side SSL:
In this case Client (for instance JDBC client) will hold the KeyStore (Private Key + Identity Certificate)
Client will present this Certificate to the Server
Server will lookup the presented Certificate with the list of Certificates available in it's TrustStore

KeyStore  - To store your credential (it may be Server OR Client)
TrustStore - To store others credential (Certificates from CA - Certificate Authority)

In Two Way SSL:
Client and Server both will have their each TrustStore and KeyStore

Convert Java SQL String to Oracle SQL Format in TOAD

At times Toad might reset the capability to strip off / convert the the SQL in Java string format to SQL format. You can have that back...