User Tools

Site Tools


lure_command_line

Lure Command Line

All commands that are required to operate Lure are available on the command line. The same set of commands are supported on all platforms.

The basic form of the Lure command line API is as follows:

lure  command  [zero or more options]  [zero or more file or folder arguments]

File and folder arguments can be absolute or relative. If no file or folder argument is specified then this is equivalent to specifying ./ in other words the current directory.

Note that because there is a one-to-one mapping between objects in the database and files and folders on the file system, passing in file and folder arguments is equivalent to selecting a specific set of objects in the database to import or export.

The following table lists all commands and their options:

Command Options Description
export --over
--dry-run
--ignore-filters
--connect-file-name
Exports outgoing changes as DDL and PL/SQL source to the file system. Lure uses base files to distinguish between outgoing changes (changes made directly in the database) and incoming changes (changes made to source code on the file system). Incoming changes in the source files are retained during Export. Conflicts are detected (using base files) but not overwritten (unless the --over option is specified).
If one or more files and/or folders are specified as argument(s) then Lure exports only objects corresponding to these file and/or folders.
import --over
--dry-run
--connect-file-name
Installs incoming changes (changes made to source code in files) from the file system to the database. Outgoing changes from the database are retained during Import. Conflicts are detected (using base files) but not overwritten (unless the --over option is specified).
If one or more files and/or folders are specified as argument(s) then Lure imports only objects from the corresponding source files.
extract --ignore-filters
--connect-file-name
Exports all database source code to source files on the file system. Can only extract to an empty folder, i.e. no incoming changes can be present.
If one or more files and/or folders are specified as argument(s) then Lure exports only objects corresponding to these file and/or folders.
deploy --dry-run
--connect-file-name
Imports all source code from the file system to the target database without attempting to distinguish between incoming or outgoing changes (i.e. no base files are created or used). Deploy does not deploy from a folder with existing base files since the base files will not be correctly updated.
If one or more files and/or folders are specified as argument(s) then Lure imports only objects from the corresponding source files.
patch-test --connect-file-name Performs a test of all versioned patch files corresponding to all table source files specified as arguments. Lure logs to the console whether the patch file(s) was able to bring the corresponding table up to date.
compile --connect-file-name Compiles the corresponding schema(s) if a folder is specified as an argument or just the objects corresponding to a file if a source file is specified as an argument.
get-history --connect-file-name Connects to version control system (e.g. SVN or P4) and retrieves older versions of table source files corresponding to all versioned patch files present in the source folders. Lure then saves these files in the relative folder “data/tables/history”. Once the historic source files are available locally the Version Control setting can be set to Local. Subsequent deploy(ments) will not connect to the version control system since all version information is available locally.
set-active-connect-file This command requires a single file name argument which is the name of the lure-connect file to set as active connect file. This is used in the case where the root folder contains more than one connect file. Instead of having to specify the --connect-file-name argument the active connect file can be set. Subsequent execution of Lure commands on files within this root folder will use this active connect file.

The options change the behaviour of the commands as follows:

Option Description
--over When used with export all incoming changes (changes made directly to source files) are overwritten.
When used with import all outgoing changes (changes made directly in the database) are overwritten.
--dry-run Used with export, import and deploy. When this option is specified Lure logs to the console all required changes without actually implementing these changes, i.e. no database or source file changes are made.
--ignore-filters Used with export and extract to override include and exclude filters. A typical use case is for exporting table data. By default the include filter does not include any tables for exporting of data. The ignore filters option can be specified on the commandline to override the include filter and export the data of one or more tables. Subsequent operations will include the data of these tables as long as the corresponding data files exist on the file system. Once these data files are removed the default filters are again applied.
--connect-file-name This option is required if more than one Lure connect files are present in the root folder and no default Lure connect file has been set (using the set-active-connect-file command).

Examples

Example 1:
   lure export 

This is equivalent to

  lure export ./

All database objects corresponding to files in the current folder or any files in the folder subtree are exported.

Example 2:
   lure import --over CALC_EXCESS.lsql CALC_AVG_SAL.lsql

The stored functions CALC_EXCESS and CALC_AVG_SAL are imported, overwriting any changes that might have been made to these functions directly in the database. Since the file names are specified without the folders these two files have to be in the current directory for the Lure to find the files.

Example 3:
  lure deploy --connect-file-name prod.lure-connect c:\project\finance\HR

The connect file to use is specified directly after the --connect-file-name option. All source files within the subtree of the specified absolute folder will be deployed to the target database

lure_command_line.txt · Last modified: 2013/07/29 14:37 by admin

Page Tools