When I manually run the script to import data from a SQL server it works fine.... When I schedule it on the FM server I get script error 3 Command is unavailable (for example, wrong operating system, wrong mode, etc.).............?
Are you able to run the script manually on the server or are you doing it on a local machine? The DSN you use on the server has to have the same name as the DSN on your local machine.
When you look at your script, toggle the compatibility mode to server to see what steps you are using that are not compatible. Also remember that a server-side schedule will run the OnOpen script if you have one so the rogue script step may be there.
I'm manually running the script with the solution open on the FM server.
Are you using a Windows server? It could be an architecture difference between your ODBC driver and FileMaker Server. If you are using FileMaker Server 13 or 14 ( and possibly 12 ), you have to use a 64 bit ODBC driver on Windows.
I had this same problem when I upgraded from FM11 to FM13 (Skipped 12).
Long story short; it turns out that you need both the 32 bit and 64 bit ODBC drivers loaded and configured on your FM server. They both need to have the same DSN name as well.
I believe the reason for this is because while the database itself is 64 bit the script engine on the server is actually 32 bit. It took me a week to figure this one out. The documentation kind of dances around this fact without coming out and stating it directly.
Hope this helps.
Thanks!!! I'll check on this.
Sent from my iPhone
Thanks... This doesn't seem to be the issue.
Are you on the correct layout when the server based import happens?
Yes... The scripts go to correct layout for the import. My error is "can not open file"
Silly thing to check, but make sure your password is correct in the Admin Console where you set up the schedule script. You might also try it as PSOS to see if it works that way to see if your schedule script is set up wrong. Also, you might look of there are external sources that the User ID you are using does not have access too.
I think you lost us a bit. You said before that it worked when you ran it yourself but that it did not run as an FMS schedule. And that your error was "3" (not supported script step).
Now you are saying that you are running it locally and that it fails and that you get error "can not open file"?
More details..... I'm using a windows server 2008 to host FMS14. I also run a copy of FMA14 on this server. I VPN to this server and use open remote to open the solution.
With the solution open I can run the import script. As I walk through the script I select the ODBC data source and get prompted for credential. I do so and the scripts imports the data into my table from the SQL server.
When I schedule it on FMS14..... I get script error. The FMS log give scripting error 3 and then Scripting error 802.
Hope this makes sense. Really stumped. This school district just recently updated to a newer MSSQL server version. May be a problem there?
Appreciate your time.... Thanks
Might be a dumb question but you say you enter credentials for the odbc connection when you run it manually? How is the scheduled script handling credentials? Sorry if I am off the mark: very new to FM but have had a bit to do with FM server and scripts. I am near the elevators on Level 4 if you want to catch up
I check the save credentials on the dialog box.
Yes... Like to connect and demo the issue. Thanks.
i am heading out to dinner by 6:30 so it might need to be tomorrow before breakfast perhaps? My server set up sounds identical to yours so I am sure we can figure it out
At Holsteins bar now...level 2 if you are nearby.
Hi. Sorry. I had already left for dinner. Let's try to catch up tomorrow. I hope I can help: I don't have much experience but I have certainly got scheduled SQL based scripts updating FM tables in my server.
Sent from mobile email.
Just in case this helps anyone else. Turns out that the ODBC connection on the FM server was set up to use Windows NT credentials. At the same time FM Server 14 was a recent install and was installed to run using the system account - which obviously had no credentials on the new SQL 2012 install. Workaround was to use the Windows User account as the account to run FM server. A better option was to create a SQL user account and set up the ODBC connection to connect via SQL credentials rather than Windows credentials.
Retrieving data ...