Computer Architects

Computer Architects

CK 2005/146020/23

<% '******************************************************* '* ASP 101 Sample Code - http://www.asp101.com/ * '* * '* This code is made available as a service to our * '* visitors and is provided strictly for the * '* purpose of illustration. * '* * '* http://www.asp101.com/samples/license.asp * '* * '* Please direct all inquiries to webmaster@asp101.com * '******************************************************* %> <%= RetrieveAndIncrementCount() %> <% ' I placed this in a function so I wouldn't have to worry about ' any namespace collisions. For example... if this was inline ' code and someone named a variable strSQL in a file this file ' gets included into you'd get an error. This way you don't and ' there's no chance of the variables overwriting one another! Function RetrieveAndIncrementCount() ' From adovbs.inc: Const adOpenKeyset = 1 Const adLockPessimistic = 2 Const adCmdText = &H0001 ' Local variables Dim strFilename Dim strSQL Dim rsCounter Dim iCount ' Get filename and build SQL query strFilename = Request.ServerVariables("SCRIPT_NAME") strSQL = "SELECT page_name, hit_count FROM hit_count WHERE page_name='" & strFilename & "';" ' Open our recordset Set rsCounter = Server.CreateObject("ADODB.Recordset") ' Access version: 'rsCounter.Open strSQL, _ ' "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("counter_db.mdb") & ";", _ ' adOpenKeyset, adLockPessimistic, adCmdText ' SQL Server version: rsCounter.Open strSQL, "Provider=SQLOLEDB;Data Source=10.2.1.214;" _ & "Initial Catalog=samples;User Id=samples;Password=password;" _ & "Connect Timeout=15;Network Library=dbmssocn;", _ adOpenKeyset, adLockPessimistic, adCmdText ' If we've got a record then we read the current value ' If we don't then we create one, set the filename, and start at 0 If rsCounter.EOF Then rsCounter.AddNew iCount = 0 rsCounter.Fields("page_name").Value = strFilename Else rsCounter.MoveFirst iCount = rsCounter.Fields("hit_count").Value End If ' Increment the count and update the DB rsCounter.Fields("hit_count").Value = iCount + 1 rsCounter.Update ' Close our connection rsCounter.Close Set rsCounter = Nothing ' Return the count (pre-incrementation). RetrieveAndIncrementCount = iCount End Function %>

Your Efficiency is MY Challenge!!

Supported Initiatives

Home

About Us

Contact Us

Service List

Disaster Recovery

Backups

Tape Backups

CD / DVD Backups

Disk Backups

On-Line Backups

Health Checks

SLA's

Policy Documents

Networks

Upgrades

SPECIALS!!

Internet Services

Project List

Promo Product List

Fire, Theft or a System Crash will affect your business - make the necessary contingency plans now!!

What you need to know about Disaster Recovery

Disaster Recovery (DR) has never been high on the list of SME priorities when in fact, it should be at the top! Computer Architects offers DR solutions which are cost effective and “work” when its needed most, when a catastrophe occurs. There are various methods of implementing a DR Plan and one of the most successful methods is making use of “Ghost” (click here for software link).

The conventional method of resolving a disaster occurrence, has been to reload the computer from scratch once the replacement has arrived. If one buys preloaded operating system (OS) machines, then the original programs still have to be loaded, if the disks are still available. If again it is a server, then the directory shares have to be re-created as well. All this takes an exorbitant amount of time and if you have more than one server, the time is at least doubled. I hope you are beginning to get a picture of what your scenario could be??

Ghost is a piece of software that takes a “snapshot” of your entire hard drive, which then can be saved in almost any location. Ghost has predominantly been used for hard drive crashes in the past. However new innovations in restoring the snapshot data have been realized and it is now possible to restore the snapshot onto almost any other computer. The trick is to re-install the hardware drivers for the new computer during the restore of the old hard drive.

Restoring a Ghost snapshot even with re-loading drivers, will only take between 2-4 hours (depending on the size of the hard drive snapshot). Restoring using the conventional method will and can take up to 6-8 hours per machine, again depending on the size of the hard drive and the number of programs that need to be re-loaded.

· Limited Downtime after a disaster situation.

· Simple to set up and configure, just as easy to restore.

Andy van Eyk

Mobile: 082-571-2751

Fax: 086-688-6827

E-mail: andy@comparch.co.za

To contact us:

Disaster Recovery