Sybernet / Supplied Procedures Reference
Release 3.00
Mar 03, 2005
backwards forwards

HTTP.SP_HTML_LEIBNITZ

Although sa_role is required to run sp_csv, Sybernet Library Maintenance can be invoked by anyone. If you have sa_role you can copy any object you want, even between servers if you have a remote login in that server. If you do not have sa_role, then you may copy any objects that you own. If you are copying to another Sybase server (even the same server) then you will also need the approprate permission to create objects. For example, in database DELTEK you might have the permission to create views, but if don't have that same permission in database HTTP, then you will not be able to copy views from DELTEK to HTTP. You may, however, copy tables and views that you own to Oracle.

Having GRANT SELECT on an object is not good enough to use this facility. You must either own it because you are the DBO (database owner) or you must be aliased to DBO.

The results of the example below are exactly the same as the example above.



 
Source Server:
Source Database:
Source Owner:
Source Type:
 
Destination Server:
Destination Database:
 
Rowcount:
Tablespace:
Indexspace:
 
Copy Register:
 
 



invoking sp_html_leibnitz


Parameter Comments
Source Server
This is exactly the same as SRCESERVER in sp_csv. The difference is that you must be a remote user in each server you wish to access. When setting up remote users on Sybase, however, be sure to specify them in both servers.

On Oracle, sp_html_leibnitz uses database links to communicate with other Oracle instances. To create these links, you must have been granted CREATE DATABASE LINK. The general syntax for creating database links is as follows:

CREATE DATABASE LINK NAME CONNECT TO USERNAME IDENTIFIED BY PASSWORD USING 'NAME'
Currently, NAME must be one of TESLA or ORADEV when creating a database link on DB8. If you attempt to access an Oracle instance and no database link exists, you will get the following error:
Oops!

ORA-04054: database link TESLA.TABIT does not exist.
Consider this a warning. You can still copy objects to this instance, but only to your current schema.
Source Database
This is exactly the same as SRCEDATABASE in sp_csv. The list of database names is built dynamcially anytime you change the source server. If a database is in single-user mode or is damaged or is recoverying, it will not appear in the drop-down list.
Source Owner
This is exactly the same as SRCEOWNER in sp_csv except that the list of owners is built dynamcially each time you change the source database.
Source Type
This is exactly the same as SRCETYPE in sp_csv.
Destination Server
This is exactly the same as DESTSERVER in sp_csv. It unconditionally includes DB8 as a valid server name.
Destination Database
This is exactly the same as DESTDATABASE in sp_csv. If the destination server is DB8 (Oracle), then the database shown here will be exactly the same as the source database. That means if you are in database DELTEK and copy a table to Oracle, the only database you can choose is DELTEK.

It's confusing, but there is only one database in Oracle. What is referred to here as the destination database is really the owner in Oracle. Of course, DELTEK must also be a valid user in DB8 for the copy to be successful.

Rowcount
This is exactly the same as ROWCOUNT in sp_csv. This drop-down list allows you to specify how many rows you wish to copy from a table.
Tablespace
This is exactly the same as TABLESPACE in sp_csv. If specified, this value determines the tablespace for you tables. If not specified, your default tablespace is used instead.
Indexspace
This is exactly the same as INDEXSPACE in sp_csv. If specified, this value determines the tablespace for your indexes. If not specified, Tablespace is used instead.
Copy Register
When checked, this option copies this procedure's register information. Register information can be copied from Sybase to Sybase, from Sybase to Oracle, from Oracle to Oralce, but not from Oracle to Sybase.



Sybernet is a trademark of SRI International.
Copyright © 1996-2009 SRI International. All Rights Reserved.
Denis D. Workman / http://Sybernet.sri.com/