DBLOAD Procedure Specifics for Oracle

Overview

For general information about this feature, see DBLOAD Procedure. Oracle examples are available.

The Oracle interface supports all DBLOAD procedure statements. See About DBLOAD Procedure Statements.

Here are the DBLOAD procedure specifics for Oracle.

Examples

This example creates a new Oracle table, EXCHANGE, from the DLIB.RATEOFEX data file. Based on the new table, an access descriptor, ADLIB.EXCHANGE, is also created. The PATH= statement uses an alias to connect to a remote Oracle database. The SQL statement in the second DBLOAD procedure sends an SQL GRANT statement to Oracle. You must be granted Oracle privileges to create new Oracle tables or to grant privileges to other users. The SQL statement is in a separate procedure because you cannot create a DBMS table and reference it within the same DBLOAD step. The new table is not created until the RUN statement is processed at the end of the first DBLOAD step.

libname adlib 'SAS-library';
libname dlib 'SAS-library';

proc dbload dbms=oracle data=dlib.rateofex;
   user=myusr1;
   orapw=mypwd1;
   path='mysrv1';
   table=exchange;
   accdesc=adlib.exchange;
   rename fgnindol=fgnindolar 4=dolrsinfgn;
   nulls updated=n fgnindol=n 4=n country=n;
   load;
run;

proc dbload dbms=oracle;
   user=myusr1;
   orapw=mypwd1;
   path='mysrv1';
   sql grant select on myusr1.exchange to pham;
run;

This example uses the APPEND option to append rows from the INVDATA data set. This data set was created previously to an existing Oracle table named INVOICE.

proc dbload dbms=oracle data=invdata append;
  user=myusr1;
  orapw=mypwd1;
  path='mysrv1';
  table=invoice;
  load;
run;
Last updated: February 3, 2026