When you perform an upgrade from SAS 9.4 TS1M2 to SAS 9.4 TS1M3, SAS Metadata Server might fail to start after the metadata-server tier is upgraded.
In this scenario, the actual upgrade using the SAS® Deployment Manager completes successfully and does not report any specific error messages to the log. However, when SAS Metadata Server is stopped and subsequently restarted, it fails to initialize and reports the following message to the metadata server log:
Run the code available on the Full Code tab in this note. This program corrects the Usage Version in the metadata in the SAS Metadata Server ServerComponent.
Click the Hot Fix tab in this note to access the hot fix for this issue.
Product Family | Product | System | Product Release | SAS Release | ||
Reported | Fixed* | Reported | Fixed* | |||
SAS System | SAS Metadata Server | Solaris for x64 | 9.4_M2 | 9.4_M4 | 9.4 TS1M2 | 9.4 TS1M4 |
Linux for x64 | 9.4_M2 | 9.4_M4 | 9.4 TS1M2 | 9.4 TS1M4 | ||
HP-UX IPF | 9.4_M2 | 9.4_M4 | 9.4 TS1M2 | 9.4 TS1M4 | ||
64-bit Enabled Solaris | 9.4_M2 | 9.4_M4 | 9.4 TS1M2 | 9.4 TS1M4 | ||
64-bit Enabled AIX | 9.4_M2 | 9.4_M4 | 9.4 TS1M2 | 9.4 TS1M4 |
/***********************************************************************
* This program uses the SAS Open Metadata API data step functions to
* update the UsageVersion of the Server.Metadata ServerComponent
* object in metadata to 1000000.
*
* Modify the meta* options to supply correct connection parameters to
* the metadata server that contains the user information.
* Since the server will be PAUSED to ADMIN state, you will need to use
* an unrestricted account such as sasadm@saspw to connect.
***********************************************************************/
/*Connect to the metadata server*/
/** S T A R T E D I T H E R E **/
options metaserver="hostname"
metaport=8561
metauser="sasadm@saspw"
metapass="password"
metarepository="Foundation"
metaprotocol=BRIDGE;
/** E N D E D I T **/
/* Data step to retrieve the metadata ID of the Server.Metadata ServerComponent which needs to be updated
This step creates a Macro variable called "ServerIDToUpdate" to use in the PROC METADATA step which will
call UpdateMetadata.
*/
data work.Servers;
length
ServerId $ 17
ServerName $ 32
PubType $ 60
uri
type $ 256
UsageVer $ 32
;
label
ServerId = "Server Id"
ServerName = "Server Name"
PubType = "Server Type"
UsageVer = "Usage Version"
;
/* initialize values */
call missing(ServerId,ServerName,PubType,UsageVer,uri,type);
n=1;
/* Get the first ServerComponent object */
rc=metadata_getnobj("omsobj:ServerComponent?@Id contains '.'",n,uri);
if rc<=0 then
put "NOTE: rc=" rc
"There are no Servers defined in this repository"
" or there was an error reading the repository.";
/* Iterate through the ServerComponent objects and retrieve only the Id, Name, PublicType, and UsageVersion attributes */
do while(rc>0);
objrc=metadata_getattr(uri,"Id",ServerId);
objrc=metadata_getattr(uri,"Name",ServerName);
objrc=metadata_getattr(uri,"PublicType",PubType);
objrc=metadata_getattr(uri,"UsageVersion",UsageVer);
/* We are interested in the server with type Server.Metadata so only output that one. */
if PubType = 'Server.Metadata' then do;
/* DEBUG output: Write the attributes to the log to confirm which ServerComponent object is being updated. */
put "Updating ServerComponent object with original attributes: ";
put "-Metadata ID- " ServerId;
put "-Name- " ServerName;
put "-Public Type- " PubType;
put "-UsageVersion- " UsageVer;
/* Create a Macro variable to use in the PROC METADATA step which will call UpdateMetadata */
CALL SYMPUT("ServerIDToUpdate",ServerId);
output;
end;
n+1;
rc=metadata_getnobj("omsobj:ServerComponent?@Id contains '.'",n,uri);
end; /*do while rc*/
keep
ServerId
ServerName
PubType
UsageVer
;
run;
/*** Update the UsageVersion for the Server.Metadata ServerComponent to be 1000000
Macro variable %ServerIDToUpdate was set in the previous data step on the CALL SYMPUT invocation.
It contains the metadata ID of the Server.Metadata ServerComponent object which needs an updated UsageVersion
***/
options ls=max ps=max noquotelenmax ;
proc metadata
in="<UpdateMetadata>
<Metadata>
<ServerComponent
Id=""&ServerIDToUpdate""
UsageVersion=""1000000""/>
</Metadata>
<NS>SAS</NS>
<!-- OMI_TRUSTED_CLIENT flag -->
<Flags>268435456</Flags>
<Options/>
</UpdateMetadata>"
verbose;
run;
/*** Fetch the ServerComponent we just updated to verify that the UsageVersion was updated to the value 1000000
Review the "Response XML" in the SAS log to check that you see UsageVersion="1000000" returned.
***/
proc metadata
in="<GetMetadata>
<Metadata>
<ServerComponent Id=""&ServerIDToUpdate"" />
</Metadata>
<NS>SAS</NS>
<Flags>2056</Flags>
<Options>
</Options>
</GetMetadata>"
verbose;
run;
A fix for this issue for Base SAS 9.4_M3 is available at:
https://tshf.sas.com/techsup/download/hotfix/HF2/V01.html#58323Type: | Problem Note |
Priority: | medium |
Date Modified: | 2016-06-14 15:52:50 |
Date Created: | 2016-06-03 08:54:47 |