Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 3880 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Using Filemaker 11 Server.

 

I have a server script that is going to several ess layouts based on ORACLE views over ODBC, and exporting the data to excel files in the Documents Folder on the server. A separate database has a scheduled server script to import the data into local Filemaker tables that mirror the ORACLE structure.

 

This works great when the ORACLE server is online, but when it goes offline (usually without notice), the script just hangs (it eventually times out at the time limit I have set on the server).

 

On the client I can do an Open File script step and check for an error before going to the ESS layout, but that script step is not supported on the Server. Is there some other way to test for availability before going to the layout to prevent it from hanging?

Posted

Set a relationship using constant or cartesian relationship between two tables one from each data source.

for eg FMTemp table of FileMaker database and OracleTemp Table of Oracle data source. Have one constant field (with value 1) and one record in both tables. Set relationship based on constant fields in two tables. Create layout based on FMTemp table and place the fields of OracleTemp table on this layout. Now before executing the import/export script, using above layout/relationship, check if OracleTemp table data (field value) is accessible. If yes, then proceed with further actions.

Posted

Set a relationship using constant or cartesian relationship between two tables one from each data source.

for eg FMTemp table of FileMaker database and OracleTemp Table of Oracle data source. Have one constant field (with value 1) and one record in both tables. Set relationship based on constant fields in two tables. Create layout based on FMTemp table and place the fields of OracleTemp table on this layout. Now before executing the import/export script, using above layout/relationship, check if OracleTemp table data (field value) is accessible. If yes, then proceed with further actions.

 

Unfortunately I have no control over the ORACLE schema. But wouldn't it have the same problem as my current script? My script is hanging as soon as it goes to the layout based on the ESS table, it does not even get to the export.

Posted

The best solution would be to use the "script sequence" feature of FMS.  Write an OS-level script (batch file or VBscript if you are on Windows) that tests the connection and exits with a non-zero result if the connection could not be established.

Configure the script sequence schedule to run the OS script first then the FM script.  If the OS script fails (and exits with that non-zero result) FMS will not run the FM script.

  • 3 weeks later...
Posted

The best solution would be to use the "script sequence" feature of FMS.  Write an OS-level script (batch file or VBscript if you are on Windows) that tests the connection and exits with a non-zero result if the connection could not be established.

Configure the script sequence schedule to run the OS script first then the FM script.  If the OS script fails (and exits with that non-zero result) FMS will not run the FM script.

 

Okay I am testing this out.

 

My batch file is:

ping -n 1 %1 > NUL
exit /b %errorlevel%

I pass in the server IP or server name in the script settings.

 

Currently the server is up so I also created the following batch file to test the failure condition.

exit /b -1

However, it still executes the filemaker script. Am I not returning the result properly? How have you achieved the short-circuiting effect you described?

This topic is 3880 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.