Creates an UltraLite remote database from an existing SQL Anywhere consolidated database.
ulinit -a "SAconnection-string" -c "ULconnection-string" -n pubname [ options ]
Option |
Description |
---|---|
-a "SAconnection-string" |
Required. Connect to the SQL Anywhere database specified in the SAconnection-string. If you do not specify both a user ID and a password, the default UID of DBA and PWD of sql are assumed. |
-c "ULconnection-string" |
Required. Connect to the database as identified in the DBF or file_name parameter of your connection-string. If you do not specify both a user ID and a password, the default UID of DBA and PWD of sql are assumed. |
-n pubname |
Required. Add tables to the UltraLite database schema. pubname specifies a publication in the reference database. Tables in the publication are added to the UltraLite database. The tables must already exist in the reference database; ulinit does not create them for you. Specify the option multiple times to add tables from multiple publications to the UltraLite database. To add all tables in the reference database to the UltraLite database, specify -n*. |
-o [ extended-options ] |
Set the UltraLite extended database creation options. See Extended creation-time options. |
-p creator-ID |
Required for Palm OS. Create the database with the specified four character creator-ID of the UltraLite client application. |
-q |
Run in quiet mode—do not print messages. |
-s pubname |
Use the named publication from the reference database to set synchronization behavior. Supply more than one -s option to name more than one synchronization publication. If -s is not supplied, the UltraLite remote has no named publications. To synchronize with all publications in the reference database, type -s*. For more information on how to create publications for MobiLink synchronization, see Publications in UltraLite. |
-t file |
Specify the file containing the trusted root certificate. This certificate is required for server authentication. |
-w |
Do not display warnings. |
The SQL Anywhere reference database acts as the source for synchronization scripts, database configuration (for example, the collation sequence used), and table definitions for the UltraLite database file—basically schema-related information used to set up a new UltraLite database. The database you create is initially empty.
Use another database to source the information. You can:
Run ulload to load data from the reference database. See UltraLite Load XML to Database utility (ulload).
Synchronize data fromthe consolidated database. See UltraLite Synchronization utility (ulsync) and UltraLite Clients.
Alternate database creation methods If you want to create an UltraLite database without using a SQL Anywhere reference database, try one of the following methods:
If you want to initialize an UltraLite database from an RDBMS other than SQL Anywhere, use the Create Synchronization Model wizard in Sybase Central. When you run the wizard, you are prompted to connect to a consolidated database to obtain schema information.
If you want to create an empty UltraLite database that you can configure independent of any kind of reference database, use the ulcreate utility or the Create Database wizard for UltraLite.
UTF-8 encoding UltraLite typically uses the collation sequence defined in the reference database. However, you can still choose to use UTF-8 to encode the database, if your device requires encoded characters by setting the utf8_encoding property as part of your extended-options list.
However, there are cases where the ulinit utility restricts the collation sequences to those supported by UltraLite. To see a list of supported collations (and its corresponding codepage), run ulcreate -l at a command prompt. If your collation sequence is not supported by UltraLite, you should change it to one that is.
Palm OS databases Palm databases written to the desktop can be identified with the .pdb extension. See Palm OS.
However, once you deploy this file to the device, the extension is dropped.
Create a file called customer.udb that contains the tables defined in TestPublication. For example:
ulinit -a "DSN=dbdsn;UID=JimmyB;PWD=secret" -c DBF=customer.udb -n TestPublication
Create a file called customer.udb that contains two distinct publications. Specifically, Pub1 may contain a small subset of data for priority synchronization, while Pub2 could contain the bulk of the data. For example:
ulinit -a "DSN=dbdsn;UID=JimmyB;PWD=secret" -c DBF=customer.udb -n Pub1 -n Pub2 -s Pub1 -s Pub2
Create a file called customer.udb for Palm OS using a registered creator ID. For example:
ulinit -a "DSN=dbdsn;UID=JimmyB;PWd=secret" -c DBF=customer.udb.pdb -n TutCustomersPub -p creator-id