13.07.2015 Views

SAS/ACCESS 9.2 for Relational Databases: Reference, Fourth Edition

SAS/ACCESS 9.2 for Relational Databases: Reference, Fourth Edition

SAS/ACCESS 9.2 for Relational Databases: Reference, Fourth Edition

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

28 Protecting Connection In<strong>for</strong>mation 4 Chapter 3To delete a password, put a slash after the password:proc datasets library=vlib memtype=view;modify jobc204 (read=mypw/ alter=mydept/);run;Protecting Connection In<strong>for</strong>mationIn addition to directly controlling access to data, you can protect the data indirectlyby protecting the connection in<strong>for</strong>mation that <strong>SAS</strong>/<strong>ACCESS</strong> uses to reach the DBMS.Generally, this is achieved by not saving connection in<strong>for</strong>mation in your code.One way to protect connection in<strong>for</strong>mation is by storing user name, password, andother connection options in a local environment variable. Access to the DBMS is deniedunless the correct user and password in<strong>for</strong>mation is stored in a local environmentvariable. See the documentation <strong>for</strong> your DBMS to determine whether this alternativeis supported.Another way to protect connection in<strong>for</strong>mation is by requiring users to manuallyenter it at connection time. When you specify DBPROMPT=YES in a <strong>SAS</strong>/<strong>ACCESS</strong>LIBNAME statement, each user has to provide DBMS connection in<strong>for</strong>mation in adynamic, interactive manner. This is demonstrated in the following statement. Thestatement causes a dialog box to prompt the user to enter connection in<strong>for</strong>mation, suchas a user name and password:libname myoralib oracle dbprompt=yes defer=no;The dialog box that appears contains the DBMS connection options that are valid <strong>for</strong>the <strong>SAS</strong>/<strong>ACCESS</strong> engine that is being used; in this case, Oracle.Using the DBPROMPT= option in the LIBNAME statement offers severaladvantages. DBMS account passwords are protected because they do not need to bestored in a <strong>SAS</strong> program or descriptor file. Also, when a password or user namechanges, the <strong>SAS</strong> program does not need to be modified. Another advantage is that thesame <strong>SAS</strong> program can be used by any valid user name and password combination thatis specified during execution. You can also use connection options in this interactivemanner when you want to run a program on a production server instead of testing aserver without modifying your code. By using the prompt window, the new server namecan be specified dynamically.Note: The DBPROMPT= option is not available in <strong>SAS</strong>/<strong>ACCESS</strong> Interface to DB2under z/OS. 4Extracting DBMS Data to a <strong>SAS</strong> Data SetIf you are the owner of a DBMS table and do not want anyone else to read the data,you can extract the data (or a subset of the data) and not distribute in<strong>for</strong>mation abouteither the access descriptor or view descriptor.Note: You might need to take additional steps to restrict LIBNAME orPass-Through access to the extracted data set. 4If you extract data from a view that has a <strong>SAS</strong> password assigned to it, the new <strong>SAS</strong>data file is automatically assigned the same password. If a view does not have apassword, you can assign a password to the extracted <strong>SAS</strong> data file by using theMODIFY statement in the DATASETS procedure. See the Base <strong>SAS</strong> Procedures Guide<strong>for</strong> more in<strong>for</strong>mation.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!