A user who is a member of the "SAS Administrators" group and has been granted the role "Management Console: Advanced" can create a Metadata Backup job via SAS 9.2 Management Console.
Right Click on 'Backup and Restore' Task under 'Metadata Utilities'.
Then select the Backup task created and choose either 'Run Job' or 'Deploy for Scheduling'.
Note that if you select the 'Deploy for Scheduling' task, you are only creating the .sas file that needs to be scheduled to run in batch on your server.
In Windows, just create a scheduled task around this .sas file. (But don't forget, this pauses/restarts the SAS Metadata Service. So you will need to restart the SAS Remote and JBoss Services to reconnect.)
An partial example of completing the scheduled task command line:
"c:\program files\sas\...\sas.exe" -sysin "c:\sas\ebiserver\lev1\...\jobs\Backup_B.sas"
Friday, October 09, 2009
Thursday, October 08, 2009
Configuration Manager Plugin for SAS Management Console 9.2
Included are several of the key elements of the new Configuration Manager Plugin that I heart.
1. Modifying the Web Connection Information
One of the MAIN items I love about the new version is the ability to modify the configuration of the Web Applications WITHOUT redeploying all the war files. You can modify the host name, port, url, etc from this location. Of course, this isn't magic, you will need to ensure that the changes do exist and the jBoss application is configured for those changes.
2. Settings without JAVA modifications.
Right Click on 'SAS Application Infrastructure', select 'Properties' and move to the 'Settings' tab. From here, the SAS Administrator can manage how the application interface operates.
Additional resources on how to get custom messages to display is available from SAS at: http://support.sas.com/kb/36/785.html
1. Modifying the Web Connection Information
One of the MAIN items I love about the new version is the ability to modify the configuration of the Web Applications WITHOUT redeploying all the war files. You can modify the host name, port, url, etc from this location. Of course, this isn't magic, you will need to ensure that the changes do exist and the jBoss application is configured for those changes.
2. Settings without JAVA modifications.
Right Click on 'SAS Application Infrastructure', select 'Properties' and move to the 'Settings' tab. From here, the SAS Administrator can manage how the application interface operates.
Additional resources on how to get custom messages to display is available from SAS at: http://support.sas.com/kb/36/785.html
Wednesday, October 07, 2009
Stored Process Pass-Thru Authentication
There are a couple of options with getting SAS Stored Processes to access Metadata Libraries.
1. Pre-Assignment of Libraries or Connecting as a Single (and therefore Shared) SAS User Account
The pre-assignment of libraries means that when the Object Spawner is initiated, the libraries are made available to the end users. Even if authentication is required, the users are connected with a single user/pwd (defined in SMC library). This is similar to how an autoexec.sas file works for Base SAS.
2. Without Pre-Assignment of Libraries:
Two options are available when pre-assignment of libraries isn't preferred.
A. To connect to libraries where authentication IS NOT required, the autoexec for the stp server is an appropriate location. (Such as C:\SAS\EBIserver\Lev1\SASApp\StoredProcessServer\autoexec_usermods.sas in SAS 9.2)
B. To connect to libraries where authentication IS required, the &_metauser and &_password reserved macro parameters must be passed through the stored process server into a libname statement. Therefore the libname statement must exist within the .sas stored process code itself OR within some macro/%include code that is called within the .sas stored process code. (Another option in SAS 9.2 is to utilize the INIT Options from SAS Management Console. http://support.sas.com/documentation/cdl/en/biasag/61237/HTML/default/stpopts.htm)
NOTE ~ This last option appears to be the ONLY mechanism to effectively pass authentication between the web and the Stored Process. UNLESS you use Integrated Windows Authentication (IWA) in SAS 9.2. That will even pass the credentials in a BASE SAS 9.2 session to a meta libname such as:
libname test odbc dsn="AdventureWorks".
1. Pre-Assignment of Libraries or Connecting as a Single (and therefore Shared) SAS User Account
The pre-assignment of libraries means that when the Object Spawner is initiated, the libraries are made available to the end users. Even if authentication is required, the users are connected with a single user/pwd (defined in SMC library). This is similar to how an autoexec.sas file works for Base SAS.
2. Without Pre-Assignment of Libraries:
Two options are available when pre-assignment of libraries isn't preferred.
A. To connect to libraries where authentication IS NOT required, the autoexec for the stp server is an appropriate location. (Such as C:\SAS\EBIserver\Lev1\SASApp\StoredProcessServer\autoexec_usermods.sas in SAS 9.2)
B. To connect to libraries where authentication IS required, the &_metauser and &_password reserved macro parameters must be passed through the stored process server into a libname statement. Therefore the libname statement must exist within the .sas stored process code itself OR within some macro/%include code that is called within the .sas stored process code. (Another option in SAS 9.2 is to utilize the INIT Options from SAS Management Console. http://support.sas.com/documentation/cdl/en/biasag/61237/HTML/default/stpopts.htm)
NOTE ~ This last option appears to be the ONLY mechanism to effectively pass authentication between the web and the Stored Process. UNLESS you use Integrated Windows Authentication (IWA) in SAS 9.2. That will even pass the credentials in a BASE SAS 9.2 session to a meta libname such as:
libname test odbc dsn="AdventureWorks".
Tuesday, October 06, 2009
Open up File Level Security for the BI Dashboard Configuration
(SAS 9.2) To get the SAS BI Dashboard to work appropriately, the users who have Role level access to modify and create Dashboards MUST also have read/execute/write access to the BIDashboard configuration folder (example of this location: C:\SAS\EBIserver\Lev1\AppData\SASBIDashboard4.2)
1. SAS Management Console:
The Group "BI Dashboard Administrators" by default is assigned to the Role "BI Dashboard: Administration". This must be assigned to those users who will be creating and modifying BI Dashboards.
Role "BI Dashboard: Administration" allows the SAS Administrator to Modify the Access Controls granted to BI Dashboard Administrators.
Finally, the Group "BI Dashboard Users" provides general viewing access of content for the SAS BI Dashboard product ~ meaning that if the Dashboard is going to move to the SAS Portal, those users should be included within this group.
2. Windows File Level Security:
Folder Level Access is then required for all SAS BI Dashboard Administrators.
SAS recognizes that this folder permissions structure isn't ideal and are planning to move this information into the metadata system in the next release of SAS BI Dashboard.
1. SAS Management Console:
The Group "BI Dashboard Administrators" by default is assigned to the Role "BI Dashboard: Administration". This must be assigned to those users who will be creating and modifying BI Dashboards.
Role "BI Dashboard: Administration" allows the SAS Administrator to Modify the Access Controls granted to BI Dashboard Administrators.
Finally, the Group "BI Dashboard Users" provides general viewing access of content for the SAS BI Dashboard product ~ meaning that if the Dashboard is going to move to the SAS Portal, those users should be included within this group.
Folder Level Access is then required for all SAS BI Dashboard Administrators.
SAS recognizes that this folder permissions structure isn't ideal and are planning to move this information into the metadata system in the next release of SAS BI Dashboard.
Monday, October 05, 2009
Automatic Updates of the SAS Data Libraries (and Tables) Metadata
The SAS 9.2 XML engine is very very very slick. I created an xml map to generate a dataset from xml generated during a metadata getobjects job to then run call execute statements for a proc metalib update. "Wait, you did what??!@#?&" you ask?
Here are my simple steps. This then can run in the background to update all the SAS Metadata to match the physical tables.
1. Generate XML results from a Metadata GetMetadataObjects Job
data _null_;
file request;
put '<GetMetadataObjects>';
put '<Reposid>$METAREPOSITORY</Reposid>';
put ' <Type>SASLibrary</Type>';
put ' <Objects/>';
put ' <NS>SAS</NS>';
put ' <Flags>0</Flags>';
put '</GetMetadataObjects>';
run;
2. Submit the Request to the Metadata Server
proc metadata in=request out=resultsfile; run;
3. Create an XMLMap file to read in the Metadata.
<?xml version="1.0" ?>
<SXLEMAP version="1.2">
<TABLE name="librefs">
<TABLE-PATH syntax="XPATH">/GetMetadataObjects/Objects/SASLibrary</TABLE-PATH>
<COLUMN name="library" retain="YES">
<PATH>/GetMetadataObjects/Objects/SASLibrary@Name</PATH>
<TYPE>character</TYPE>
<DATATYPE>STRING</DATATYPE>
<LENGTH>30</LENGTH>
</COLUMN>
</TABLE>
</SXLEMAP>
4. Utilize an XML map to then read these results into a SAS dataset.
libname out xml resultsfilepath xmlmap=mapfilepath;
5. Run call execute statements to update the metadata for each existing library.
data _null_;
set out.librefs;
call execute("proc metalib;");
call execute("omr (library='"library"' repname='Foundation');");
call execute("update_rule=(delete);");
call execute("run;");
run;
Here are my simple steps. This then can run in the background to update all the SAS Metadata to match the physical tables.
1. Generate XML results from a Metadata GetMetadataObjects Job
data _null_;
file request;
put '<GetMetadataObjects>';
put '<Reposid>$METAREPOSITORY</Reposid>';
put ' <Type>SASLibrary</Type>';
put ' <Objects/>';
put ' <NS>SAS</NS>';
put ' <Flags>0</Flags>';
put '</GetMetadataObjects>';
run;
2. Submit the Request to the Metadata Server
proc metadata in=request out=resultsfile; run;
3. Create an XMLMap file to read in the Metadata.
<?xml version="1.0" ?>
<SXLEMAP version="1.2">
<TABLE name="librefs">
<TABLE-PATH syntax="XPATH">/GetMetadataObjects/Objects/SASLibrary</TABLE-PATH>
<COLUMN name="library" retain="YES">
<PATH>/GetMetadataObjects/Objects/SASLibrary@Name</PATH>
<TYPE>character</TYPE>
<DATATYPE>STRING</DATATYPE>
<LENGTH>30</LENGTH>
</COLUMN>
</TABLE>
</SXLEMAP>
4. Utilize an XML map to then read these results into a SAS dataset.
libname out xml resultsfilepath xmlmap=mapfilepath;
5. Run call execute statements to update the metadata for each existing library.
data _null_;
set out.librefs;
call execute("proc metalib;");
call execute("omr (library='"library"' repname='Foundation');");
call execute("update_rule=(delete);");
call execute("run;");
run;
Subscribe to:
Posts (Atom)







