Difference between revisions of "COMPARE DATABASE"

From Lianjapedia
Jump to: navigation, search
(Description)
Line 3: Line 3:
  
 
==Syntax==
 
==Syntax==
COMPARE DATABASE <database1 name> WITH <database2 name> [TABLE <tablename> ] [TO FILE <filename.prg>]
+
COMPARE DATABASE <databasename1> WITH <databasename2> [TABLE <tablename> ] [TO FILE <filename.prg>]
  
 
==See Also==
 
==See Also==
Line 9: Line 9:
  
 
==Description==
 
==Description==
The COMPARE DATABASE command compares two databases, <database1 name> and  <database2 name>, and optionally generates an upgrade script, <filename.prg>, that can be packaged up and uploaded to a live system.  A script named upgrade.prg (compiled to upgrade.dbo) is automatically detected and installed by the Lianja Cloud Server without requiring any machine downtime when included in a deployed [[Lianja Package Manager|Lianja Package File]].
+
The COMPARE DATABASE command compares two databases, <databasename1> and  <databasename2>, and optionally generates an upgrade script, <filename.prg>, that can be packaged up and uploaded to a live system.  A script named upgrade.prg (compiled to upgrade.dbo) is automatically detected and installed by the Lianja Cloud Server without requiring any machine downtime when included in a deployed [[Lianja Package Manager|Lianja Package File]].
  
By default, all tables in database1 are compared, along with the database [[MetaData Editor|metadata]], [[Data_Files#Procs|stored procedures]] and [[Database Events|events]].  If the optional TABLE <tablename> clause is included, only the specified table is compared (and the database metadata, stored procedures and events).
+
By default, all tables in <databasename1> are compared, along with the database [[MetaData Editor|metadata]], [[Data_Files#Procs|stored procedures]] and [[Database Events|events]].  If the optional TABLE <tablename> clause is included, only the specified table is compared (and the database metadata, stored procedures and events).
  
 
Individual tables can also be compared using the [[COMPARE TABLE]] command.
 
Individual tables can also be compared using the [[COMPARE TABLE]] command.

Revision as of 05:27, 30 June 2020

Purpose

Compares two databases and optionally creates an upgrade Lianja/VFP script

Syntax

COMPARE DATABASE <databasename1> WITH <databasename2> [TABLE <tablename> ] [TO FILE <filename.prg>]

See Also

ADATABASES(), ADD TABLE, ALTER INDEX, ALTER TABLE, CHECK DATABASE, CHECK TABLE, CLOSE DATABASES, CLOSE TABLES, COMPILE DATABASE, COPY DATABASE, CREATE DATABASE, CREATE INDEX, CREATE TABLE, CREATE VIEW, DATABASE(), DBUSED(), DISPLAY DATABASE, DISPLAY INDEXES, DISPLAY SCHEMAS, DISPLAY TABLES, DROP DATABASE, DROP INDEX, DROP TABLE, GETENV(), INDEX, Lianja Package Files, Lianja Package Manager, LIST DATABASE, LIST INDEXES, LIST SCHEMAS, LIST TABLES, OPEN DATABASE, PACK, PACK DATABASE, REBUILD DATABASE, REINDEX DATABASE, SET AUTOCATALOG, SET EXCLUSIVE, USE

Description

The COMPARE DATABASE command compares two databases, <databasename1> and <databasename2>, and optionally generates an upgrade script, <filename.prg>, that can be packaged up and uploaded to a live system. A script named upgrade.prg (compiled to upgrade.dbo) is automatically detected and installed by the Lianja Cloud Server without requiring any machine downtime when included in a deployed Lianja Package File.

By default, all tables in <databasename1> are compared, along with the database metadata, stored procedures and events. If the optional TABLE <tablename> clause is included, only the specified table is compared (and the database metadata, stored procedures and events).

Individual tables can also be compared using the COMPARE TABLE command.

Example

compare database southwind with southwind_20190304 to file upgrade.prg
compare database southwind with southwind_20190304 table customers to file upgrade.prg