Page 1 of 1 CLASS For Windows THIS INFORMATION IS TO BE USED ONLY AS A GUIDE Questions What files need to be backed up for Class SQL? How do I backup Class? Where are the Class databases? It is important to recognise that files can be moved and Class data may not necessarily be stored where Infospeed, or you think they should be. If unsure a check of the server for the following file types will identify where the Class databases are held. *.mdf *.ldf Where are the Class databases popularly held? 1. If you are using SQL Server (as opposed to MSDE) Class Server - Program files\microsoft SQL server\mssql\data Data normally holds all your Class databases (but check the names listed just in case) 2. If you are using MSDE Server (as opposed to SQL) Class Server - MSDE2000\MSSQL\Data Data normally holds all your Class databases (but check the names listed just in case) What needs to be backed up? 2 sets of data (held in different areas on your Server) need to be backed up. a. Class databases (as described above) b. Class documents, templates, and student pictures Normally held in c:\cfwsql (Class Server sub folders include documents, templates, pictures, setup) How do I backup the data? Remember 2 sets of data files (held in different areas on your Server) require to be backed up. 1. Ensure the CFWSQL folder and all its subfolders and files are included in your backup selection and copied to the backup media4.
Page 2 of 2 2. If you are using SQL Server (as opposed to MSDE) The SQL database engine is "in use" all the time and therefore can only be backed up using a backup product with an "open file manager" agent. Backup software like, Veritas BackupExec or Cheyenne Arcserve will have an agent for SQL and this needs to be purchased. Any attempt to copy a SQL database whilst it is running without special software will FAIL. YOU HAVE BEEN WARNED There are 3 options for backing up, and only the first method is recommended. a. Backup using software with an SQL agent or in use manager. Backup Exec with a SQL agent is an example of such software. The agent allows the working database to be backed up without having to shutdown the SQL server. NOTE - The agent option will only work if you have a full copy of Microsoft SQL Server installed. If you are running with a copy of MSDE installed then the agent option will not work as MSDE does not come with any of the Microsoft SQL Server tools which these backup agents require. If you are unsure as to which option you are running, please contact Infospeed. b. Stopping the SQL engine, backing up (conventional backup) then restarting the engine. Once the SQL service is stopped, the data files are then available for backing up as with normal files. This can be achieved by stopping the service on the server machine at a convenient point during the day to allow a conventional backup system to take copies of the database. As the data files are in use for much of the working day, this is a task, which is best run out-of-hours. The SQL service can be stopped at the end of the day and restarted the following day. Using the Windows Scheduler can automate the task to stop the SQL service at the end of the day, allowing a backup to be taken and then restarted again later ready for its continued use the following day. This task can be configured to continue indefinitely on a day-to-day basis without any user intervention needed. Please see the information on following pages re: Stopping and Starting the SQL database engine.
Page 3 of 3 Once you have configured the SQL service to start and stop at the desired time, it is your responsibility to ensure that your backup software is triggered while the service is stopped and that it backs up all the SQL data files. SQL data files are usually stored in a directory (on the SERVER) called x:\mssql7\data\ or x:\mssql2000\data\ or x:\program Files\Microsoft SQL Server\MSSQL\Data\. There may be more than one of these DATA directories if you run your database and transaction log on different volumes. If you are unsure as to the location of your database files, please contact Infospeed and we will help you determine the specific directory path. c. Use SQL 'Enterprise Manager' to create 'Maintenance Plans' for the databases. (See below) With the full blown SQL Server product, you can use the SQL 'Enterprise Manager' to create 'Maintenance Plans' for the databases. These Maintenance Plans allow you to perform rebuilds on the databases, run integrity checks, truncate the transaction Log file (keeping the database size to a minimum) and also to backup the databases to a.bak file. The Maintenance Plans can be scheduled to run every night at a specified time and all the tasks can be done while the databases are 'open' (although we would recommend that everyone should be logged out of Class to avoid conflicts!). There is no need to shut the Server or the SQL Services down to achieve this! Once the.bak files have been created, your backup software (Veritas for example) will be able to backup the.bak files without the need for buying the Veritas SQL Backup Agent (as this is only required for backing up the live databases; i.e..mdf &.ldf files). 3. If you are using MSDE (as opposed to SQL Server) Only options a. and b. above are available. Option b. - Stopping the SQL Engine: SQL can only be stopped/started from the server. 1. Ensure all users are out of Class. 2. At the bottom of the screen double click the icon
Page 4 of 4 4. Stop the engine (red button) 4. To start the engine (after backing up) you need to reverse the process by selecting the green arrow button. Failure to restart the engine will result in users getting the following message when signing on.
Page 5 of 5 THIS INFORMATION IS TO BE USED ONLY AS A GUIDE Please see the information on following pages re: Creating a Schedule for Stopping and Starting the SQL database engine. Once you have configured the SQL service to start and stop at the desired time, it is your responsibility to ensure that your backup software is triggered while the service is stopped and that it backs up all the SQL data files. SQL data files are usually stored in a directory (on the SERVER) called x:\mssql7\data\ or x:\mssql2000\data\ or x:\program Files\Microsoft SQL Server\MSSQL\Data\. There may be more than one of these DATA directories if you run your database and transaction log on different volumes. If you are unsure as to the location of your database files, please contact Infospeed and we will help you determine the specific directory path. We would suggest that you take full and complete backups of volumes wherever possible. BACKUP IS YOUR RESPONSIBILITY AND WE RECOMMEND THAT TEST RESTORES ARE DONE FROM TIME TO TIME (TO SPARE AREAS) TO CHECK THE INTEGRITY OF THE SYSTEM YOU USE. When backing up Class for Windows, there are three sections of data that must be backed up and restored together. These are: - 1. Class for Windows SQL databases The backup software client as described above can back up the databases. 2. Class for Windows SQL Shared Area (server machine) The shared area (usually called CFWSQL and mapped as i:) contains the user defined documents and reports. When the backup takes place, there must be no users logged into Class for Windows SQL. 3. Enterprise Accounts (if installed) If Enterprise is installed, this directory must be backed up. Often, this is installed in the shared area (as 2). If this is the case, it will be backed up with Class. Alternatively, it must be ensured that the backups include this data. When the backup takes place, Enterprise must not be in use by any users as it cannot be backed up when there are open files, unless an open file manager is installed. All three of these sections must be backed up and restored at the same time. It is not possible to restore one without restoring the others. Doing so will lead to corruptions and systems failures.
Page 6 of 6 How To Create A Schedule To STOP the SQL/MSDE Service The Windows Scheduler can be found in the Control Panel under Scheduled Tasks. To create a new task double click Add Scheduled Task. The wizard below will be displayed. Click Next
Page 7 of 7 From the list of programs select Service Manager and click next. Give the task a name such as Stop MSDE (or SQL), select how often you want it to run (this is usually Daily) and then click Next.
Page 8 of 8 Enter the Start time and frequency that you want to trigger this task Enter the user name and password to be used by this task.
Page 9 of 9 The task is now ready to be created. However, there is still some tailoring for us to do. Click the Open advanced properties for this task when I click Finish on. This dialog will now be displayed. The SQL/MSDE service manager requires an additional command instructing it what to do at the given time. This command will tell it to stop its service running. Add this text to the end of the Run: field: - -ACTION 6
Page 10 of 10 There is a space before the minus sign and before the 6 but no other spaces are needed. Your dialog should then look similar to the one above. Class for Windows SQL How To Create A Schedule To START the SQL/MSDE Service The Windows Scheduler can be found in the Control Panel under Scheduled Tasks To create a new task, double click Add Scheduled Task. The wizard below will be displayed.
Page 11 of 11 Click Next From the list of programs select Service Manager and click next. Give the task a name such as Start SQL or MSDE, select how often you want it to run (this is usually Daily) and then click Next.
Page 12 of 12 Enter the Start time and frequency that you want to trigger this task Enter the user name and password to be used by this task.
Page 13 of 13 The task is now ready to be created. However, there is still some tailoring for us to do. Click the Open advanced properties for this task when I click Finish on. This dialog will now be displayed. The MSDE service manager requires an additional command instructing it what to do at the given time. This command will tell it to start its service running. Add this text to the end of the Run: field: - -ACTION 1
Page 14 of 14 There is a space before the minus sign and before the 1 but no other spaces are needed. Your dialog should then look similar to the one above. Last Updated: August 06