| Parameter |
Comments |
BUTTON |
The only values of interest are MULTIFILE and SINGLEFILE. MULTIFILE means each object found
is written to a separate file determined by sp_csv. SINGLEFILE writes to a single file
determined by you with the value of SCRIPTNAME. SINGLEFILE dumps only the DDL of stored
procedures.
|
SRCESERVER |
This is the server name where the source objects are to be copied from. Even though you
are logged into HRPAY (for example), you may specify any valid server name. The list
of server names are stored in the table http.dbo.CRON_KEYWORDS.
|
SRCEDATABASE |
This is the name of the database where the source objects are to be copied from. It is a
text field which means you must type the name yourself. Be careful if you are on a
case-sensitive server that the name is cased correctly.
In Oracle there is only one database, but to keep the naming consistent between Sybase
and Oracle, use SRCEDATABASE for the owner and use dbo for SRCEOWNER.
|
SRCEOWNER |
For Oracle you should specify "dbo." For Sybase you can either specify the owner
(like DELTEK or dbo) or leave this blank to specify all owners.
|
SRCENAME |
This is the object name. Leave this blank to specify all objects owned by SRCEOWNER.
|
SRCETYPE |
This is the object type. Leave this blank to specify all object types.
SRCETYPE, SCRENAME and SRCEOWNER work hand-in-hand with each other; for example, to
dump all procedures in database DELTEK to a single file, the SRCEOWNER would be NULL,
the SRCENAME would be NULL, the SRCETYPE would be PROCEDURE, and BUTTON would be set
to SINGLEFILE. This is how sp_defncopy calls sp_csv.
|
DESTSERVER |
This is the name of the server where these objects are to be copied to. DB8 is the
server name for Oracle.
|
DESTDATABASE |
If you are copying objects to Oracle, then you really want to specify the owner or
schema name here.
|
DESTOWNER |
If you are copying objects to Oracle, then you want to specify dbo here.
|
DESTNAME |
This field determines the name of the destination object. You can use it to change
the name of procedures, triggers, views and tables. All occurences of SRCENAME are
replaced by DESTNAME, but the replacement is case-sensitive. If your use and your
server are case-insensitive, then you could run then risk that not all occurences are
replaced. Normally, SRCENAME and DESTNAME are the same or DESTNAME is NULL in which
case its name is determined from SRCENAME. Specifying a DESTNAME while SRCENAME is
NULL doesn't make sense.
|
ROWCOUNT |
ROWCOUNT determines the maximum number of rows that should be exported. The default
is NULL which means all rows will be exported.
|
DDL |
This option determines if the object's definition should be created. This should be
TRUE for procedures, triggers and views. It should also be TRUE for tables if the
table does not exist or you want to recreate the table. Specifying FALSE for tables
makes sense if all you want to do is refresh the data.
|
CSV |
For tables this option determines whether or not the data in that table should be
copied as well. If FALSE, the table is created without any data. If TRUE and DDL
is FALSE, it is assumed that the table already exists. In this case, the table
is deleted before the data is copied.
|
UPLOAD |
UPLOAD determines whether or not the files should actually be loaded with Sybercron.
If FALSE, the files are created and transferred, but not loaded. If TRUE, the files
are loaded and removed.
If you choose FALSE, you can run the upload later. The procedure that does this is
called HTTP.dbo.UPLOAD. It requires a filename and e-mail address. A filename takes
the form
SERVER.DATABASE.OWNER.NAME
but SERVER, DATABASE, and OWNER will be assumed if you omit them.
|
MAILTO |
All results are sent to this e-mail address. It defaults to the e-mail address that
you used to register sp_csv.
|
TABLESPACE |
This option specifies the tablespace for tables. If you are copying a table to Sybase,
this option is ignored. If not specified, your table is created in your schema's default
tablespace.
|
INDEXSPACE |
This option specifies the tablespace for indexes. If not specified, TABLESPACE name is
used instead.
|
| Name |
Comments |
DESTSERVER |
This is the server name defined in Sybase's interface file or Oracle's nsnames.ora file.
Both represent valid server names (or hostnames) accessible through Sybernet.
|
HOSTNAME |
This is the unix hostname to use when transferring files between Sybase and Oracle. Sybase
files originate from spock.sri.com while Oracle files originate from tabit.sri.com.
|
USERNAME |
This is the username to use when transferring files between hosts. It is the unix username
that owns the destination directory for all file transfers (when required). The username for
spock.sri.com is www and the username for tabit.sri.com is oracle.
|
DIR |
This is the full pathname that will be used to transfer your files with SCP2. Files
are transferred only when HOSTNAME is different from the current host. If the two
hosts are the same, then it is assumed the files are written and read from the same
directory (and hence no transfer takes place). If the host names are not the same,
then this is the directory that should be used to transfer the files and where Sybernet
expects to see them reside.
|
PLATFORM |
This field determines if the destination server is SYBASE or ORACLE. It is required
because the routines that actually map objects between different platforms needs to
know the destination. While the source platform can be assumed, it is vital to know
if destination platform.
|
| Name |
Comments |
NAME |
SRCESERVER is the list of valid servernames that SP_CSV may be invoked from. For Sybase, you may list
all valid remote servers and all Oracle Servers. For Oracle, only the current servername should be
listed.
DESTSERVER is the list of valid servernames that SP_CSV may be invoked to. For Sybase and Oracle you
may include all valid remote servers (including the SRCESERVER).
SRCETYPE lists all the possible types that may be transferred. You will want to include all valid
types for the source server, although it doesn't make sense to transfer a FUNCTION from Oracle to
Sybase.
DDL is a Boolean (a string) that determines if the DDL (Data Definition Language) is required.
CSV is a Boolean (a string) that determines if the data (Comma Separated Values) is required.
UPLOAD is a Boolean (a string) that determines if the DDL and CSV scripts should be uploaded to the
destination server. When FALSE, the script (SERVERNAME.DATABASE.OWNER.NAME.sql) is created, but
not uploaded.
|
VALUE |
The list of valid options. For Boolean's, TRUE and FALSE should be specified. For all other values
see above.
|
TYPE |
This should be SELECT.
|
SIZE |
This should be set to "1".
|
STYLE |
Determines the datetime style when TYPE is DATETIME. This should be NULL.
|
minValue |
Determines the minimum value allowed. This should be NULL.
|
maxValue |
Determines the maximum value allowed. This should be NULL.
|
ALIGN |
Determines the alignment of numeric values. This should be NULL.
|
SCALE |
Determines the scaling of numeric data. This should be NULL.
|
COMMA |
Determines the separator in a list of SELECT values. This should be NULL.
|
CHECKED |
Determines the default value for this field.
|
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.
| 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, however, be sure to specify them in both servers.
|
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. Currently, register information
cannot be copied from Sybase to Oracle.
|
| Filename |
Description |
filename.ddl |
This file contains the DDL (Data Definition Language) for this object.
It contains everything needed to create this object.
|
filename.idx |
This file contains the DDL for any indexes that span this table.
|
filename.csv |
This file contains the comma separated data if the object you are copying is a table.
|
filename.dbg |
This file contains a count of the number of rows if the object you are copying is a table.
It is used throughout the copy to determine that all rows were extracted and inserted.
|
filename.sql |
This is the final script that combines all of the information from the above 4 files. If you
are copying a trigger, view, or procedure, only the DDL file is used to create this file. If
you are copying a table, then the DDL, IDX and CSV files are combined to create this file.
After the SQL file is created, the DDL, IDX, CSV, and DBG files are discarded. After the SQL
file is submitted through Sybercron, it too is discarded.
|