otherwise, without the priorwritten permission of iAnywhereSolutions, Inc. iAnywhere Solutions, Inc. is a subsidiary of Sybase, Inc.
Sybase, SYBASE (logo), AccelaTrade, ADAWorkbench,Adaptable Windowing Environment,Adaptive Component Architecture, Adaptive Server,
Adaptive Server Anywhere, Adaptive Server Enterprise, Adaptive Server Enterprise Monitor,Adaptive Server Enterprise Replication, Adaptive
Server Everywhere, Adaptive Server IQ, Adaptive Warehouse, AnswerBase, Anywhere Studio, Application Manager, AppModeler,
APT Workbench, APT-Build,APT-Edit, APT-Execute,APT-Library, APT-Translator, ASEP, AvantGo, AvantGo Application Alerts, AvantGo
Mobile Delivery, AvantGo Mobile Document Viewer, AvantGo Mobile Inspection, AvantGo Mobile Marketing Channel, AvantGo Mobile Pharma,
AvantGo Mobile Sales, AvantGoPylon, AvantGo Pylon Application Server, AvantGo Pylon Conduit, AvantGo Pylon PIM Server,AvantGo
Pylon Pro, Backup Server, BayCam, Bit-Wise, BizTracker, Certified PowerBuilder Developer, Certified SYBASE Professional, Certified SYBASE
Professional Logo, ClearConnect, ClientServices, Client-Library, CodeBank, Column Design, ComponentPack, Connection Manager, Convoy/DM,
Copernicus, CSP, Data Pipeline, Data Workbench,DataArchitect, DatabaseAnalyzer, DataExpress, DataServer, DataWindow, DB-Library,
dbQueue, Developers Workbench, Direct Connect Anywhere, DirectConnect, Distribution Director, Dynamic Mobility Model, Dynamo, e-ADK,
E-Anywhere, e-Biz Integrator, EC Gateway, ECMAP, ECRTP,eFulfillment Accelerator, Electronic Case Management, Embedded SQL, EMS,
Enterprise Application Studio, EnterpriseClient/Server, Enterprise Connect, Enterprise Data Studio, Enterprise Manager, Enterprise Portal (logo),
Enterprise SQL Server Manager, Enterprise Work Architecture, Enterprise Work Designer, Enterprise Work Modeler, eProcurement Accelerator,
eremote, Everything WorksBetter WhenEverything Works Together, EWA, E-Whatever, Financial Fusion, Financial Fusion (and design), Financial
Fusion Server, Formula One, Fusion Powered e-Finance,Fusion PoweredFinancial Destinations,Fusion PoweredSTP, Gateway Manager,
GeoPoint, GlobalFIX, iAnywhere, iAnywhere Solutions, ImpactNow, Industry WarehouseStudio, InfoMaker, Information Anywhere, Information
Everywhere, InformationConnect, InstaHelp, Intelligent Self-Care, InternetBuilder, iremote, iScript, Jaguar CTS, jConnect for JDBC,
KnowledgeBase, Logical Memory Manager, Mail Anywhere Studio, MainframeConnect, Maintenance Express, Manage Anywhere Studio, MAP,
M-Business Channel, M-Business Network,M-Business Server, MDI Access Server,MDI DatabaseGateway,media.splash, MessageAnywhere
Server, MetaWorks, MethodSet, ML Query, MobiCATS, My AvantGo, My AvantGo Media Channel, My AvantGo Mobile Marketing, MySupport,
Net-Gateway, Net-Library,New Era of Networks,Next Generation Learning, Next Generation Learning Studio, O DEVICE, OASiS, OASiS logo,
ObjectConnect, ObjectCycle, OmniConnect, OmniSQLAccess Module, OmniSQL Toolkit, Open Biz, Open Business Interchange, Open Client,
Open Client/Server, Open Client/Server Interfaces, Open ClientConnect, Open Gateway, Open Server, Open ServerConnect, Open Solutions,
Optima++, Orchestration Studio, Partnershipsthat Work, PB-Gen,PC APT Execute, PC DB-Net, PC Net Library, PhysicalArchitect, Pocket
PowerBuilder, PocketBuilder, Power Through Knowledge, power.stop, Power++, PowerAMC, PowerBuilder, PowerBuilderFoundation Class
Library, PowerDesigner, PowerDimensions, PowerDynamo,Powering the New Economy, PowerJ, PowerScript, PowerSite, PowerSocket,
Powersoft, Powersoft Portfolio, Powersoft Professional, PowerStage, PowerStudio, PowerTips, PowerWareDesktop, PowerWare Enterprise,
ProcessAnalyst, QAnywhere, Rapport, Relational Beans, RepConnector, Replication Agent, Replication Driver, Replication Server, Replication
Server Manager, Replication Toolkit, Report Workbench, Report-Execute, Resource Manager, RW-DisplayLib, RW-Library, S.W.I.F.T. Message
Format Libraries, SAFE, SAFE/PRO, SDF, Secure SQL Server,Secure SQL Toolset, Security Guardian, SKILS, smart.partners, smart.parts,
smart.script, SQL Advantage, SQL Anywhere, SQL Anywhere Studio, SQL Code Checker, SQL Debug,SQL Edit, SQL Edit/TPU,
SQL Everywhere, SQL Modeler, SQL Remote, SQL Server, SQLServer Manager, SQL Server SNMP SubAgent, SQL Server/CFT,
SQL Server/DBM, SQL SMART, SQL Station, SQL Toolset, SQLJ, Stage III Engineering, Startup.Com, STEP, SupportNow, Sybase Central,
Sybase Client/Server Interfaces, Sybase Development Framework, SybaseFinancial Server, Sybase Gateways, Sybase Learning Connection,
Sybase MPP, Sybase SQL Desktop, Sybase SQL Lifecycle, Sybase SQL Workgroup, Sybase Synergy Program,Sybase User Workbench, Sybase
Virtual Server Architecture, SybaseWare, Syber Financial, SyberAssist, SybMD, SyBooks, System 10, System 11, System XI (logo), SystemTools,
Tabular Data Stream, The EnterpriseClient/Server Company, TheExtensible SoftwarePlatform, The Future Is Wide Open, The Learning
Connection, The Model ForClient/Server Solutions, The Online Information Center, The Power of One, TotalFix, TradeForce,Transact-SQL,
Translation Toolkit, Turning Imagination Into Reality, UltraLite, UltraLite.NET, UNIBOM, Unilib, Uninull,Unisep, Unistring, URK Runtime Kit
for UniCode, Versacore, Viewer, VisualWriter, VQL, Warehouse Control Center, Warehouse Studio, Warehouse WORKS, WarehouseArchitect,
Watcom,Watcom SQL, Watcom SQL Server, Web DeploymentKit, Web.PB, Web.SQL, WebSights, WebViewer, WorkGroup SQL Server,
XA-Library, XA-Server, and XP Server are trademarks of Sybase, Inc. or its subsidiaries.
SubjectThis book describes all aspects of the SQL Remote data replication system
for mobile computing, which enables sharing of data between a single
Adaptive Server Anywhere or Adaptive Server Enterprise database and
many Adaptive Server Anywhere databases using an indirect link such as
e-mail or file transfer.
AudienceThis book is for users of Adaptive Server Anywhere and Adaptive Server
Enterprise who wish to add SQL Remote replication to their information
systems.
Before you begin☞ For a comparison of SQL Remote with other replication technologies,
see “ Introducing Replication Technologies” [Introducing SQL Anywhere
Studio, page 21].
ix
SQL Anywhere Studio documentation
This book is part of the SQL Anywhere documentation set. This section
describes the books in the documentation set and how you can use them.
The SQL Anywhere
Studio documentation
The SQL Anywhere Studio documentation is available in a variety of forms:
in an online form that combines all books in one large help file; as separate
PDF files for each book; and as printed books that you can purchase. The
documentation consists of the following books:
♦ Introducing SQL Anywhere Studio This book provides an overview of
the SQL Anywhere Studio database management and synchronization
technologies. It includes tutorials to introduce you to each of the pieces
that make up SQL Anywhere Studio.
♦ What’s New in SQL Anywhere Studio This book is for users of
previous versions of the software. It lists new features in this and
previous releases of the product and describes upgrade procedures.
♦ Adaptive Server Anywhere Database Administration Guide This
book covers material related to running, managing, and configuring
databases and database servers.
♦ Adaptive Server Anywhere SQL User’s Guide This book describes
how to design and create databases; how to import, export, and modify
data; how to retrieve data; and how to build stored procedures and
triggers.
♦ Adaptive Server Anywhere SQL Reference Manual This book
provides a complete reference for the SQL language used by Adaptive
Server Anywhere. It also describes the Adaptive Server Anywhere
system tables and procedures.
♦ Adaptive Server Anywhere Programming Guide This book describes
how to build and deploy database applications using the C, C++, and Java
programming languages. Users of tools such as Visual Basic and
PowerBuilder can use the programming interfaces provided by those
tools. It also describes the Adaptive Server Anywhere ADO.NET data
provider.
♦ Adaptive Server Anywhere SNMP Extension Agent User’s Guide
This book describes how to configure the Adaptive Server Anywhere
SNMP Extension Agent for use with SNMP management applications to
manage Adaptive Server Anywhere databases.
♦ Adaptive Server Anywhere Error Messages This book provides a
complete listing of Adaptive Server Anywhere error messages together
with diagnostic information.
x
♦ SQL Anywhere Studio Security Guide This book provides
information about security features in Adaptive Server Anywhere
databases. Adaptive Server Anywhere 7.0 was awarded a TCSEC
(Trusted Computer System Evaluation Criteria) C2 security rating from
the U.S. Government. This book may be of interest to those who wish to
run the current version of Adaptive Server Anywhere in a manner
equivalent to the C2-certified environment.
♦ MobiLink Administration Guide This book describes how to use the
MobiLink data synchronization system for mobile computing, which
enables sharing of data between a single Oracle, Sybase, Microsoft or
IBM database and many Adaptive Server Anywhere or UltraLite
databases.
♦ MobiLink Clients This book describes how to set up and synchronize
Adaptive Server Anywhere and UltraLite remote databases.
♦ MobiLink Server-Initiated Synchronization User’s Guide This book
describes MobiLink server-initiated synchronization, a feature of
MobiLink that allows you to initiate synchronization from the
consolidated database.
♦ MobiLink Tutorials This book provides several tutorials that walk you
through how to set up and run MobiLink applications.
♦ QAnywhere User’s Guide This manual describes MobiLink
QAnywhere, a messaging platform that enables the development and
deployment of messaging applications for mobile and wireless clients, as
well as traditional desktop and laptop clients.
♦ iAnywhere Solutions ODBC Drivers This book describes how to set
up ODBC drivers to access consolidated databases other than Adaptive
Server Anywhere from the MobiLink synchronization server and from
Adaptive Server Anywhere remote data access.
♦ SQL Remote User’s Guide This book describes all aspects of the
SQL Remote data replication system for mobile computing, which
enables sharing of data between a single Adaptive Server Anywhere or
Adaptive Server Enterprise database and many Adaptive Server
Anywhere databases using an indirect link such as e-mail or file transfer.
♦ SQL Anywhere Studio Help This book includes the context-sensitive
help for Sybase Central, Interactive SQL, and other graphical tools. It is
not included in the printed documentation set.
♦ UltraLite Database User’s Guide This book is intended for all
UltraLite developers. It introduces the UltraLite database system and
provides information common to all UltraLite programming interfaces.
xi
♦ UltraLite Interface Guides A separate book is provided for each
UltraLite programming interface. Some of these interfaces are provided
as UltraLite components for rapid application development, and others
are provided as static interfaces for C, C++, and Java development.
In addition to this documentation set, PowerDesigner and InfoMaker include
their own online documentation.
Documentation formatsSQL Anywhere Studio provides documentation in the following formats:
♦ Online documentation The online documentation contains the
complete SQL Anywhere Studio documentation, including both the
books and the context-sensitive help for SQL Anywhere tools. The online
documentation is updated with each maintenance release of the product,
and is the most complete and up-to-date source of documentation.
To access the online documentation on Windows operating systems,
choose Start ➤ Programs ➤ SQL Anywhere 9 ➤ Online Books. You can
navigate the online documentation using the HTML Help table of
contents, index, and search facility in the left pane, as well as using the
links and menus in the right pane.
To access the online documentation on UNIX operating systems, see the
HTML documentation under your SQL Anywhere installation.
♦ PDF books The SQL Anywhere books are provided as a set of PDF
files, viewable with Adobe Acrobat Reader.
The PDF books are accessible from the online books, or from the
Windows Start menu.
xii
♦ Printed books The complete set of books is available from Sybase
sales or from eShop, the Sybase online store, at
http://eshop.sybase.com/eshop/documentation
.
Documentation conventions
This section lists the typographic and graphical conventions used in this
documentation.
Syntax conventionsThe following conventions are used in the SQL syntax descriptions:
♦ Keywords All SQL keywords appear in upper case, like the words
ALTER TABLE in the following example:
ALTER TABLE [ owner.]table-name
♦ Placeholders Items that must be replaced with appropriate identifiers
or expressions are shown like the words
following example:
ALTER TABLE [ owner.]table-name
♦ Repeating items Lists of repeating items are shown with an element of
the list followed by an ellipsis (three dots), like
following example:
ADD column-definition [ column-constraint, .. . ]
One or more list elements are allowed. In this example, if more than one
is specified, they must be separated by commas.
♦ Optional portions Optional portions of a statement are enclosed by
square brackets.
RELEASE SAVEPOINT [ savepoint-name ]
owner
and
column-constraint
table-name
in the
in the
These square brackets indicate that the
square brackets should not be typed.
♦ Options When none or only one of a list of items can be chosen,
vertical bars separate the items and the list is enclosed in square brackets.
[ ASC | DESC ]
For example, you can choose one of ASC, DESC, or neither. The square
brackets should not be typed.
♦ Alternatives When precisely one of the options must be chosen, the
alternatives are enclosed in curly braces and a bar is used to separate the
options.
[ QUOTES { ON | OFF } ]
If the QUOTES option is used, one of ON or OFF must be provided. The
brackets and braces should not be typed.
savepoint-name
is optional. The
xiii
Graphic iconsThe following icons are used in this documentation.
API
♦ A client application.
♦ A database server, such as Sybase Adaptive Server Anywhere.
♦ A database. In some high-level diagrams, the icon may be used to
represent both the database and the database server that manages it.
♦ Replication or synchronization middleware. These assist in sharing data
among databases. Examples are the MobiLink Synchronization Server
and the SQL Remote Message Agent.
Many of the examples throughout the documentation use the Adaptive
Server Anywhere sample database.
The sample database is held in a file named
your SQL Anywhere directory.
The sample database represents a small company. It contains internal
information about the company (employees, departments, and finances) as
well as product information and sales information (sales orders, customers,
and contacts). All information in the database is fictional.
The following figure shows the tables in the sample database and how they
relate to each other.
asademo.db
, and is located in
xv
Finding out more and providing feedback
Finding out moreAdditional information and resources, including a code exchange, are
available at the iAnywhere Developer Network at
http://www.ianywhere.com/developer/
If you have questions or need help, you can post messages to the iAnywhere
Solutions newsgroups listed below.
When you write to one of these newsgroups, always provide detailed
information about your problem, including the build number of your version
of SQL Anywhere Studio. You can find this information by typing dbeng9
-v at a command prompt.
.
The newsgroups are located on the
newsgroups include the following:
iAnywhere Solutions has no obligation to provide solutions, information
or ideas on its newsgroups, nor is iAnywhere Solutions obliged to provide
anything other than a systems operator to monitor the service and ensure
its operation and availability.
iAnywhere Solutions Technical Advisors as well as other staff assist on the
newsgroup service when they have time available. They offer their help
on a volunteer basis and may not be available on a regular basis to provide
solutions and information. Their ability to help is based on their workload.
forums.sybase.com
news server. The
FeedbackWe would like to receive your opinions, suggestions, and feedback on this
documentation.
You can e-mail comments and suggestions to the SQL Anywhere
documentation team at iasdoc@ianywhere.com. Although we do not reply
to e-mails sent to that address, we read all suggestions with interest.
xvi
In addition, you can provide feedback on the documentation and the
software through the newsgroups listed above.
xvii
xviii
PART I
INTRODUCTION TO SQL
REMOTE
This part describes the concepts, architecture, and features of SQL Remote.
The material in this part refers to both SQL Remote for Adaptive Server
Anywhere and SQL Remote for Adaptive Server Enterprise.
CHAPTER 1
Welcome to SQL Remote
About this chapterThis chapter introduces SQL Remote and the documentation.
Contents
Topic:page
About SQL Remote4
About this manual5
3
About SQL Remote
SQL Remote is a data-replication technology designed for two-way
replication between a consolidated data server and large numbers of remote
databases, typically including many mobile databases.
SQL Remote replication is message based, and requires no direct
server-to-server connection. An occasional dial-up or e-mail link is
sufficient.
Administration and resource requirements at the remote sites are minimal.
The time lag between the consolidated and remote databases is configurable,
and can range from minutes to hours or days.
Sybase SQL Remote technology is provided in two forms:
♦ SQL Remote for Adaptive Server Anywhere Enables replication
between a consolidated Adaptive Server Anywhere database and a large
number of remote databases.
♦ SQL Remote for Adaptive Server Enterprise Enables replication
between a consolidated Adaptive Server Enterprise database and a large
number of remote Adaptive Server Anywhere databases.
This book describes both of these technologies.
In a SQL Remote installation, you must have properly licensed SQL Remote
software at each participating database.
☞ For a detailed introduction to SQL Remote concepts and features, see
“SQL Remote Concepts” on page 7.
☞ For a list of supported operating systems and message links, see
“Supported Platforms and Message Links” on page 445.
4
About this manual
This manual describes how to design, build, and maintain SQL Remote
installations.
The manual includes the following parts.
♦ Introduction to SQL Remote Replication concepts and features of
SQL Remote.
♦ Replication Design for SQL Remote Designing SQL Remote
installations.
♦ SQL Remote Administration Deploying SQL Remote databases and
administering a running SQL Remote setup.
♦ Reference SQL Remote commands, system tables, and other reference
material.
Product installation
This section describes installation of SQL Remote for Adaptive Server
Enterprise. If you obtained SQL Remote as part of another product, consult
the installation instructions for the product you purchased.
Chapter 1. Welcome to SQL Remote
❖ To install the SQL Remote software ( Windows )
1. Insert the CD-ROM into your CD-ROM drive.
2. If the installation program does not start automatically, start the
application on the CD-ROM.
3. Follow the instructions in the installation program.
❖ To install the SQL Remote software ( UNIX )
1. Consult the instructions for your operating system in the
Anywhere Read Me First
If you are using SQL Remote for Adaptive Server Enterprise, you must
install SQL Remote into any database you wish to replicate.
booklet.
Adaptive Server
☞ For information about installing SQL Remote into a database, see
“Setting Up SQL Remote” on page 19.
setup
5
CHAPTER 2
SQL Remote Concepts
About this chapterThis chapter introduces the concepts, design goals, and features of
SQL Remote.
Contents
Topic:page
SQL Remote components8
Publications and subscriptions11
SQL Remote features13
Some sample installations15
7
SQL Remote components
Message
system
transport
Data server
Message
Agent
Message
system client
The following components are required for SQL Remote:
♦ Data server An Adaptive Server Anywhere or Adaptive Server
Enterprise database-management system is required at each site to
maintain the data.
♦ Message Agent A SQL Remote Message Agent is required at the
consolidated site and at each remote site to send and receive SQL Remote
messages.
The Message Agent connects to the data server by a client/server
connection. It may run on the same machine as the data server or on a
different machine.
♦ Database extraction utility The extraction utility is used to prepare
remote databases from a consolidated database, during development and
testing, and also at deployment time.
♦ Message system client software SQL Remote uses existing message
systems to transport replication messages. A file-sharing “message
system” is provided, which does not require client software. Each
computer involved in SQL Remote replication using a message system
other than file sharing must have that message system installed.
♦ Client applications The applications that work with SQL Remote
databases are standard client/server database applications.
8
The data server
Client applications
Chapter 2. SQL Remote Concepts
The data server may be an Adaptive Server Enterprise or an Adaptive Server
Anywhere server. At the remote site the data server is commonly an
Adaptive Server Anywhere personal server, but can also be an Adaptive
Server Enterprise or Adaptive Server Anywhere server.
Client applications work with the data in the database. Client applications
use one of the client/server interfaces supported by the data server:
♦ For Adaptive Server Anywhere, the client application may use ODBC,
Embedded SQL, or Sybase Open Client to work with Adaptive Server
Anywhere.
♦ For Adaptive Server Enterprise, the client application may use one of the
Sybase Client Server interfaces, ODBC, or Embedded SQL.
Client applications do not have to know if they are using a consolidated or
remote database. From the client application perspective, there is no
difference.
The Message Agent
The SQL Remote Message Agent sends and receives replication messages.
It is a client application that sends and receives messages from database to
database. The Message Agent must be installed at both the consolidated and
at the remote sites.
For Adaptive Server Anywhere, the Message Agent is a program called
dbremote.exe
For Adaptive Server Enterprise, the Message Agent is a program called
ssremote.exe
on PC operating systems, and
on PC operating systems, and
dbremote
ssremote
on UNIX.
on UNIX.
9
Remote
database
Consolidated
database
Message
System
Message AgentMessage Agent
Message system client
If you are using a shared file message system, no message system client is
needed.
If you are using an e-mail or other message system, you must have a
message system for that client in order to send and receive messages.
10
Publications and subscriptions
A two-table synchronization definition
Article 1: all of
table A
Article 2: some rows and
columns from table B
+
X
X
X
X
X
X
X X X X X
X X X X X
XXXXX
X
X
X
X
X
X
X
X
X
X
The data that is replicated by SQL Remote is arranged in publications. Each
database that shares information in a publication must have a subscription
to the publication.
Chapter 2. SQL Remote Concepts
Data is organized into
publications
The publication is a database object describing data to be replicated.
Remote users of the database who wish to receive a publication do so by
subscribing to a publication.
A publication may include data from several database tables. Each table’s
contribution to a publication is called an article. Each article may consist of
a whole table, or a subset of the rows and columns in a table.
Periodically, the changes made to each publication in a database are
replicated to all subscribers to that publication. These replications are called
publication updates.
Messages are always
sent both ways
Remote databases subscribe to publications on the consolidated database so
that they can receive data from the consolidated database. To do this, a
subscription is created at the consolidated database, identifying the
subscriber by name and by the publication they are to receive.
SQL Remote always involves messages being sent two ways. The
consolidated database sends messages containing publication updates to
remote databases, and remote databases also send messages to the
consolidated database.
For example, if data in a publication at a consolidated database is updated,
those updates are sent to the remote databases. And even if the data is never
updated at the remote database, confirmation messages must still be sent
back to the consolidated database, to keep track of the status of the
11
replication.
Consolidated
database
Remote
database
PublishSubscribe
Publish
Subscribe
Data updates and
receipt confirmations
Data updates and
receipt confirmations
Both databases
subscribe
Messages must be sent both ways, so not only does a remote database
subscribe to a publication created at the consolidated database, but the
consolidated database must subscribe to a corresponding publication created
at the remote database.
When remote database users modify their own copies of the data, their
changes are replicated to the consolidated database. When the messages
containing the changes are applied at the consolidated database the changes
become part of the consolidated database’s publication, and are included in
the next round of updates to all remote sites (except the one it came from).
In this way, replication from remote site to remote site takes place via the
consolidated database.
Synchronizing a remote
database
12
When a subscription is initially set up, the two databases must be brought to
a state where they both have the same set of information, ready to start
replication. This process of setting up a remote database to be consistent
with the consolidated database is called synchronization. Synchronization
can be carried out manually, but the database extraction utility automates the
process. You can run the Extraction utility as a command-line utility or, if
you are using an Adaptive Server Anywhere consolidated database, from
Sybase Central.
The appropriate publication and subscription are created automatically at
remote databases when you use the SQL Remote database extraction utility
to create a remote database.
Loading...
+ 455 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.