Utilities for SAS Federation Server

Introduction

SAS Federation Server contains several utilities that assist with management of your server environment, including database backup and restore. Utilities are available for the UNIX and Windows operating systems.

UNIX Utilities

Overview

UNIX server utilities are located in the /bin directory of the server’s configuration path.
Utility Name
Function
dfsadmin
./bin/dfsadmin start|stop|status|restart
Use for server administration.
dfsutil
./bin/dfsutil backup|restore
Use for database backup and restore. The options are backup and restore.
dfdbconf
./bin/dfdbconf A|D|X
ODBC configuration tool. Use to add new data sources or edit existing ones. The options are A –Add, D –Delete, and X – Exit.
dfdbview
ODBC viewer used to list data sources: ./bin/dfdbview –l(ist)
To test data sources and run SQL: ./bin/dfdbview DSN-name

dfsadmin – Server Administration

SAS Federation Server for UNIX contains the dfsadmin utility, located in the /bin directory of the server’s configuration path. Run any of the commands using the following syntax: ./bin/dfsadminyourcommand where yourcommand is one of the following:

start

Starts SAS Federation Server. Example: ./bin/dfsadmin start

stop

Stops SAS Federation Server. Example: ./bin/dfsadmin stop

status

Checks the run status of SAS Federation Server.

restart

Restarts SAS Federation Server.

dfsutil – Database Backup and Restore

It is recommended that you back up the SAS Federation Server databases periodically, especially the system catalog, SYSCAT.tdb. The dfsutil utility is located in the /bin directory of the server’s configuration path. With dfsutil, you can perform dynamic database backups without disruption to server operations. You can back up the system database (SYSCAT.tdb) and the default SQL logging database (SQL_Log). However, you cannot back up the SQL logging database with dfsutil if it uses a third-party data store. You can also restore databases using dfsutil if the database was backed up using the same utility.
Note: If you back up a database with dfsutil, then you are required to restore that database using dfsutil.
The following procedures describe how to use dfsutil to perform a backup and restore for a SAS Federation Server database. Note that you can run backups while the server is running.

Backup

Back up a SAS Federation Server database using the dfsutil command: UNIX
To back up a database, use the dfsutil command with the –db parameter. Note that you can run this command while the server is operational. Using the configuration path, navigate to the directory that contains /bin and use the following command syntax:
.bin/dfsutil backup -db syscat /path_to_backup

Restore

Restore a SAS Federation Server database using the dfsutil command: UNIX
To restore a database, use the dfsutil command with the -db parameter. Using the configuration path, navigate to the directory that contains /bin and use the following command syntax:
.bin/dfsutil restore -db syscat /path_to_backup
Note: SAS Federation Server must be shut down prior to running a database restore.

dfdbconf – ODBC Configuration

Use dfdbconf to add a new data source or edit existing data sources in your ODBC configuration.
To add a new data source:
  1. Run the following command from the SAS installation directory: ./bin/dfdbconf
  2. Select A to add a data source.
  3. Select a template for the new data source by choosing a number from the list of available drivers.
  4. Set parameters for the driver as you are prompted to do so. The new data source is added to the odbc.ini file.

dfdbview – List and Test Data Sources

Use dfdbview to list data sources and run interactive SQL queries.
  • To list your configured data sources, run the following command: dfdbview —l.
  • Use the following command to connect to a data source and run SQL: ./bin/dfdbview DSN-name. For example, if you added a data source called my_oracle, run ./bin/dfdbview my_oracle. You might be prompted for a user name and password if there is additional security on the DSN. After establishing connection to the data source, you will see a prompt from which you can enter SQL commands and query the database. If the connection fails, dfdbview displays error messages describing one or more reasons for the failure.

Windows Utilities

dfsutil – Database Backup and Restore

It is recommended that you back up the Federation Server databases periodically, especially the system catalog, SYSCAT.tdb. Use dfsutil to back up and restore the system catalog. This utility is located in \bin of the configuration directory (for example, <drive>\SAS\config\Levn\FederationServer\bin). With dfsutil, you can perform dynamic database backups without disruption to server operations. If you back up a database with dfsutil, then you are required to restore that database using dfsutil.

Backup

Back up a SAS Federation Server database using the dfsutil command: Windows
To back up a database, use the –db parameter with the dfsutil command and include the name of the database in the backup statement. You do not need to stop the SAS Federation Server service to run this command. Here is the command syntax: drive:\SAS\config\Levn\FederationServer\bin>dfsutil backup -db syscat path_to_backup_directory\backup_filename
Here is an example backup command: c:\SAS\config\Lev1\FederationServer\bin>dfsutil backup -db syscat c:\dfsutilBackup\syscatbk.tdb

Restore

Restore a SAS Federation Server database using the dfsutil command: Windows
You can restore a database using dfsutil only if the database was backed up with dfsutil. To restore a database, use the -db parameter with the dfsutil command. Here is the command syntax: drive:\SAS\config\Levn\FederationServer\bin>dfsutil restore -db syscat\path_to_backup_directory\syscat.tdb
Here is an example restore command:
C:\SAS\config\Lev1\FederationServer\bin>dfsutil restore -db syscat\c:\dfsutilBackup\syscatbk.tdb
Note: All services for SAS Federation Server must be shut down prior to running a database restore.
Last updated: March 6, 2018