MEHMET BALiOGLU

How to install Sql Loader on Linux

You are able to load data from an external source into a table in the database using SQL*Loader. It is capable of reading and understanding a wide variety of delimited file types, including CSV, or any other type of delimited files. In this post, I am going to show how to install SQL Loader on Linux. SQL Loader is a super fast and efficient tool to load external data to tables on an Oracle database. You can use it to transfer data across a network, manipulate your data before loading and select which parts of your data lo load. It is powerful and fast. I use it with Python code to transfer local CSV files to my autonomous Oracle database, which is free.

Step-by-step Instruction to Install Sql Loader on Linux

  1. Download the Oracle Instant Client using wget

    You should begin by going to Oracle Downloads and obtaining the Oracle Instant Client application. This is required for two reasons. In the first place, the SQL loader is already built into the Instant Client. Second, and more significantly, if you don’t have Oracle client, you won’t be able to use the SQL loader. In order to download the instant client, we will be using the Linux terminal and the wget command in the following steps. When it comes to downloading files from the internet, the Wget programme is extremely useful.   You can determine the architecture of your system by running the hostnamectl command into the terminal if you are unsure about the architecture of your system. When you run this command, it will display a lot of system information, including information about the architecture of your system.

    wget "https://download.oracle.com/otn_software/linux/instantclient/214000/instantclient-tools-linux.x64-21.4.0.0.0dbru.zip"


  2. Unzip the files

    It is necessary for us to unzip the instant client zipfile once we have successfully downloaded it. If you do not already have a folder designated for downloads, you will need to make one before continuing. Afterward, using the cd command, we will move to the downloads folder that we just found. After that, we will unzip all of the data within the archive into the same directory that already contains the Instant Client. /opt/oracle/ is the name of this directory.

    sudo mkdir downloads
    cd downloads
    sudo unzip instantclient-tools-linux.x64-21.4.0.0.0dbru.zip -d /opt/oracle/


  3. Check where the sqlldr file is extracted:

    Up to this point, everything has been good. At this stage, we want to check that everything has been carried out in the correct fashion. As we carry on working in the Linux terminal, the next step is to run the search command. Have you just reached the realization that Linux possesses some commands that are quite useful? They may also be used in a very simple manner. Run the find command with -iname parameter. Then, enter the name of the file you are searching. In our case, the name of the file is sqlldr. In my case the result of the following command was: /opt/oracle/instantclient_21_4/instantclient_21_4/sqlldr


    find / -iname sqlldr

  4. Run sqlldr

    If you followed all the above steps correctly, you should now get the sql loader up and running after typing sqlldr and pressing Enter.

That was all. In this tutorial, you have learned how to download, unzip and install and run the SQL Loader on Linux operating system from the terminal in just four easy steps.