You are on page 1of 55

PROJECT

Does this course material set carry the ³Mark of Authenticity´? If not, contact us at writetous@niitstudent.com

1.1 Administrating MS SQL Server 2000 Databases

CASE STUDY 1: ONLINE SALES, INC.

Online Sales, Inc. is a leading online book and music store based in Washington DC. The management of the store wants to expand its base operations and portfolio of products for their online store across the globe. As a part of its expansion plan, the management acquires e-commerce Web sites dealing in music, greeting cards, and books. This has helped them to increase their revenues instantly, because the acquired Web sites have their own customer base. The customer base of Online Sales, Inc. has also increased because all the e-commerce Web sites are now interlinked. In addition, acquisition has helped Online Sales, Inc. to increase their market presence across the globe. Online Sales, Inc. has now become a global brand. The management can also leverage on the infrastructure of the acquired e-commerce companies located in different parts of the world.

Current Setup
Currently, Online Sales, Inc. maintains its entire database on MySQL, an open-source and free RDBMS package. While the store enjoys the cost benefits of using an opensource and free RDBMS, the store faces many problems in maintaining the database. Being a free RDBMS, there is not enough technical support available for MySQL. The sales of the store are primarily linked to the performance of the database system and the Web site. However with an increase in customer base, the management is skeptical about using MySQL as a platform for maintaining its databases. With the expansion of the store, downtime of the database has also become a crucial factor for the management. Another problem for Online Sales, Inc. is that the acquired companies use different RDBMS packages, such as MS Access. The team of database administrators faces many problems in maintaining heterogeneous databases across the globe because it is not only a cumbersome job but also involves high operations. It also involves high maintenance costs, as the parent store now has to pay to that many service providers. Keeping in mind its expanding operations, the management has recently recruited Tom Wilkins as the Chief Technology Officer (CTO) for their organization. Tom needs to find a solution to the problems that have come up because of the expansion. Tom has been asked to consider the following factors while devising a database strategy: The database strategy should be robust to handle several million concurrent processes. The management of the store envisages a multifold increase in the client-base of the store and therefore, the database strategy must provide for future growth.

Administrating MS SQL Server 2000 Databases 1.2

The strategy should be in accord with the latest advances in database technology. This should enable the store to reap benefits both from financial and technological aspects. Security of databases and transactions should be an essential consideration while designing the database strategy. This would be essential, because the store would be handling the credit card details of a large customer base. In addition, the database would contain customer details, which needs to be secured from the competition. The database strategy should also ensure easy and robust maintenance plans.

Envisioned Setup
Tom proposes to convert all the databases of the store running on different RDBMS packages to MS SQL Server 2000. He suggests that the databases currently running on MS Access should either be converted to MS SQL Server 2000 or replaced by MS SQL Server 2000 databases. Tom proposes a database setup for the store as displayed in the figure.

MS SQL Server 2000 Database at the subsidiary location

MS SQL Server 2000 Database at the subsidiary location

Headquarter Database on MS SQL Server 2000

MS SQL Server 2000 Database at the subsidiary location

MS SQL Server 2000 Database at the subsidiary location

1.3 Administrating MS SQL Server 2000 Databases

In addition, Tom suggests that each subsidiary should have a dedicated Enterprise Data Planning (EDP) department reporting to the EDP department at the headquarters at Washington DC. The subsidiary EDP department would be responsible for: migrating existing databases running on various RDBMS packages to MS SQL Server 2000 Creating new SQL Server 2000 databases. Optimizing the databases. Setting security policies for various levels of users in the organization. Planning a database maintenance and backup schedule. This would include creation of Alerts to monitor the databases and hardware resources. As part of the maintenance plan, database administrators at the respective EDP departments should get warnings and alerts on mail.

Project Submission Details
The students will get 10 hours to complete the project. The activities to be performed during this period are: 1. Analyze the case study to identify the requirements of the organization. 2. Install SQL Server 2000 and create appropriate database designs. 3. Transfer the existing MS Access databases to SQL Server 2000. 4. Assign and create users, roles, and permissions on all databases. 5. Configure Linked Server. 6. Create appropriate Alerts to monitor database and hardware resources. 7. Create database maintenance plans. 8. Devise and implement backup and restore strategies. 9. Configure SQLMail and SQLAgentMail to send warnings and alert messages to the administrator. 10. Document the project by using the formats given in the later section. 11. Submit the documentation to the faculty. 12. After submitting the documentation, the project team will present the project in the class. The faculty will assign marks to the teams based on the evaluation criterions specified in this section.

Administrating MS SQL Server 2000 Databases 1.4

Project Timelines
The students should follow the given timelines to complete the project on time:

Session #
1.1

Task to be Performed
Analyze the case study to identify the requirements of the organization Install SQL Server 2000 Create appropriate database designs Transfer the existing MS Access databases to SQL Server 2000 Assign and create users, roles, and permissions on all databases Configure Linked Server Create appropriate Alerts to monitor database and hardware resources Create database maintenance plans Devise and implement backup and restore strategies Configure SQLMail and SQLAgentMail to send warnings and alert messages to the administrator Document the database design and the system processes involved in the project Create a presentation on the basis of the documentation

1.2 2 3.1

3.2

3.3 4.1

4.2 4.3 4.4

5.1

5.2

1.5 Administrating MS SQL Server 2000 Databases

such as Northwind or Biblio to do this. Schedule backups at specific intervals using the Database Maintenance Plan Wizard. its hierarchy.6 .Student Activity List S. 2 150 2. 30 6 Create a maintenance plan using the Database Maintenance Plan Wizard and automate schedule backups at specified intervals. such as setting growth size for the databases. Assign appropriate properties to the databases. students may use a sample SQL Server 2000 database. such as Northwind or Biblio. 45 5 Configure Linked Servers for data synchronization between headquarters and subsidiary locations. using the SQLMail and SQLAgentMail features of MS SQL Server 2000. Hint: Students can create alerts based on sample databases.No. Hint: Students should emulate the setup of a big organization.1 7 45 7. Design and Create database and tables for the headquarters as well as subsidiary locations.1 15 3 60 4 Assign and Create user roles and permissions for all the databases at the headquarters as well as subsidiary locations.1 Send warnings and alerts on mail to database administrators at the respective EDP departments. In addition. Hint: Students can use sample Access databases. 60 6. such as Pubs as a linked server. Activity Time (mins) 120 1 Install SQL Server 2000 on remote computers to create a virtual setup as per the above scenario. such as Northwind or Biblio. Create appropriate Alerts to monitor the databases and hardware resources. Documentation Total 15 8 60 600 Administrating MS SQL Server 2000 Databases 1. Hint: Students can make a sample MS Access database. the various departments etc. a linked server. Transfer the existing databases (MS Access) of the store to MS SQL Server 2000.

