1 Reply Latest reply on Oct 28, 2009 9:49 AM by philmodjunk

    Scheduled Script - Export from FM to Oracle



      Scheduled Script - Export from FM to Oracle

      Your post

      I'm trying to execute a Script on FileMaker Server using scheduled ScriptMaker task - that import all records from FileMaker table to Oracle table. In Error.log I have found remark that this step is unsupported... Searching through web I have found that FMS 9 is not supporting Import/Export script steps.

      This script is working normally from FileMaker (first, deleting all records in Oracle and after it - import all records from FileMaker). But I want to automate this to work in late hours.

      Is there any other way to make it? I'm thinking about two ideas:
      1. SQL commands - insert into... but I don't know what is proper syntax, or with
      2. loop that will add new records in Oracle, then write some unique identifier (Unique_ID) in every row and after it just pull data through relationship (FileMaker:Unique_ID - Oracle:Unique_ID).

      Is there any Plug-in that can be self-triggered in FM database (but on FMS) just for exporting?

      Please, help me...

        • 1. Re: Scheduled Script - Export from FM to Oracle

          You can use a "robot" FM file to do this.


          Create a stripped down fmp file.

          Write a simple script:


          Perform Script [Specify the script in the hosted FMP file that does the export]

          Exit Application //closes the robot file


          Define an account name and password that matches an account name and password in the hosted file that has sufficient access to run your export script.

          Use File Options in the Robot File to:

            Set the file to open itself with the above described account and password

            Run the the script when the file opens.


          Install this file on a secure machine (I install FMP on the server and place this file on the server--since it runs after hours, it doesn't affect performance.) and use the OS to schedule when the file will open. On Windows systems, you can use Task Manager. In Mac systems, I believe there's a widget called "Chronos" or some such that can do the same.


          Note: one thing to be careful of is that if there are any problems like an infinite loop in the script being called by the robot file, it will continue to run even after the robot file has closed. I once had to close and reopen the db file on the server to interrupt such a script.