merlyn383 Posted July 6, 2011 Posted July 6, 2011 I keep getting error 212 (invalid user account/password) when trying to run an import script, server side, on a hosted file. A bit of background: I have 2 hosted files, a Main Data file and a Data Import file. I have a server side script sequence to automatically import the data from Data Import to the Main Data file. A system script pauses the Data Import file, copies it to the Server Documents folder, and the resumes the file prior to executing the FM Script. The FM script in the Main Data file then imports data from various tables in the Data Import file into other tables in the Main Data file. The script runs perfectly if I manually execute it but it will not work when triggered by the server schedule. I've checked and rechecked the supplied credentials in the server schedule and they are correct. I've even tried different accounts and the admin account, nothing works server-side. Thoughts?
Wim Decorte Posted July 6, 2011 Posted July 6, 2011 You can't import directly from FM file to FM file with a server-side script. You need to export from the source file to a supported format (not fp7) and then run an import script in the other file.
merlyn383 Posted July 7, 2011 Author Posted July 7, 2011 That's what I had always thought as well. But Matt O'Dell told me at PoE NYC 2011 that you can do FM -> FM, the source just has to be a local file in the Server Documents or temp path. With that in mind a wrote a system script to pause the hosted file, copy it to the Server Documents folder, and resume the hosted file. I'm attaching a set of demo files. The two data files need to be hosted and the importDB.sh file needs to be in the Server Scripts folder. Once you've got the files in the right places make a schedule to perform a script sequence. The FM script is "Import from test_source" in the test_destination file and the importDB.sh file needs to be run prior to the FM script. This demo will work! But only because test_source has auto-login on. If you turn auto-login off it will fail, even though the credentials being used to open test_destination are the same as test_source. The credentials don't get passed from one file to the other and there is no way, in FM scripting, to open the second file server side. Note: the demo file were written for OS X. You'll have to write your own importDB.bat for Windows. SASE FM Import.zip
Wim Decorte Posted July 7, 2011 Posted July 7, 2011 Having auto-login set up is too much of a security risk for me and scripting an export/import into a CSV export is fast enough for my purposes. But nice to have the demo! Thanks.
merlyn383 Posted July 7, 2011 Author Posted July 7, 2011 I completely agree with the security risk. That's why I'm hoping to find a way to get it to work around that. But, alas, it seems that there is no way to do that.
Recommended Posts
This topic is 4886 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 accountSign in
Already have an account? Sign in here.
Sign In Now