Running an SQL File

Table of Contents   Previous Page  Next Page    

When logged in as the administrator (mtadmin), you can run an SQL script file (provided by Support) directly against the database. This is an extremely powerful feature that allows data to be manipulated without any of the controls imposed by the normal MemberTies interface. It is critical that you understand what the file you plan to run will do. An SQL file can do anything from changing specific data to wiping out the entire database. Never run an SQL file if you do not know what it does!

Note: Most commands of this nature cannot be undone. Depending upon the type of file you are running, you may want to consider backing up the database first.

SQL Files are normally provided as part of a customization package, or to do a mass change of some kind at your request. For example, suppose you have a database of 10,000 members and you want to automatically change the telephone prefix for every address in a particular city. Doing this manually could take several hours, whereas an SQL  File could accomplish the same task in seconds.

Contact support if you think you have a need for this type of file. There is normally no charge for this, though complex files or files designed to provide some sort of increased functionality may incur a small fee.

Running an SQL File

1Login to MemberTies as the user "mtadmin".
2Choose Tools > Database Tools > Run SQL File.

 Choosing this option will force all open windows to close, and a file browsing window will appear.

3Use the Select Command File dialog to navigate to the file you want to run, then click Open.
4Depending on the nature of the file you are running, you may receive prompts, messages, or other windows or warnings. Follow the instructions that appear.
5When the script finishes, a results message of some kind will normally be displayed. This may be a simple, "Success" message, or it may be a window listing changed data.  It is normally a good idea to destroy a command file after it has served its purpose, so someone won't accidentally run it in the future.