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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

The <strong>ACCESS</strong> Procedure <strong>for</strong> <strong>Relational</strong> <strong>Databases</strong> 4 Example 1: Update an Access Descriptor 909Accessing Data Sets and Descriptors<strong>SAS</strong> lets you control access to <strong>SAS</strong> data sets and access descriptors by associatingone or more <strong>SAS</strong> passwords with them. When you create an access descriptor, theconnection in<strong>for</strong>mation that you provide is stored in the access descriptor and in anyview descriptors based on that access descriptor. The password is stored in anencrypted <strong>for</strong>m. When these descriptors are accessed, the connection in<strong>for</strong>mation thatwas stored is also used to access the DBMS table or view. To ensure data security, youmight want to change the protection on the descriptors to prevent others from seeingthe connection in<strong>for</strong>mation stored in the descriptors.When you create or update view descriptors, you can use a <strong>SAS</strong> data set option afterthe ACCDESC= option to specify the access descriptor password, if one exists. In thiscase, you are not assigning a password to the view descriptor that is being created orupdated. Instead, using the password grants you permission to use the accessdescriptor to create or update the view descriptor. Here is an example:proc access dbms=sybase accdesc=adlib.customer(alter=rouge);create vlib.customer.view;select all;run;By specifying the ALTER level of password, you can read the AdLib.Customer accessdescriptor and create the Vlib.Customer view descriptor.Examples: <strong>ACCESS</strong> ProcedureExample 1: Update an Access DescriptorThe following example updates an access descriptor AdLib.Employ on the Oracletable Employees. The original access descriptor includes all of the columns in the table.The updated access descriptor omits the Salary and BirthDate columns.proc access dbms=oracle ad=adlaib.employ;/* update access descriptor */update adlib.employ.access;drop salary birthdate;list all;run;You can use the LIST statement to write all variables to the <strong>SAS</strong> log so that you can seethe complete access descriptor be<strong>for</strong>e you update it.

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

Saved successfully!

Ooh no, something went wrong!