Connection Options

Introduction to Connection Options

The connection properties are required to establish a connection to the metadata server. You can establish a connection in the following ways:
  • Set the connection properties directly with the METASERVER=, METAPORT=, METAUSER=, METAPASS=, and METAREPOSITORY= system options, or the METASERVER=, METAPORT=, and METASPN= system options; see Specifying Connection Properties Directly.
  • Specify a stored metadata server connection profile with the METACONNECT= and METAPROFILE options; see Specifying a Stored Connection Profile.
  • Specify connection properties when you issue a metadata procedure; see Overview of Procedures for Metadata.
  • Specify connection properties when you issue the metadata LIBNAME statement; see LIBNAME Statement for the Metadata Engine .
  • When you are running interactively, you can be prompted for connection values. Prompting occurs when either METASERVER= or METAPORT= are not specified. Prompting also occurs when METAUSER= or METAPASS= are not specified, and a trusted peer or Integrated Windows authentication (IWA) connection is rejected. For information about trusted peer and IWA, see the SAS Intelligence Platform: Security Administration Guide.
If the connection fails, check the connection properties to be sure you have specified or omitted quotation marks exactly as documented.

Specifying Connection Properties Directly

Connection Options

The METAPASS= System Option, METAPORT= System Option, METAPROTOCOL= System Option, METAREPOSITORY= System Option, METASERVER= System Option, METASPN= System Option, and METAUSER= System Option each specify a connection property. Typically these values are set in a configuration file. METAPROTOCOL= is optional as there is currently only one supported value, which is the default.

Example: Configuration File

To set the default metadata server to use the password sasuser1, port 9999, repository myrepos, metadata server a123.us.company.com, and user ID myuserid, you would add the following lines to the configuration file:
-METAPASS  "sasuser1"
-METAPORT  9999
-METAREPOSITORY "myrepos"
-METASERVER "a123.us.company.com"
-METAUSER  "myuserid" 

Example: OPTIONS Statement

The following OPTIONS statement, which can be added to an autoexec file or directly to a SAS program, has the same effect as the configuration file example:
options metapass="sasuser1"
        metaport=8561
        metarepository="myrepos"
        metaserver="a123.us.company.com"
        metauser="myuserid";

Specifying a Stored Connection Profile

Connection Options

Instead of specifying individual connection options for the metadata server, you can use the METACONNECT= System Option and METAPROFILE System Option.
METAPROFILE must be specified at SAS invocation or in a configuration file. It specifies the pathname of an XML document that contains connection profiles. METACONNECT= can be submitted at any time. It specifies one named connection profile in the XML document. A connection profile contains metadata server connection properties, such as the name of the host computer on which the metadata server is invoked, the TCP port, and the user ID and password of the requesting user.
You can create connection profiles with the Metadata Server Connections dialog box. Open the dialog box by executing the SAS windowing environment command METACON. The dialog box enables you to save (export) one or more connection profiles to a permanent XML document. To learn more about the METACON command, see the online Help in the SAS windowing environment.
The connection profiles are similar to the ones that are used by SAS Management Console. However, SAS Management Console stores its connection profiles in a different way. For more information about connection profiles in SAS Management Console, see the online Help that is available from SAS Management Console.

Configuration File Example

Here is a configuration file example that invokes a user connection profile named Mike's profile:
-METAPROFILE "!SASROOT\metauser.xml" 
-METACONNECT "Mike's profile"