Rollover Solution with SQL
Novell Cool Solutions: Tip
By Bill Sappington
Digg This -
Posted: 22 Feb 2006
Assuming your active server is named FIDO and you're in an SQL environment, here's a sample scenario for rollover:
You build another server called FIDO_EMERGENCY and you insert it into the tree. So now the issue becomes the UNC Path, stored in your SQL Database.
Question: Is the SQL server running on the NetWare box?
If yes, then you set things up so the Transaction log gets moved to FIDO_EMERGENCY on a regular basis so that the SQL servers stay in sync. This can be done at any interval you are comfortable with.
If no, then there is no sync problem; the problem is simply managing the SQL records on the SQL server.
Now let's say FIDO, for whatever reason, takes a dive, and you need FIDO_EMERGENCY to pick up the load. This becomes a very simple problem to handle.
Assume the UNC path is stored in one or more tables in the form of a string, such as:
\\FIDO\DATA\TheData\That\The\SQL\Server\Points\To\[some file name\]
Your simple solution is to use one or more SQL statements. Let's say the table that stores the data is called FOO, and the column is called BAR. When FIDO_EMERGENCY comes on-line, you run the following on the SQL server:
UPDATE FOO set BAR = '\\FIDO_EMERGENCY' || [use your SQL engine to pull everything AFTER the server name from the column BAR] where BAR like '\\FIDO%'
Depending on the table or column, you may not need the "where" clause; and it's even better if you don't, because then it will probably update the entire table in less than a minute. Now you can run this against any table/column pair that requires it.
If you don't want to hassle with a cron job that will, once a minute, copy files newer that X time over to FIDO_EMERGENCY from FIDO, then just rely on your backup tape or use a good backup utility to keep your volumes synced up.
With the above strategy you can be up in a matter of minutes on FIDO_EMERGENCY and then create a set of SQL statements to do the opposite of the one I outlined above, when FIDO comes back to life. If you don't know SQL, then have the SQL person in your organization create the SQL statement(s). You can set them up in a chain if there are multiple statements.
You now have a complete rollover solution. It may seem complicated, but it's really very simple. Remember, there is always more than one way to solve a problem.
Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com