With the implementation of BPR. Due to offline database management.CASE STUDY 1: EASYBUY. They have also decided that each warehouse will update the respective regional office on the inventory status. the managers at the warehouses cannot report to their respective regional offices on a transactional basis. Current Setup In the current system. They are also apprehensive about the new setup. 1. Therefore.7 Administrating MS SQL Server 2000 Databases . because even though it would help them to automate the process of generating MIS reports. The managers also feel that the reports are inaccurate. the warehouses maintain their databases in MS Access. The company has regional offices in each state and warehouses in each city across the US. The management of the company decides to go for Business Process Re-engineering (BPR) to improve the business processes. the management of the company decides to receive daily reports from all regional offices. Currently. EasyBuy. none of the databases at the company are synchronized. is a leading American FMCG company. all the regional offices use SQL Server 2000 to maintain the transactions of all the warehouses in their respective states. the costs involved would increase appreciably. Each regional office is required to send a weekly report on the sales performance and inventory status of their warehouses to the headquarters. The warehouses maintain their own inventory and are responsible for supplying the goods to the distributors across the city. As part of the first phase of BPR. This would help regional offices to monitor the inventory situation in each warehouse closely and ensure just-in-time (JIT) delivery. With the current database setup. The company has its headquarters in California. the regional managers feel that they would require additional resources to send daily reports to the headquarters. they do a lot of manual verification before the reports are finalized and sent to California. However. The managers at the warehouses send the weekly status reports using e-mail. Inc. These updates have to be on a transactional basis. INC. Each regional office of the company is responsible for procurement of goods and administration of all warehouses within the state. the managers at the regional offices feel that the process of generating MIS reports is time consuming.

Master_DB (California) Warehouse Warehouse Each regional office would maintain its own databases on SQL Server 2000. Inc. Each transaction at the warehouse would be replicated to the regional office. The database administrator at the headquarters would similarly create and assign roles and permissions for various levels of users at the headquarters. The database administrator at each location would create and assign roles and permissions for various levels of users at the regional office and the warehouses under the supervision of the respective regional office.8 . The headquarters would have a central database. Master_DB.Envisioned Setup The management at EasyBuy. the database administration team decides to: Administrating MS SQL Server 2000 Databases 1. Don suggests a multifold solution with the following key points: All warehouse databases should be converted to SQL Server 2000 from MS Access. recruits Don Allen. running on SQL Server 2000. Each regional office would have a database administrator. Regional Office Regional Office 1. To ensure smooth functioning of the company¶s business processes. All warehouse databases would be synchronized with the database of the governing regional office on a transactional basis. an IT consultant to find a solution to the above problems. Master_DB would be synchronized with all the regional office databases as displayed. The regional office databases would be synchronized with the Master_DB database.

