The following are examples of messages that might occur when you are registering tables to a SAS® metadata repository or when you are updating existing table metadata:
The approach that you take to troubleshooting depends on the version of SAS and of the SAS application that you are using to register tables or update table metadata. In general, you want to enable enhanced logging so that you can see the SAS steps that were run. These steps are usually either a METALIB procedure or series of SQL procedure steps. It can also be helpful to run the steps in a SAS programming environment in order to troubleshoot further.
Options for SAS Management Console, SAS Data Integration Studio, and the METALIB Procedure
SAS Management Console 9.4_M6
SAS Data Integration Studio 4.904 without Hot Fix D8U008
SAS Management Console 9.4_M5 and Earlier
SAS Data Integration Studio 4.903 and Earlier
Running Code in SAS to Troubleshoot Further
Working with Technical Support
This section provides an overview of troubleshooting options that you can use for SAS Management Console, SAS Data Integration Studio, and PROC METALIB.
metalibdebug: This option instructs SAS Management Console and SAS Data Integration Studio to enable trace logging on PROC METALIB by including the TL=16383 option on the procedure step. It also enables a prompt at the end of the table-registration process for you to view the log. The prompt is generated whether or not an error is encountered. The trace information is shown in the log.
Note: Adding the -metalibdebug option adds the TL= option only if you are registering a table. The option is not added to the METALIB step that is used to update existing table metadata.
ignoremetalib: This option instructs SAS Management Console and SAS Data Integration Studio to use a series of PROC SQL steps, Dictionary Tables, and SQL Pass-through queries to collect information that is used to register a table to the metadata. This is the legacy method that was used in versions 9.4_M5 and earlier, and 4.04 and earlier, respectively. It might be a viable circumvention to register tables if PROC METALIB is producing errors for which there is no circumvention.
Note: Adding the -ignoremetalib option changes only the method used to register tables. PROC METALIB is always used when updating table metadata. The option produces only a prompt to view the log if there are errors during table registration. You should also enable application logging to see the PROC SQL steps that are run. Application logging is enabled by adding the option -consoleLog.
consoleLog: This option instructs SAS Management Console and SAS Data Integration Studio to generate a log file. Each new instance of the application creates a log file in the system user's "application data" directory. For example, if you logged in to Windows or Linux with the user name jsmith, the file is in a path similar to the following:
For SAS Management Console:
For SAS Data Integration Studio:
Note that, for each new instance of SAS Management Console or SAS Data Integration Studio, a new file of the name SASMCErrorLog.txt or DataIntegrationStudio_Log.txt replaces the existing file. Technical Support recommends that you close SAS Management Console or SAS Data Integration Studio (to unlock the log file), and then rename the log file to prevent it from being overwritten on the next invocation of the respective application.
TL=: This statement option instructs PROC METALIB to write trace data to the SAS log. This option can be added to the PROC METALIB step if you are running the step in a stand-alone SAS session. TL=16383 is added by SAS Management Console and SAS Data Integration Studio if the -metalibdebug option is provided to the application.
Here are the tracing level (TL) values for PROC METALIB:
To request multiple tracing levels, sum the numbers for each level together. For example, if you run TL=5, the following are returned: 1: routine entry/exit AND 4: current table being processed.
SAS® 9.2 through SAS® 9.3 TS1M1 support up to TL=4094.
SAS® 9.3 TS1M2 through SAS® 9.4 TS1M1 support up to TL=4095.
SAS® 9.4 TS1M2 and later support up to TL=16383.
sastrace=: This SAS system option generates trace information from a database management system (DBMS) engine. The argument value shown below specifies that all SQL statements that are sent to the DBMS are also included in the log. Also use sastraceloc and nostsuffix as shown below to direct the trace data to the SAS log and to make the log output easier to read:
SAS Technical Support might request that you provide a different argument value for the sastrace option. The value determines which information is written to the SAS log. Refer to SASTRACE= SAS System Option in SAS/ACCESS 9.4 for Relational Databases: Reference, Ninth Edition for more information.
These versions of SAS Management Console and SAS Data Integration Studio use PROC METALIB to register tables to metadata. They support the following options:
Use -metalibdebug as the first approach to troubleshooting. SAS Management Console and SAS Data Integration Studio return a prompt at the end of processing for you to view the log. The log contains METALIB trace information and requests to the SAS Metadata Server shown in XML format.
Evaluate the log for messages that might help you identify the cause of the problem. For example, you might see an incorrect schema used in the database connection options.
Use -ignoremetalib to register tables using the legacy method, which uses PROC SQL steps to query the database for table information. This option might be a viable circumvention to register tables if PROC METALIB is producing errors for which there is no circumvention.
Use -ignoremetalib -consoleLog together to see the specific queries that were used to get tables, columns, indexes, primary keys, and foreign keys. Running the SQL steps in a separate SAS session is valuable to compare to the process in METALIB, and to more thoroughly investigate specific queries to the database. See Running Code in SAS to Troubleshoot Further.
These versions of SAS Management Console and SAS Data Integration Studio use PROC METALIB to register tables to metadata. They support the following options:
Use -consoleLog as the first approach to troubleshooting. Each new instance of SAS Management Console or SAS Data Integration Studio creates a log file in the system user's "application data" directory. Find the PROC METALIB step in that log and run it in a separate SAS programming session. In that program, you can specify other options such as TL= and sastrace=. See Running Code in SAS to Troubleshoot Further.
Use -ignoremetalib to register tables using the legacy method, which uses PROC SQL steps to query the database for table information. That might be a viable circumvention to register tables if PROC METALIB is producing errors for which there is no circumvention.
Use -ignoremetalib -consoleLog together to see the specific queries that were run to get tables, columns, indexes, primary keys, and foreign keys. Running the SQL steps in a separate SAS session is valuable to compare to the process in METALIB, and to more thoroughly investigate specific queries to the database. See Running Code in SAS to Troubleshoot Further.
These versions of SAS Management Console and SAS Data Integration Studio use a series of PROC SQL steps, Dictionary Tables, and SQL Pass-through queries to collect information that is used to register a table to the metadata. The sections above refer to this as the "legacy" method. PROC METALIB is supported in SAS code. These client versions did not use METALIB to register tables. METALIB is always used to update table metadata. They support the following option:
Use -consoleLog to begin troubleshooting. Each new instance of SAS Management Console or SAS Data Integration Studio creates a log file in the system user's "application data" directory. Find the PROC SQL steps in that log and run them in a separate SAS programming session. In that program, you can specify other options such as sastrace=. See Running Code in SAS to Troubleshoot Further.
The options for SAS Management Console and SAS Data Integration Studio are specified in the application's .ini file.
Since SAS Management Console and SAS Data Integration Studio use a SAS® Workspace Server session on the SAS® Application Server that is associated with the library (such as SASApp), you should also run your troubleshooting steps in a workspace server session, or be certain that your SAS session uses the relevant configuration properties and environment variables to assign the libname. SAS® Enterprise Guide® and SAS Data Integration Studio provide coding environments that meet this goal. Log on to the client application using the same user name as you do when logging in to SAS Management Console or SAS Data Integration Studio to register tables.
The step contains objectIds for the library and metadata folder. Here is an example showing LIBNAME and OPTIONS statements and a METALIB step where a table named CLASS was selected to register. The line spacing and line breaks look different in the log.
The PROC SQL steps are used only to query for table information. That information is used to register tables by internal processes in SAS Management Console and SAS Data Integration Studio. As such, the steps that follow do not write to the metadata and so metadata connection options are not required. You can use these steps to help troubleshoot the gathering of information from the database.
If you are working with SAS Technical Support, please attach the following to your Technical Support case:
If a password is present in the file, mask the password value before sharing the file with SAS Technical Support.