DBLOAD Procedure Specifics for Microsoft SQL Server

Overview

For general information about this feature, see the DBLOAD Procedure.

The Microsoft SQL Server under UNIX hosts interface supports all DBLOAD procedure statements (except ACCDESC=) in batch mode.

Note: SAS still supports this legacy procedure. However, to access your DBMS data more directly the best practice is to use the LIBNAME statement for Microsoft SQL Server or the SQL pass-through facility. For more information, see LIBNAME Statement for the Microsoft SQL Server Engine and SQL Pass-Through Facility Specifics for Microsoft SQL Server.

Here are SAS/ACCESS Interface to Microsoft SQL Server specifics for the DBLOAD procedure.

Examples

This example creates a new Microsoft SQL Server table, MYUSR1.EXCHANGE, from the DLIB.RATEOFEX data file. You must be granted the appropriate privileges in order to create new Microsoft SQL Server tables or views.

proc dbload dbms=SQLSVR data=dlib.rateofex;
   dsn=sample; user='myusr1'; password='mypwd1'; table=exchange;
   rename fgnindol=fgnindollars
          4=dollarsinfgn;
   nulls updated=n fgnindollars=n
         dollarsinfgn=n country=n;
   load;
run;

This example only sends a Microsoft SQL Server SQL GRANT statement to the SAMPLE database and does not create a new table. Therefore, the TABLE= and LOAD statements are omitted.

proc dbload dbms=SQLSVR;
   user='myusr1';
   password='mypwd1';
   dsn=sample;
   sql grant select on myusr1.exchange
      to testcase;
run;
Last updated: February 3, 2026