Creating an Instance with a Resource File

Create a Replication Agent instance and specify a resource file at the same time.

When you invoke ra_admin with the -r option, the utility first validates the specified resource file except:
  • If the Replication Agent for Microsoft SQL Server or Replication Agent for Oracle primary database user login does not exist in the primary data server, the utility creates it, if specified in the resource file (create_pds_username=yes). If the user login does exist in the primary data server but does not have all the required privileges, set create to yes, to have the utility grant all required permissions.

    If the Replication Agent for Microsoft SQL Server or Replication Agent for Oracle primary database user login does exist in the primary data server, has all the required privileges, and the resource file specifies that it should be created, the utility returns an error message and does not create the instance.

  • If the resource file specifies that the new Replication Agent instance should be initialized (initialize_instance=yes), then:
    • The Replication Agent primary database user login must either exist in the primary data server, or be created by ra_admin (create_pds_username=yes).

    • The resource file must specify that the Replication Agent instance should be started (start_instance=yes).

    Otherwise, the utility returns an error message and does not create the instance.

After validating the resource file successfully, ra_admin:
  • Creates and configures a Replication Agent instance, based on the contents of the specified resource file.

  • Creates or grants all required privileges for the instance user, if specified in the resource file.

  • Starts the new Replication Agent instance, if specified in the resource file.

  • Initializes the new Replication Agent instance, if specified in the resource file.

The utility also returns information about the instance created and the result.

If instance creation fails, ra_admin returns an error message and information about the failure.

Note: Sybase recommends that you validate a new resource file before you create a Replication Agent instance using the new resource file.
Invoke ra_admin, specifying the -r option and the name of the resource file:
ra_admin -r res_file

where res_file is the name of the resource file.

For example, if the resource file is named pubs2.rs, enter this at the command prompt:
ra_admin -r pubs2.rs
Results are returned as either:
  • Response-file processing completed.

    or

  • Response-file processing completed with errors.

If the instance creation is successful, you can begin using the new Replication Agent instance.

If the instance creation fails, you may have to:
  • Delete all files and subdirectories in the instance directory, and delete the instance directory from the Replication Agent installation directory.

  • Edit the resource file to correct the appropriate values.

Note: If the instance creation fails, use the error-recovery procedure before you attempt to create the instance again.
Related tasks
Validating a Resource File