Additional Blogs by Members
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member
0 Kudos

Creating an XUSER KEY for MaxDB users to access a Database Instance

MaxDB has a rich set of tools and utilities that makes our tasks simplified in most cases. XUSER utility is one among the most useful features that maxDB has. This can be used to create a XUSER KEY for any existing MaxDB user and database instance. Once such a key is created the same can be used to access a MaxDB instance without providing the usual parameters such as user name, password, instance etc. This weblog explains the simple steps to create a XUSER KEY for an existing user and instance, and access the instance using the SQLCLI console and XUSER KEY.

Creating a XUSER KEY

The XUSER KEY can be created in the command prompt using the command xuser [options] set. Here the options include the key name, MaxDB Database user name, password and instance name also. The mode is set as INTERNAL by default if not specified. In the below example a XUSER KEY named XDBA is being created for the user DBA and the database instance KATHIR.



Displaying the XUSER KEY entries

The entries present in the XUSER KEY can be displayed using the command XUSER -U [KEY_NAME] LIST. The entries of the XUSER KEY created above is displayed in the below example.



Using the XUSER KEY in SQLCLI to access a Database instance

Now the created XUSER KEY can be used to access the MaxDB database instance in the SQLCLI console. Here the vital advantage is that KEY alone when passed to the SQLCLI will be sufficient to get connected to the instance. Thus, this has an advantage of secured authentication in SQLCLI.



Displaying the XUSER KEY entries

The entries present in the XUSER KEY can be displayed in the SQLCLI using the command \S. The entries of the XUSER KEY created above is displayed in the SQLCLI console below.



Deleting the XUSER KEY entries

The entries present in the XUSER KEY can be deleted using the command XUSER -U [KEY_NAME] CLEAR. The entries of the XUSER KEY created previously is deleted in the below example.



Advantages of XUSER KEY

1. The XUSER KEYS make the connection process easier for the tools like DBMCLI, SQLCLI etc.
2. Even SAP recommends that you only use XUSER in production systems.
3. User data and options are stored separately for each operating system user.
4. Authorizations at file system level ensure that these entries can only be used and changed by the operating system user who created them.
5. The XUSER KEYS can be very helpful if several database users work with the same computer but log on with different user names.