Executing Scripts through the Command Line

You can automate executing the scripts using the command line.

Note

The command line functionality is available only in certain editions of dbForge Schema Compare. For the detailed information on features availability in the dbForge Schema Compare editions, please refer to the Editions topic.

  1. Click Start.
  2. Type cmd in the Search programs and files text box and press the ENTER button.

    Note

    To run the Command Line in Windows 8:

    From the Desktop Mode

    • Move the mouse cursor to the exact lower left corner until the desktop shortcuts menu appears.
    • Right-click to see the shortcut menu and then click Run.

    From the Charms Bar

    • Move your mouse to the upper right corner until the Charms Bar appears.
    • Select Apps from the list and type run in the search box.
    • Click Run from the search results.

    Use Windows + R Shortcut Keys

    • In desktop mode, press the Windows + R keys, to show the Run command line.
  3. Type a path to the schemacompare.com file located in the dbForge Schema Compare for Oracle installation folder on your PC, and press the SPACE key.

     C:\Program Files\Devart\dbForge Schema Compare for Oracle\schemacompare.com
    
  4. To execute the corresponding script, use the /execute command, and press the SPACE key.

     C:\Program Files\Devart\dbForge Schema Compare for Oracle>schemacompare.com /execute /?
    
  5. Specify connection details of the server where to execute the script.

     C:\Program Files\Devart\dbForge Schema Compare for Oracle>schemacompare.com /execute 
     /connection:"User Id=scott;Server=dboracle;Unicode=True;Connection Timeout=0;Direct=True;Service Name=orcl1120;" 
    
  6. Specify the script file.

     C:\Program Files\Devart\
     dbForge Schema Compare for Oracle>schemacompare.com /execute 
     /connection:"User Id=scott;Server=dboracle;Unicode=True;Connection Timeout=0;Direct=True;Service Name=orcl1120;" 
     /inputfile "script.sql"
    
  7. Specify the password.

     C:\Program Files\Devart\dbForge Schema Compare for Oracle>schemacompare.com /execute 
     /connection:"User Id=scott;Server=dboracle;Unicode=True;Connection Timeout=0;Direct=True;Service Name=orcl1120;" 
     /inputfile "script.sql" /Password:mypsw
    
  8. To hide the command line window, use the /quiet command. (Useful for batch files).

     C:\Program Files\Devart\dbForge Schema Compare for Oracle>schemacompare.com /execute 
     /connection:"User Id=scott;Server=dboracle;Unicode=True;Connection Timeout=0;Direct=True;Service Name=orcl1120;" 
     /inputfile "script.sql" /Password:mypsw /quiet
    
  9. Press ENTER to run the process.

     If you use the /argfile  argument, all the following commands are specified inside an argfile:
    
/execute
/connection:"User Id=scott;Server=dboracle;Unicode=True;Connection Timeout=0;Direct=True;Service Name=orcl1120;" 
/inputfile "script.sql" 

In this case, the command line string will be written as follows:

C:\Program Files\Devart\dbForge Schema Compare for Oracle>schemacompare.com /argfile:myarg.txt

Arguments Used in Command Line

Select corresponding command line switches to perform the required operations: