Oracle8i Supplied Packages Reference
Release 8.1.5

A68001-01

Library

Product

Contents

Index

Prev Next

36
DBMS_REPCAT_INSTANTIATE

The DBMS_REPCAT_INSTANTIATE package instantiates deployment templates.

Summary of Subprograms

Table 36-1 DBMS_REPCAT_INSTANTIATE Package Subprograms
Subprogram  Description 
DROP_SITE_INSTANTIATION 
procedure
 

Public procedure that removes the target site from the DBA_REPCAT_TEMPLATE_SITES view.  

INSTANTIATE_OFFLINE 
procedure
 

Public procedure that generates a script at the master site that is used to create the snapshot environment at the remote snapshot site while offline.  

INSTANTIATE_ONLINE 
procedure
 

Public procedure that generates a script at the master site that is used to create the snapshot environment at the remote snapshot site while online.  

DROP_SITE_INSTANTIATION procedure

This procedure drops a template instantiation at a target site. This removes all related meta data at the master site and disables the specified site from refreshing their snapshots. You must execute this procedure as the user that originally instantiated the template.


Note:

To see who instantiated the template, query the REPCAT_TEMPLATE_SITES view.  


Syntax

DBMS_REPCAT_INSTANTIATE.DROP_SITE_INSTANTIATION (
   refresh_template_name  IN   VARCHAR2,
   site_name              IN   VARCHAR2,
   repapi_site_id         IN   NUMBER := -1e-130);

Parameters

Table 36-2 DROP_SITE_INSTANTIATION Procedure Parameters
Parameter  Description 
refresh_template_name
 

The name of the deployment template to be dropped.  

site_name
 

Identifies the Oracle server site where you want to drop the specified template instantiation. (If you specify a site_name, then do not specify a repapi_site_id)  

repapi_site_id
 

Identifies the REPAPI location where you want to drop the specified template instantiation. (If you specify a repapi_site_id, then do not specify a site_name.)  

INSTANTIATE_OFFLINE procedure

This function generates a script at the master site that is used to create the snapshot environment at the remote snapshot site while offline. This generated script should be used at remote snapshot sites that are not able to remain connected to the master site for an extended amount of time. This is an ideal solution where the remote snapshot site is a laptop. Use the packaging tool in Replication Manager to package the generated script and data into a single file, that can be posted on an FTP site or loaded to a CD-ROM, floppy disk, etc. See "Deploying Template" in the Oracle8i Replication manual for more information.

The script generated by this function is stored in the USER_REPCAT_TEMP_OUTPUT temporary view and is used by several Oracle tools, including Replication Manager, during the distribution of deployment templates. The number returned by this function is used to retrieve the appropriate information from the USER_REPCAT_TEMP_OUTPUT view.

The user that executes this public procedure will become the "registered" user of the instantiated template at the specified site.


Note:

This procedure is used in performing an offline instantiation of a deployment template.

This procedure should not be confused with the procedures in the DBMS_OFFLINE_OG package (used for performing an offline instantiation of a master table) or with the procedures in the DBMS_OFFLINE_SNAPSHOT package (used for performing an offline instantiation of a snapshot). See these respective packages for more information on their usage.  


Syntax

DBMS_REPCAT_INSTANTIATE.INSTANTIATE_OFFLINE(
   refresh_template_name   IN   VARCHAR2,
   site_name               IN   VARCHAR2, 
   runtime_parm_id         IN   NUMBER   := -1e-130,
   next_date               IN   DATE     := SYSDATE,
   interval                IN   VARCHAR2 :'SYSDATe + 1')
  RETURN NUMBER;

Parameters

Table 36-3 INSTANTIATE_OFFLINE Procedure Parameters
Parameter  Description 
refresh_template_name
 

Name of the deployment template to be instantiated.  

site_name
 

Name of the remote site that is instantiating the deployment template.  

runtime_parm_id
 

