The parfile option of newer text unload utility (sqluldr)

Links: http://www.dbatools.net/mytools/sqluldr-parfile.html

    There are lots of command line options for squldr utility, it's not convenient for us to specify lots options value in command line, so I intorduced a new command line option "parfile" to save options value in a text file, then sqluldr can read option settings from text file, just like the "parfile" option in Oracle's export and import utilities. It can help to improve the security by eliminating the database login information at command line, you just need to control the text file's permission.

    Parameter file is a text file, and no space character before the option name, and also no space character between the option name and the equal character. You can use a reverse slash (/) to specify mulitple line value, here is an example.

user=scott/tiger
query=select empno,ename,job \
  from emp
field=0x20
width=6:15:15

    Then run the text unload task by the following command.

sqluldr parfile=testpar.txt

    Check the text file (default file name is uldrdata.txt) generated.

D:\>cat uldrdata.txt
7369  SMITH          CLERK
7499  ALLEN          SALESMAN
7521  WARD          SALESMAN
7566  JONES          MANAGER
7654  MARTIN        SALESMAN
7698  BLAKE          MANAGER
7782  CLARK          MANAGER
7788  SCOTT          ANALYST
7839  KING          PRESIDENT
7844  TURNER        SALESMAN
7876  ADAMS          CLERK
7900  JAMES          CLERK
7902  FORD          ANALYST
7934  MILLER        CLERK

    Is it better for us? Download the latest Windows binary and test it.

Post a comment

Remember Me?

« Previous | Main | Next »

Powered by
Movable Type 5.01