|
Sybernet / Supplied Procedures Reference
Release 3.00 Jul 10, 2008 |
|
This proceudre adds a database to the HTTP schema. It adds SERVERNAME to the table LEIBNITZ_HOSTS making it available to Sybernet CVS and other processes. It also creates a database link of the same name and for the same purpose. It adds this to the table CRON_KEYWORDS so this database may be referenced in the Sybercron Register. SP_ADDSERVER also sets up a Sybercron job to run HTTP.HOUSE_KEEPING every Sunday morning. In some cases, depending on the servername, it will also assign some permissions.
Whenever you synch or create a new database, you also want to run SP_ADDSERVER in that database. If this database is going to be used with Sybernet CVS, then you also need to run SP_ADDSERVER in all databases that it refers to and in all databases that refer to it.
Procedure SP_ADDSERVER
(
SERVERNAME VARCHAR2 := HTTP.SERVERNAME
, PASSWORD VARCHAR2
) ;
| Parameter | Description |
|---|---|
servername |
The name of the database that you want to add. |
password |
The password of the HTTP schema. |
The following example illustrates how to add a new database to the HTTP schema:
SP_ADDSERVER('<database>','xxxxxxx');
Suppose I am adding a new database called DEV. In Sybernet CVS I want to copy objects from this database (DEV) to the database called PRO. To do so, I need to call SP_ADDSERVER in all databases that this database refers to and in all databases that refer to it.
SQLPlus
Enter username: http/xxxxxxx@dev
Connected to dev as http from somehost
Your sessionid is 2577308
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bi
SQL> sp_addserver('dev','xxxxxxx');
...
SQL> sp_addserver('pro','xxxxxxx');
...
SQL> connect http/xxxxxxx@oradev
Connected to oradev as http from somehost
Your sessionid is 9718894
Oracle9i Enterprise Edition Release 9.2.0.6.0 - Production
SQL> sp_addserver('dev','xxxxxxx');
...
SQL> quit
We first added DEV to itself. Yes, we need to do that. We then added PRO to DEV because DEV will copy objects from itself to PRO. DEV needs to know that PRO exists. We then connected to ORADEV so that Sybernet CVS can refer to DEV. It really ain't that complicated unless omit these steps. If you omit any of these steps, trouble-shooting could become a problem, although Sybernet tries its best to tell you what is wrong. When in doubt, do what I do: go back to step 1, read the instructions, and add all databases again!