If you have defined runtime parameter values using the INSERT_RUNTIME_PARMS procedure, then specify the ID used when creating the runtime parameters. (The ID was retrieved by using the GET_RUNTIME_PARM_ID function.)  

next_date
 

Specifies the next refresh date value to be used when creating the refresh group.  

interval
 

Specifies the refresh interval to be used when creating the refresh group.  

Exceptions

Table 36-4 INSTANTIATE_OFFLINE Function Exceptions
Exception  Description 
miss_refresh_
template
 

The deployment template name specified is invalid or does not exist.  

miss_user
 

The name of the authorized user is invalid or does not exist. Verify that the specified user is listed in the DBA_REPCAT_TEMPLATE_AUTH view; if user is not listed, then the specified user is not authorized to instantiate the target deployment template.  

bad_parms
 

All of the template parameters were not populated by the defined user parameter values and/or template default values. The number of pre-defined values may not have matched the number of template parameters or pre-defined value was invalid for the target parameter (i.e., type mismatch).  

Returns

Table 36-5 INSTANTIATE_OFFLINE Function Returns
Return Value  Description 

<system generated number>  

Specify the generated system number for the output_id when you select from the USER_REPCAT_TEMP_OUTPUT view to retrieve the generated instantiation script.  

INSTANTIATE_ONLINE procedure

This function generates a script at the master site that is used to create the snapshot environment at the remote snapshot site while online. This generated script should be used at remote snapshot sites that are able to remain connected to the master site for an extended amount of time, as the instantiation process at the remote snapshot site may be lengthy (depending on the amount of data that is populated to the new snapshots).

The script generated by this function is stored in the USER_REPCAT_TEMP_OUTPUT temporary view and is used by several Oracle tools, including Replication Manager, during the distribution of deployment templates. The number returned by this function is used to retrieve the appropriate information from the USER_REPCAT_TEMP_OUTPUT view.

The user that executes this public procedure will become the "registered" user of the instantiated template at the specified site.

Syntax

DBMS_REPCAT_INSTANTIATE.INSTANTIATE_ONLINE(
   refresh_template_name   IN   VARCHAR2,
   site_name               IN   VARCHAR2, 
   runtime_parm_id         IN   NUMBER   := -1e-130,
   next_date               IN   DATE     := SYSDATE,
   interval                IN   VARCHAR2 :'SYSDATe + 1')
  RETURN NUMBER;

Parameters

Table 36-6 Parameter for INSTANTIATE_ONLINE
Parameter  Description 
refresh_template_name
 

Name of the deployment template to be instantiated.  

site_name
 

Name of the remote site that is instantiating the deployment template.  

runtime_parm_id
 

If you have defined runtime parameter values using the INSERT_RUNTIME_PARMS procedure, then specify the ID used when creating the runtime parameters (the ID was retrieved by using the GET_RUNTIME_PARM_ID function).  

next_date
 

Specifies the next refresh date value to be used when creating the refresh group.  

interval
 

Specifies the refresh interval to be used when creating the refresh group.  

Exceptions

Table 36-7 Exception for INSTANTIATE_ONLINE
Exception  Description 

miss_refresh_template  

The deployment template name specified is invalid or does not exist.  

miss_user  

The name of the authorized user is invalid or does not exist. Verify that the specified user is listed in the DBA_REPCAT_TEMPLATE_AUTH view; if user is not listed, then the specified user is not authorized to instantiate the target deployment template.  

bad_parms  

All of the template parameters were not populated by the defined user parameter values and/or template default values. The number of pre-defined values may not have matched the number of template parameters or pre-defined value was invalid for the target parameter (i.e., type mismatch).  

Returns

Table 36-8 INSTANTIATE_ONLINE Function Returns
Return Value  Description 

<system generated number>  

Specify the generated system number for the output_id when you select from the USER_REPCAT_TEMP_OUTPUT view to retrieve the generated instantiation script.  




Prev

Next
Oracle
Copyright © 1999 Oracle Corporation.

All Rights Reserved.

Library

Product

Contents

Index