For example. Analyze the case study to identify the requirements of the organization. and permissions on all databases.allow unrestricted growth of the size of the Master_DB database. optimize the databases by shrinking the log and data files to remove extra space.5-2. design an appropriate database solution for the entire corporate database setup. Install SQL Server 2000 and create appropriate database designs. and central databases on a daily basis.. 3. You also need to incorporate the suggestions made by Don Allen. 4. The activities to be performed during this period are: 1. take a differential backup of all warehouse. The faculty will assign marks to the teams based on the evaluation criterions specified in this section.9 Administrating MS SQL Server 2000 Databases . Configure the replication services. the size of the database should be kept around 1. After submitting the documentation. 8. the IT consultant. 6. 7. Project Submission Details The students will get 10 hours to complete the project. Assuming that you are a database administrator at EasyBuy. restore backups incase of server failure. the project team will present the project in the class. 10.) monitor all transactions recorded in the transaction log file using Transact-SQL queries. (Hint: The size of the database should be determined based on the volume of transactions. Assign and create users. Create appropriate Alerts to monitor database and hardware resources. Document the project by using the formats given in the later section. Create database maintenance plans. regional. Submit the documentation to the faculty. 1.0 GB. if an office has to store 1000 transactions on a daily basis. 2. restrict the database size of the regional office and warehouse databases at appropriate levels. 5. 9. Devise and implement backup and restore strategies. Inc. to create appropriate alerts to monitor the generated databases and hardware resources. roles.

1 3.10 .1 4.1 5.1 2.3 5.2 Administrating MS SQL Server 2000 Databases 1.2 2.1 Task to be Performed Analyze the case study to identify the requirements of the organization Install SQL Server 2000 Create appropriate database designs Transfer old data from Excel and Access using DTS Assign and create users.2 3.Project Timelines The students should follow the given timelines to complete the project on time: Session # 1. and permissions on all databases Provide row-level security for Sales table Configure replication services Create appropriate Alerts to monitor database and hardware resources Create database maintenance plans Devise and implement backup and restore strategies Document the database design and the system processes involved in the project Create a presentation on the basis of the documentation 1.2 4. roles.2 3.3 4.

and warehouses. you can trigger an alert when the database fails or crashes. Perform a restore operation of all databases. Hint: Students should emulate the setup of a big organization.1 15 3 30 3. its hierarchy.No. or when the database storage capacity reaches a pre-defined level. Configure the replication service between the headquarters and regional office databases. the various departments etc. Devise a backup strategy and automate the scheduling of backups at specified intervals. regional offices.) Perform a backup operation of all databases. (Hint: Use Merge Replication) Configure the replication service between the regional office and warehouse databases. Documentation Total 60 5. such as setting the growth size of these databases. Release extra spaces by shrinking log and data files. You can schedule backups using the Database Maintenance Plan Wizard. (For example.11 Administrating MS SQL Server 2000 Databases . (Hint: Use Transactional Replication) Assign and create user roles and permissions for all the databases at the headquarters as well as subsidiary locations. Activity Time (mins) 120 1 Install SQL Server 2000 on remote computers to create a virtual set-up as specified in the above scenario.1 6 45 7 8 9 10 30 15 60 60 600 1.Student Activity List S. when there is excessive CPU usage. Create appropriate Alerts to monitor the generated databases and hardware resources. 2 90 2. Assign appropriate properties to the databases. Design and create databases and tables for the headquarters.1 30 4 45 5 Create a maintenance plan using the Database Maintenance Plan Wizard.

The company has its headquarters in Detroit with regional sales offices spread across 30 states in the US. such as loss and disparity in data. Current System Currently. FutechMotto hires the services of CyberSmiths. Therefore. and is individually responsible for catering to the needs of the local customers. creating sales reports is time consuming. South America. the management faces many problems. Data is either stored in Excel worksheets or MS Access databases. Envisioned system The management of the company has decided to implement a centralized database system. Administrating MS SQL Server 2000 Databases 1. in the absence of a centralized database management system. edit. To ensure a smooth transition and implementation of the new database system. or delete data of other sales executives. Each regional office would maintain a separate database running on MS SQL Server 2000. it is difficult and tedious to locate old data. It is a cumbersome process to handle data spread across different applications. in conjunction with the consultants at CyberSmiths decide on the following points: Existing data would be imported from various sources. The head of the Enterprise Data Planning (EDP) department at FutechMotto. a custom software development company. Therefore. Each region shares its resources and products with the others.CASE STUDY 1: FUTECHMOTTO FutechMotto is a leading car manufacturer. Sales executives should be able to log on to the database from any regional office. Another problem that the sales executives are facing because of non-availability of a centralized database is that they have to collate data from various data sources. such as MS Excel and MS Access to MS SQL Server 2000 databases. the company does not have a centralized database system. To ease out operational problems. the management at FutechMotto has split its operations in four regions: North America. West America. Sales executives should not be able to view. and East America. However. The management frequently requires old sales data to analyze business trends.12 .

13 Administrating MS SQL Server 2000 Databases . Project Submission Details The students will get 10 hours to complete the project. Create appropriate Alerts to monitor database and hardware resources. The database administrator at each regional sales office would create and assign roles and permissions for the various levels of users at the regional office. 5. Implement row-level security in the Sales table. 3. You are a consultant at CyberSmiths. and implement the databases as envisioned. Create and configure appropriate Alerts and warnings using SQLMail and SQLAgentMail to monitor database and hardware resources. develop. Create database maintenance plans. 6. 9. 1. 7. You need to design. Analyze the case study to identify the requirements of the organization. Assign and create users. The database administrators at Detroit and regional offices would periodically perform shrinking of the log files to optimize the databases. As part of the maintenance plan. Devise and implement backup and restore strategies. 8. and permissions on all databases. The transactions recorded in the transaction log file would be monitored regularly using Transact-SQL queries. The database administrator at the regional office would make a database maintenance and backup plan. This would include creation of Alerts to monitor the databases and hardware resources. The database administrator at each location would need to ensure that the databases are backed up regularly. The activities to be performed during this period are: 1. 2.The database administrator at the Detroit office would be responsible for creating and assigning roles and permissions for the various levels of users. The regional databases will be synchronized daily with the database at Detroit. Each regional sales office would have a separate database administrator. In the event of server failure. 4. database administrators at the respective EDP departments should get warnings and alerts on mail. roles.The database of the regional office would be updated immediately in case the price of a particular model of an automobile is changed in the database at Detroit. the database administrator would need to perform the restore operation. Install SQL Server 2000 and create appropriate database designs. Transfer MS Excel and MS Access data in SQL Server 2000.

After submitting the documentation.14 . Document the project by using the formats given in the later section. 12. 11.10. Submit the documentation to the faculty. the project team will present the project in the class. The faculty will assign marks to the teams based on the evaluation criterions specified in this section. Administrating MS SQL Server 2000 Databases 1.

Devise and implement backup and restore strategies.15 Administrating MS SQL Server 2000 Databases . 4. Install SQL Server 2000 and create appropriate database designs.1 Task to be Performed Analyze the case study to identify the requirements of the organization.2 3. Document the database design and the system processes involved in the project.1 5.1 3.1 2. Create database maintenance plans.2 5. 1.1 4.2 Configure replication services Create and configure appropriate Alerts and warnings using SQLMail and SQLAgentMail to monitor database and hardware resources. Transfer MS Excel and MS Access data in SQL Server 2000.Project Timelines The students should follow the given timelines to complete the project on time: Session # 1.2 1. Create a presentation on the basis of the documentation. Implement row-level security in Sales table.2 2.

(Hint: Use Merge Replication) Create appropriate Alerts to monitor the generated databases and hardware resources.16 .3 60 3 30 4 50 4.1 2.No.2 60 15 2. You can schedule backups using the Database Maintenance Plan Wizard. such as setting the growth size of these databases. Transfer Old data from Excel and MS Access files using DTS Assign appropriate properties to the databases. (Hint: Students can create alerts based on Northwind or Biblio.1 45 5 5. Provide row-level security to Sales table using stored procedures and views Configure Replication service between the databases at Detroit and the regional offices.Student Activity List S.) 2 90 2. Release extra spaces by shrinking log and data files. Ensure that administrators at respective EDP departments get warnings and alerts on mail using SQLMail and SQLAgentMail features of MS SQL Server 2000. Activity Time (mins) 120 1 Install SQL Server 2000 on local and remote computers to create a virtual set-up as specified in the above scenario. Design and Create database and tables for the headquarters as well as regional offices.1 Create a maintenance plan using the Database Maintenance Plan Wizard. Documentation Total 30+30 25 6 7 8 30 15 60 600 Administrating MS SQL Server 2000 Databases 1. Perform a backup operation of all databases. Devise a backup strategy and automate the scheduling of backups at specified intervals.

20 marks Timely completion of the project Quality of documentation . Backup and Restore Documentation: Documentation is one of the most important aspects of database maintenance.20 marks Completion of all formats Adherence to standards and processes Query handling during project walkthrough . Configuring Linked Server / DTS / Replication/ Row Level Security and Database Maintenance. The project documentation should be submitted to the coordinator in the formats given in this book before the project walkthrough. specified along with the case study Timeliness .20 marks 1.17 Administrating MS SQL Server 2000 Databases . Phases in Project Execution The project will be carried out in the following phases: Installation Database Creation and Design Configuring Linked Server / DTS / Replication/ Row Level Security Database Maintenance. Each case study will be allocated to a group of four students. and submitted on the given date. Backup and Restore. detached from the book. The blank report following the case studies is to be filled up. Project Evaluation Guidelines The project is to be evaluated based on the following parameters: Quality: Conformance to requirements of the case study ± 40 marks The solution maps to the requirements. such as Database Design.PROJECT EXECUTION This book contains three case studies.

backup device. A consistent naming convention should be used for tables.18 . Backup and restore operations should be scheduled at appropriate time Document your maintenance plans Administrating MS SQL Server 2000 Databases 1.Project Standards and Guidelines The following standards and guidelines should be followed while creating the project. maintenance plans and backup file. Following these standards and guidelines is one of the evaluation criteria for the project: The project solution should map to the requirements of the case study.

is a leading aluminum manufacturer in North America. In the current system. The IT department decides to perform the following tasks: The databases being maintained by the five departments at the headquarters would be upgraded to MS SQL Server 2000. The company has decided to open four new production units in California. respectively. with four upcoming production units. the management faces problems in generating MIS reports. the organizational structure at Bluemun Inc. The Finance and Inventory departments deal with financial matters and inventory. In addition. and Florida in the US. and Inventory. Current System In the current system. The Marketing department has a talented team of marketing management personnel who are involved in planning of sales and marketing strategies to build and enhance the company¶s credibility in the market. There is no synchronization between the databases of these departments. The management of the company is brainstorming to find a solution to this problem. The company has its production unit and headquarters in Ontario. The Production department is responsible for production and supply of aluminum to the clients of the company. Therefore. In addition. Each new production unit would have the same organizational structure as at the Head Office to manage the business processes. which are Production. The IT department will administer all IT-related activities at the headquarters and branch offices. Canada. has five departments. HR. Finance.19 Administrating MS SQL Server 2000 Databases . The HR department is involved in recruiting of personnel for the company. However. Envisioned system To deal with the above problems. the management has decided to form a new IT department at the headquarters and at the four branch offices. reports from the databases of each department are retrieved and then the auditor manually tries to match these reports. each entry in the departmental databases has to be verified. often there are discrepancies in the reports. Due to the absence of a centralized database. Marketing. the headquarters will have a centralized database that will synchronize the activities of all the departments of the company across the branch offices. Texas. 1. and designing of various employee welfare policies. North Carolina. Each unit would employ around 1000 employees.SAMPLE CASE STUDY 4: BLUEMUN INC Bluemun Inc. Maintaining decentralized databases being used by various departments is a cumbersome task. all the five departments of the company maintain individual databases using MS Access. the verification of reports will become tedious. Currently.

The database administrator at each branch will create and assign roles and permissions for the end users. the database administrator at the headquarters will perform the same activity at the headquarters. Similarly. These department database servers would be called PRODUCTION. and INVENTORY.The headquarters would have a centralized database. BRANCHDB California BRANCHDB Texas HEADDB (All Departments) BRANCHDB North Carolina Data Synchronization BRANCHDB Florida Each branch office would have separate department databases running on SQL Server 2000. BRANCHDB. In addition. The following figure illustrates the synchronization model. FINANCE. PERSONNEL. HEADDB. MARKETING. HEADDB would be synchronized with all the five departmental databases at the headquarters. Each branch database will be named after the location of the branch. This implies that there would be four BRANCHDBs at the four branches. Administrating MS SQL Server 2000 Databases 1. running on SQL Server 2000. the database. BRANCHDB at Florida will be called BRANCHDB_Florida. For example.20 . respectively. the four BRANCHDBs will be synchronized with the HEADDB database. Each branch office will have a dedicated database administrator. All department databases within the branch would be synchronized with the branch database.

0 GB.5-2. perform restore operations. The branch databases and the department databases within each branch can be restricted at appropriate levels. several users track the daily production activities in the PRODUCTION database.21 Administrating MS SQL Server 2000 Databases . You have been hired as the chief database administrator to devise an optimal database design/solution for the entire corporate database setup at Bluemun Inc.) Shrinking of Log and Data Files Checking for data integrity take a weekly backup of all branch and headquarter departmental databases. in case of server failure. and HEADDB. BRANCHDBs. (Hint: If a branch database is storing 1000 transactions daily then the size of the database should be kept around 1.) monitor the transactions recorded in the transaction log file. you might need to create an index on the tables for faster retrieval of records.To ensure smooth operation of the business processes. In addition. maintain the database regularly by performing the following activities: Indexing (For example. you can use indexing to organize data storage in the databases. work on an appropriate implementation strategy. using Transact-SQL queries. create appropriate alerts to monitor the generated databases and hardware resources. the database administrator decides to: allow unrestricted growth of the size of the HEADDB database. Also you can re-create indexes. On the basis of the above-mentioned requirements. which might get corrupted. Therefore. 1.

Administrating MS SQL Server 2000 Databases 1. 8. Create database maintenance plans. Analyze the case study to identify the requirements of the organization. Document the project by using the formats given in the later section. Install SQL Server 2000 and create appropriate database designs.22 . roles. Submit the documentation to the faculty. 5. 3. the project team will present the project in the class. 2. and permissions on all databases. The faculty will assign marks to the teams based on the evaluation criterions specified in this section. The activities to be performed during this period are: 1. 9.Project Submission Details The students will get 10 hours to complete the project. After submitting the documentation. Devise and implement backup and restore strategies. 7. Assign and create users. 4. 10. 6. Create appropriate Alerts to monitor database and hardware resources. Configure Linked Server.

Configure Linked Server. Create appropriate Alerts to monitor database and hardware resources. Install SQL Server 2000 and create appropriate database designs.2 1.1 5.1 Task to be Performed Analyze the case study to identify the requirements of the organization.1 4.1 2. 1. and permissions on all databases.2 5. Devise and implement backup and restore strategies.Project Timelines The students should follow the given timelines to complete the project on time: Session # 1.3 4. Assign and create users.2 2. roles. Create a presentation on the basis of the documentation. Create database maintenance plans. Document the database design and the system processes involved in the project.2 2.23 Administrating MS SQL Server 2000 Databases .

2. The Computer Name screen displays the following options: a. Therefore. Restore Databases 1. Installing SQL Server 2000 1. Create a Permanent Backup Device 8. Place the pointer on Install Database Server and click to start the installation. Create a Linked Server with the SQL Server Database Create a Maintenance Plan 6. 4. Install SQL Server 2000 on a Remote Computer 3. 5. Create and Assign Logins. 6. The Welcome screen of the installation wizard appears. 3.24 . Local Computer b. Create Databases and Tables 4. and Permissions 5. Place the pointer on SQL Server 2000 Components and click to move to the next screen. Roles. Create Backups 9. Virtual Server 7. Install SQL Server 2000 2. Click the Next button to move to the Computer Name screen.SOLUTION TO SAMPLE PROJECT Solution 1. Remote Computer c. The Remote Computer option is not Administrating MS SQL Server 2000 Databases 1. Insert the CD-ROM in the CD drive to start the SQL Server Installation Wizard. Create Alerts 7. The administrator wants to install SQL Server 2000 at its headquarters only. select the Local Computer option and click the Next button to continue with the Setup Program.

Click the Next button to move to the Software Licensing Agreement screen of the installation wizard. The setup of BlueMun. 20. 17. Click Yes to accept the License Agreement. select the second option Server and Client Tools. as the company name in the first textbox. The Installation Definition screen is displayed. Click the Browse button to specify different destination folders for Program Files and Data Files. 15. Minimum c. Click Next to move to the Setup Type Screen. Select the Use the same account for each service option. Click the Next button to move to the Service Accounts screen. Connectivity 13. 16. This will display Installation Selection screen. 19. In the second textbox. Inc. 12. The User Information screen displays a message Enter your name below along with two text boxes. The administrator requires the most commonly used components of SQL Server 2000. Therefore. Typical b. requires both the client and the server tools for its centralized database management system. Click the Next button to move to the Instance Name screen of the installation wizard. 14.selected because at present. However. You also need to select the 1. Enter Bluemun Inc. Advanced Options 9. Create a new instance of SQL Server. The Installation Selection screen displays the following three options: a. 8. remove. therefore. Therefore. Select Default option for a default installation. Custom 18. situated in different cities. or add components to an existing instance of SQL Server c. Server and Client Tools c. or install Client Tools b. The Installation Definition screen displays the following three options: a. Client Tools b. The company requires a fresh installation of SQL Server 2000. this entry is optional. 10. the administration does not want to install SQL Server 2000 at its production units. labelled as Company name. 11. enter the company name again. labelled as Name. select the Create a new instance of SQL server. or install Client Tools option and click the Next button to move to the User Information screen. select the Typical option. The Setup Type screen displays of the following three setup options: a.25 Administrating MS SQL Server 2000 Databases . Upgrade.

22. situated in different cities.Use a Domain User Account option. b. This will display the Start copying Files screen. 24. 6. Enter 15 as device number. From the Licensing Mode section. 2. you have to install SQL Server 2000 on a remote computer. select the Remote Computer option and enter the name of the remote computer in the highlighted textbox. c. Local computer b. from the Service Settings section of the screen. select the Per Seat for option and specify the number of devices for which license is purchased. In the Username textbox. Since SQL Server 2000 is to be installed on a remote computer. Specify the domain name in the Domain textbox. 23. Select the Windows Authentication Mode option. 3. Administrating MS SQL Server 2000 Databases 1. 5. In the Password textbox. Insert the SQL Server 2000 CD-ROM to start the installation wizard. Specify the domain user name in the Username textbox. Click the Next button to move to Choose Licensing Mode screen.Installing SQL Server 2000 on a Remote Computer To install SQL Servers in four production units. To install SQL Server 2000 on a remote computer perform the following pre-installation tasks: 1. The Setup Program should be able to connect to the remote computer. The installation wizard displays the Computer Name screen with three options: a. Click the Continue button to start the installation process. Click the Next button to display Authentication Mode screen. Remote computer c. 21.26 . enter the password as Administrator. The Setup program proceeds in the similar manner as that of local computer installation of SQL Server 2000. The installation wizard displays the Remote Setup Information screen. 2. Virtual Server 4. Specify the domain user password in the Password textbox. enter the username as John. The installation wizard starts the Setup program. You need to enter the following information in the Remote Setup Information screen: a. Click the Next button to continue with the remote installation process. 7.

MAXSIZE = 1200. FILENAME = ¶D:\Bluemun_Database\HEADDB. [CompanyName] [nvarchar] (50) NULL. MAXSIZE = 500. [CategoryName] [nvarchar] (50) NULL ) ON [PRIMARY] GO CREATE TABLE [dbo]. Creating Databases and Tables Use the following T-SQL statements to create databases and tables: CREATE DATABASE HEADDB ON (NAME = HEADDB. [City] [nvarchar] (50) NULL. FILEGROWTH = 45) GO CREATE TABLE [dbo]. SIZE = 100. [Country/Region] [nvarchar] (50) NULL. [FaxNumber] [nvarchar] (30) NULL ) ON [PRIMARY] GO CREATE TABLE [dbo]. [Address] [nvarchar] (255) NULL. [StateOrProvince] [nvarchar] (20) NULL.27 Administrating MS SQL Server 2000 Databases .3. FILEGROWTH = 20). SIZE = 300. [PostalCode] [nvarchar] (20) NULL.[Employees] ( [EmployeeID] [int] NOT NULL. [Extension] [nvarchar] (30) NULL.MDF¶. [Title] [nvarchar] (50) NULL. LDF¶. [FirstName] [nvarchar] (50) NULL. (NAME = HEADDB_LOG.[Categories] ( [CategoryID] [int] NOT NULL. FILENAME = ¶ D:\Bluemun_Database\HEADDB_LOG.[CompanyInfo] ( [SetupID] [int] NOT NULL. [WorkPhone] [nvarchar] (30) NULL ) ON [PRIMARY] GO CREATE TABLE [dbo].[InventoryTransactions] ( 1. [LastName] [nvarchar] (50) NULL. [PhoneNumber] [nvarchar] (30) NULL.

[ContactTitle] [nvarchar] (50) NULL. [UnitsShrinkage] [int] NULL ) ON [PRIMARY] GO CREATE TABLE [dbo]. [ShippingMethod] [nvarchar] (20) NULL ) ON [PRIMARY] GO CREATE TABLE [dbo]. [SerialNumber] [nvarchar] (50) NULL. [PurchaseOrderID] [int] NULL. [SupplierName] [nvarchar] (50) NULL.[Purchase Orders] ( [PurchaseOrderID] [int] NOT NULL.[Suppliers] ( [SupplierID] [int] NOT NULL. [UnitsSold] [int] NULL. [DatePromised] [smalldatetime] NULL. [TransactionDate] [smalldatetime] NULL.28 . [OrderDate] [smalldatetime] NULL. [UnitsOrdered] [int] NULL. [Address] [nvarchar] (255) NULL. Administrating MS SQL Server 2000 Databases 1. [PurchaseOrderNumber] [nvarchar] (30) NULL. [CategoryID] [int] NULL.[Products] ( [ProductID] [int] NOT NULL. [ProductID] [int] NULL. [EmployeeID] [int] NULL. [ContactName] [nvarchar] (50) NULL. [PurchaseOrderDescription] [nvarchar] (255) NULL. [UnitsReceived] [int] NULL. [SupplierID] [int] NULL. [FreightCharge] [money] NULL ) ON [PRIMARY] GO CREATE TABLE [dbo].[TransactionID] [int] NOT NULL. [UnitPrice] [money] NULL. [ShipDate] [smalldatetime] NULL. [ProductDescription] [nvarchar] (255) NULL. [ShippingMethodID] [int] NULL. [UnitPrice] [money] NULL. [ReorderLevel] [int] NULL. [LeadTime] [nvarchar] (30) NULL ) ON [PRIMARY] GO CREATE TABLE [dbo]. [DateRequired] [smalldatetime] NULL. [TransactionDescription] [nvarchar] (255) NULL. [ProductName] [nvarchar] (50) NULL. [City] [nvarchar] (50) NULL.[Shipping Methods] ( [ShippingMethodID] [int] NOT NULL.

[FaxNumber] [nvarchar] (30) NULL ) ON [PRIMARY] GO 4. 8. Roles. [Country/Region] [nvarchar] (50) NULL. and Permissions To create and assign logins. Verify that the Windows Authentication option is selected from the Select Authentication Mode for This Login screen. 15. In this case the domain name of the machine is SYSTEM. Select the HEADDB option from the Permit in database section of Grant Access to Database screen. 9. Click the Next button to continue with the wizard. 2. Select the Wizards icon on the Tools menu to open Select Wizard dialog box. 3. The Welcome to the Create Login Wizard screen appears. Select Start All Programs Microsoft SQL Server Enterprise Manager. 1. Click the Next button to continue. In the console root. to open the Enterprise Manager console. which allows accessing to the HEADDB database. Select Grant access to the server option from the Security access section of the Authentication with Windows screen. 4. Click the Next button to continue with the wizard. Click the Next button to continue with the wizard. expand the Microsoft SQL Server container and then expand SQL Server Group container. [StateOrProvince] [nvarchar] (20) NULL. 10.[PostalCode] [nvarchar] (20) NULL.29 Administrating MS SQL Server 2000 Databases . To grant privileges to users for creating new databases. 14. 13. select the Database Creators option from the Server role section of Grant Access to Security Roles screen. 12. perform the following tasks: 1. Expand the Database tree and double-click Create Login Wizard. 6. 11. 5. Create and Assign Logins. Click the Next button to continue with the wizard. 7. Click the default instance. Specify SYSTEM\Lewis in the Windows account text box to authenticate user by Windows operating system. [PhoneNumber] [nvarchar] (30) NULL. and permissions. roles.

Click the OK button to close the message box. Verify that the Lewis appears as the login name in the details pane. Expand the Security Containers from the Console tree and select the Logins option. Click the Finish button to create the SQL Server 2000 login with the specified information.16. 18.30 . Repeat the above steps for BRANCHDB database at the four production units. 17. 19. The Completing the Create Login Wizard screen is displayed. A Wizard Complete! message box appears. Administrating MS SQL Server 2000 Databases 1.

1. execute the following command on the Query Analyzer: EXEC sp_linkedservers The above SQL statement will display the list of the linked servers.5. Creating a Linked Server with the SQL Server Database Perform the following steps to create a linked server with the SQL Server Database: 1. 6. Similarly. CALIF is the server name in one of the branch offices. Select Start All Programs Microsoft SQL Server Enterprise Manager. 4. 5. Select the Tools Database Maintenance Planner option. Click the Next button to continue with the wizard. expand Microsoft SQL Servers SQL Server Group and select the default instance of SQL Server. To execute the query. Click the OK button to close the dialog box. click the Execute Query button on the toolbar. to start the SQL Server 2000 Enterprise Manager. Select Start All Programs Microsoft SQL Server Query Analyzer to Open the Query Analyzer window. 3. To create a linked server with SQL Server 2000 database. you have to type the following SQL command in the Query Analyzer: Execute sp_addlinkedserver @server = µCALIF\BRANCHDB¶ @srvproduct = µSQL Server¶ @provider = µSQLOLEDB¶ In the above code. The SQL Server will display a successful message dialog box. 2. The welcome screen of the Create Database Maintenance Plan Wizard is displayed. 4. This opens the Database Maintenance Plan Wizard window. Creating a Maintenance Plan Perform the following tasks to create a maintenance plan: 1. From the Console Root of the Enterprise Manager window. 3. 2. To check the connectivity between the linked server and the local server.31 Administrating MS SQL Server 2000 Databases . link the other production unit databases.

Perform these checks before doing backups 9. 15. Click the Next button to move to the Specify Backup Disk Directory screen. select the Use this directory option and specify D:\BluemunBackups in the text box. 12. Click the Next button to move to the next screen. Back up the transaction log as a part of the maintenance plan b. Include indexes c. Remove unused space from the database files and specify 50 in the When it grows beyond: text box and specify 25 in the Amount of free space to remain after shrink text box. 13. Select the Occurs once at option and specify 2:00:00 AM in the text box. Update statistics used by Query Optimizer and specify 50 in the text box displayed alongside. Select the following options from the Database Integrity Check screen. Then. Check database integrity b. Verify the integrity of the backup when complete c. From the Select Databases screen. Click the Next button to move to the Specify the Database Backup Plan screen of the wizard. select the Disk option. 11.5. to automatically generate a schedule based on specified settings: a. Attempt to repair any minor problems d. Verify the integrity of the backup when complete c. 16. 8. 6. Click the Change button to display the Edit Recurring Job Schedule dialog box. 7.32 . select the HEADDB option from the Database section. The Schedule is generated automatically. b. You should create a backup folder such as BluemunBackups on your computer. Select the following options from the Specify the Database Backup Plan screen: a. From the Location to store the backup file section. Click the Next button to move to the Specify the Transaction Log Backup Plan screen and verify that the following options as shown: a. The new schedule is displayed in the Schedule text box. 14. Disk option from the Location to store the backup file section Administrating MS SQL Server 2000 Databases 1. The Update Data Optimization Information screen. Back up the database as a part of the maintenance plan b. select the These databases option. Click the OK button to return to the wizard. From the Directory in which to store the backup file section. Click the Next button to move to the Database Integrity Check screen. Select the following options from the screen: a. 10.

5. 25. specify Backup Database. to reach the SQL Server Agent. Click the Next button to move to the Maintenance Plan History screen of the wizard. From the Directory in which to store the backup file section. Specify HeadDB_Maintenance_Plan as the name of the plan in the Plan name text box. b. Expand SQL Server Agent. 4. select the 017-Insufficient Resources option from the Severity drop-down list. Click the Next button to continue with the wizard. The wizard displays the Successfully created maintenance plan message box. Click the Finish button to create the database maintenance plan. 1. 3. 23. Select and expand the Management option. Specify the following settings in the Reports to Generate screen: a. Expand the default instance. In the Name text box. Click the OK button to close the message box. In the Event alert definition section.33 Administrating MS SQL Server 2000 Databases . Select the Write history to the msdb. The Specify Transaction Log Backup Disk Directory screen is displayed. Click the Next button to move to the Reports to Generate screen. Select the Write report to a text file in the directory: option and specify the location of the report file as D:\Bluemun\Reports in the text box. Click Start All Programs Microsoft SQL Server Enterprise Manager. Select the Delete text report files older than: option and specify the value as 8 in the text box. to open the Enterprise Manager console of SQL Server 2000. 18. 7. 22. 24. 19. 21.dbo. 6. Click the Next button to move to the next screen. 20. Expand Console Root Microsoft SQL Servers SQL Server Group.17. select the Use this directory option and enter D:\BluemunTransBackups in the text box. Creating Alerts Perform the following steps to create alerts: 1.sysdbmaintplan_history table on this server option from the Local server section. 2. Select the default instance. Right-click Alerts and select the New Alert option from the pop-up menu to open the New Alert Properties dialog box. The Completing the Database Maintenance Plan Wizard screen is displayed.

From the Management option. to verify that the alert has been created. expand the Microsoft SQL Servers option and then expand the SQL Server Group option. Select Start All Programs Microsoft SQL Server Enterprise Manager. 3. In this case. From SQL Server 2000 Enterprise Manager. Specify the name of the database in which the error message must occur. 7. specify HEADDB as the database name. to open the Enterprise Manager. 4. The details of the alerts. Click OK to close the New Alert Properties dialog box. 12. 9. expand the Microsoft SQL Server SQL Server Group SQL Server default instance Management option. 8. Select the Backup option and right-click the Backup option. 2.7.34 . 1. Creating Backups Perform the following steps to create backups. specify BluemunBackupDevice as the name of the backup device. The details pane displays all the existing alerts. The Enabled column displays the status of the displayed alerts. and e-mail are also displayed. Creating a Permanent Backup Device Perform the following steps to create a permanent backup device. 9. select the New Backup Device option. From the Console Root. In the Filename text box. Last Occurred. Click the OK button to close the Backup Device Properties-New Device dialog box. In the Name text box of the Backup Device Properties dialog box. specify the backup filename as D:\Bluemunbackups. create more alerts for the following severities: 023-Fatal Error: Database Integrity Suspect 024-Fatal Error: Hardware Error 8. Select the Alerts option. such as Severity. 5. Errors. 11. click the Name column to sort the displayed alerts. From the pop-up menu. to open the Backup Device Properties-New Device dialog box. 10. Expand the SQL Server default instance option and expand the Management option. expand the SQL Server Agent option. to display the pop-up menu. In the details pane. 6. Administrating MS SQL Server 2000 Databases 1. Similarly.

BluemunBackupDevice. select the Wizards option to display the Select Wizard dialog box. Expand the Management option and select the Backup Wizard option. Specify the name. 3. 11. In the Select backup device section.35 Administrating MS SQL Server 2000 Databases . Click the Next button to display the Backup Verification and Scheduling screen. 13. 16. The screen displays the default location for a file. select the Check media set name and backup set expiry date check boxes. 1. 2. select the default Master database to specify the name of the database. select the Backup device option and select the name BluemunBackupDevice from the drop-down box. 4. From the Tools menu. Select Start All Programs Microsoft SQL Server Enterprise Manager. 6. In the Database drop-down list of the Select Database to Backup screen. 8. Select the Database backup-backup the entire database option. 12. Click the Next button to display the Select Backup Destination and Action screen. 15. In the Select backup device section of the Select Backup Destination and Action screen. Click the Next button to display the Select Type of Backup screen. 10. 7. The Type Name and Description for Backup screen displays the following two textboxes: a. 14. In the Backup Verification and Scheduling screen. Click the Next button to display the Select Database to Backup screen. to open the Enterprise Manager. Select the Read and verify the integrity of the backup after backup option. Click the OK button to display the Welcome to the Create Database Backup Wizard screen. in the Media set name text box. 9. Name b. Click the Next button to display the Type Name and Description for Backup screen. Description Specify HEADDB backup in the Name text box.1. The Select Backup Destination and Action screen allows you to select the backup device that you want to use for the backup operation. 5. verify that the Append to the backup media option is selected. select the Backup device option. Specify Full database backup in the Description text box. In the Properties section.

5. Ensure that HEADDB. Then. the Leave the database operational is selected by default. Click the Next button to display the Completing the Create Database Backup Wizard screen. 2. Right-click the HEADDB database. 10. to display the Restore database dialog box. 13. 6. Specify HEADDB in the Restore as database text box and select the From device option from the Restore section.LDF do not exist in the specified location. 11. expand Console Root SQL Server Group SQL Server 2000 default instance Databases option. 12. Verify that the Disk option is selected. at 1:00 AM. 8.mdf and HEADDB_Log. select the Schedule option. 7. click the Select Devices button to select the backup device. click the OK button. Administrating MS SQL Server 2000 Databases 1. In the Parameters section. No additional transaction logs can be restored option is selected. 4. 18. The Choose Restore Destination screen appears. 9. In the Recovery completion state section. to display a pop-up menu. 10. Specify the location of the database files in the Move to physical file name column. Click the OK button to continue. 14.17.36 . Select a file and click the OK button. The Backup Device Location dialog box appears. This automatically sets the weekly schedule as Once every week at Sunday. Select the All Tasks Restore database option from the pop-up menu. The Choose Restore Devices screen appears. Click on the Add button to select the backup file to restore. from the details pane. In the SQL Server 2000 Enterprise Manager. In the Scheduling section of the Backup Verification and Scheduling screen. Restore databases Perform the following steps to restore databases: 1. Verify that File name option is selected. Click the OK button to go back to the previous screen. Click the Browse button to select the backup file to restore. Activate the Options tab of the Restore database dialog box. The General tab of the Restore database dialog box is selected by default. 3.

1. 16.37 Administrating MS SQL Server 2000 Databases . Click the OK button to close the message box.15. ³Restore of µHEADDB¶ database completed successfully´. A message box displays the message.

Administrating MS SQL Server 2000 Databases 1.38 .

: 4701-10-258 1.SAMPL E PRO JEC T DO C UMENTATIO N: BL UE MU N INC.39 Administrating MS SQL Server 2000 Databases . No. PROJECT ON Bluemun Inc. Developed by Name: Debbie Howe Reg.

2003 Name of the Coordinator : Alex Norton Name of Developer : Debbie Howe Date of Submission : June 11.Bluemun Inc. 2003 Administrating MS SQL Server 2000 Databases 1. (Project Title) Batch Code : Start Date : June 1. 2003 End Date: June 10.40 .

CERTIFICATE This is to certify that this report titled Bluemun Inc.41 Administrating MS SQL Server 2000 Databases . Coordinator: Alex Norton 1. embodies the original work done by Debbie Howe in partial fulfillment of their course requirement at NIIT.

Administrating MS SQL Server 2000 Databases 1. Alex Norton and other faculty members.ACKNOWLEDGEMENT We have benefited a lot from the feedback and suggestions given to us by Mr.42 .

43 Administrating MS SQL Server 2000 Databases . Inventory Transactions 5. Suppliers Database Name: Branchdb Number of tables: 8 Table Names: 1. Suppliers 1.DATABASE DESIGN Database Name: Headdb Number of tables: 8 Table Names: 1. Products 6. CompanyInfo 3. Categories 2. Shipping Methods 8. Inventory Transactions 5. Employees 4. Categories 2. Purchase Orders 7. Purchase Orders 7. CompanyInfo 3. Employees 4. Shipping Methods 8. Products 6.

MAINTENANCE PLAN Plan Name Activities List Administrating MS SQL Server 2000 Databases 1.44 .

45 Administrating MS SQL Server 2000 Databases . 1. 3. 2.PROBLEMS ENCOUNTERED 1.

ldf Administrating MS SQL Server 2000 Databases 1. SQL Server transaction log file SQL Server database that contains tables and other database objects.ldf Branchdb.No 1 File Name Headdb.mdf 4 Branchdb_log.128-MB RAM.mdf Remarks SQL Server database that contains tables and other database objects.46 . and 4GB of Hard disk Operating system: Windows 2003 Server Software: Microsoft SQL Server 2000 PROJECT FILE DETAILS S.CONFIGURATION Hardware: IBM PC or compatible with a Intel Pentium-II and above processor. SQL Server transaction log file 2 3 Headdb_log.

47 Administrating MS SQL Server 2000 Databases .BLANK DOCUMENTATION FORMATS PROJECT ON Developed by Name: Reg.: 1. No.

(Project Title) Batch Code : Start Date : End Date: Name of the Coordinator : Names of Developer : Date of Submission : Administrating MS SQL server 2000 Databases 1A.48 .

49 Administrating MS SQL Server 2000 Databases .CERTIFICATE This is to certify that this report titled __________ embodies the original work done by ___________ in partial fulfillment of their course requirement at NIIT. Coordinator: 1.

50 .ACKNOWLEDGEMENT Administrating MS SQL server 2000 Databases 1A.

1.51 Administrating MS SQL Server 2000 Databases .DATABASE DESIGN Database Name: No of Tables: Print a schematic diagram to show the table relationships using primary/foreign key.

VALIDATIONS PERFORMED Administrating MS SQL server 2000 Databases 1A.52 .

PROBLEMS ENCOUNTERED 1.53 Administrating MS SQL Server 2000 Databases .

CONFIGURATION Hardware: Operating System: Software: Administrating MS SQL server 2000 Databases 1A.54 .

No File Name Remarks 1.55 Administrating MS SQL Server 2000 Databases .PROJECT FILE DETAILS S.