Posts

Showing posts from February, 2022

SQL*Loader - Load data into table from CSV file

In this article, I am going to show how we can use Oracle SQL *Loader to insert data into the Oracle table. We will create one simple table and create the necessary files required to load the data from the CSV file into the table using Oracle SQL*Loader. The example given in this article is very basic and it will help beginners to understand the SQL*Loader concept. SQL*Loader has various options to load data and support multiple input data formats. Step-1: Lets first create a table Employee. CREATE TABLE EMPLOYEE ( EMPLOYEE_ID NUMBER(8,0), NAME VARCHAR2(40), EMAIL VARCHAR2(60) NOT NULL, DOB DATE, PRIMARY KEY (EMPLOYEE_ID) ); Step-2: Create SQL*Loader control file - "employee.ctl" The control file is a text file that SQL*Loader uses to understand where to find the data file, how to parse the data and how to insert the data into the oracle table and many other options. Given below is the sample format of the control file which...

Convert Java Keystore JKS into PEM format

Java Keystore or a JKS file is a store of security certificates ( private keys, signer certificates). The JKS file is created using keytool utility that shipped with JDK. The JKS file format is proprietary and used by Java applications. Many application on windows uses PEM ( Privacy-Enhance Mail) format for storing and sending certificates and keys. The PEM format is generally used to send the certificate via emails as it is base64 encoded. We can use keytool command to export key entry into PEM file format . keytool -exportcert -alias mykey -keystore MyKeystore.jks -rfc -file mykey_cert.pem After executing the above command the certificate will be exported and stored into mykey_cert.pem file. By default "keytool -exportcert" command export the certificate as binary encoding i.e Distinguished Encoded Rules (DER) file format. DER format is not suitable for transmitting the certificate file and hence, we need to convert the file as PEM format. The -rfc switch...