0% found this document useful (0 votes)
43 views

Lab Manual Week01

This document provides instructions for installing SQL Server and SQL Server Management Studio (SSMS) and generating database scripts. It outlines system requirements and a step-by-step installation guide. It then describes how to generate scripts for a database schema and data, including selecting database objects, publishing options, and verifying insert queries are included. Finally, it lists lab tasks of creating a sample database and table, generating schema and data scripts, and restoring to another system.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
43 views

Lab Manual Week01

This document provides instructions for installing SQL Server and SQL Server Management Studio (SSMS) and generating database scripts. It outlines system requirements and a step-by-step installation guide. It then describes how to generate scripts for a database schema and data, including selecting database objects, publishing options, and verifying insert queries are included. Finally, it lists lab tasks of creating a sample database and table, generating schema and data scripts, and restoring to another system.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

Database Management System Lab (Week1_Spring 2024)

Department of Computer Science

Instructor: CLO
• Mr. Nazeef Ul Haq

Learning Objectives:
• Installation of SQL server and SSMS.
• Create a new database named Northwind
• Restore Schema using scripts northwind.sql
• Restore schema data using northwind_data.sql

1. System Requirements for SQL Server 2019


1.1. Operating system

Windows 10 TH1 1507 or greater and Windows Server 2016 or greater

1.2. .NET Framework

SQL Server 2016 (13.x) RC1 and later require .NET Framework 4.6 for the Database Engine,
Master Data Services, or Replication. SQL Server setup automatically installs .NET Framework.
You can also manually install .NET Framework from Microsoft .NET Framework 4.6 (Web
Installer) for Windows.

1.3. Disc Space

SQL Server requires a minimum of 6 GB of available hard-disk space.

1.4. Memory

At least 4 GB and should be increased as database size increases to ensure optimal


performance.

1.5. Processor

• Minimum: x64 Processor: 1.4 GHz, Recommended: 2.0 GHz or faster


• x64 Processor: AMD Opteron, AMD Athlon 64, Intel Xeon with Intel EM64T support,
Intel Pentium IV with EM64T support

1.6. Monitor

SQL Server requires Super-VGA (800x600) or higher resolution monitor.

DATABASE MANAGEMENT SYSTEMS LAB 1


2. Installation guide
_______________________________________________________________________________________________

Important Note:

2.1. connect your system with internet and download the developer edition using this given
link: https://www.microsoft.com/en-us/sql-server/sql-server-downloads
2.2. Login on window with as Administrator

Figure 1: SQL downloading version

2.3. Once downloaded then click on the .exe file and run.

DATABASE MANAGEMENT SYSTEMS LAB 2


2.4. Then click on Basic version to install.

Figure 2: Selection of basic version

DATABASE MANAGEMENT SYSTEMS LAB 3


2.5. Scroll down and then click on accept.

Figure 3: Terms and conditions for installing SQL Server

DATABASE MANAGEMENT SYSTEMS LAB 4


2.6. Click on Install and eat pop corns until installation is done.

Figure 4: Starting the installation process by clicking on install button

DATABASE MANAGEMENT SYSTEMS LAB 5


2.7. After installation is done click on install SSMS

Figure 5: Installation has completed successfully

DATABASE MANAGEMENT SYSTEMS LAB 6


2.8. Click on highlighted link. It will download .exe file of SSMS. After downloading run .exe
file.

Figure 6: Version of SSMS for installation

DATABASE MANAGEMENT SYSTEMS LAB 7


2.9. Click on Install and wait until installation is done successfully.

Figure 7: Installation of SSMS

DATABASE MANAGEMENT SYSTEMS LAB 8


3. Generate Scripts of a schema
_______________________________________________________________________________________________

• Step 1
Right click on your database and select Task -> generate script.

Figure 8: Database_Scripts_With_Data_Select_Option

DATABASE MANAGEMENT SYSTEMS LAB 9


• Step 2
Click next in the introduction screen

Figure 9: Database_Scripts_With_Data_Introduction

DATABASE MANAGEMENT SYSTEMS LAB 10


• Step 3
Select the database object which you are all you need and then click next.

Figure 10: Selecting database objects

DATABASE MANAGEMENT SYSTEMS LAB 11


• Step 4
Now you will be shown a window which asks you about how your script should be published.

Figure 11: Database_Scripts_With_Data_Publish_Options

Click on advanced in that window.

DATABASE MANAGEMENT SYSTEMS LAB 12


• Step 5
Select ‘Schema and data’ from type of data to script option and then click OK.

Figure 12: Database_Scripts_With_Data_Advanced

Click on Next.

DATABASE MANAGEMENT SYSTEMS LAB 13


• Step 6
Click finish, now check the script file, it must be having the insert queries too.

Figure 13: Database_Scripts_With_Data_Finish

Now what else is pending, go ahead and run your script.

DATABASE MANAGEMENT SYSTEMS LAB 14


4. Lab Tasks
__________________________________________________________________________________________________

1. Create a new database named TestDB_2022_CS_X


2. Create a new table named student using 5 to 6 attributes
3. Generate Scripts of your database
4. Restore your schema to another machine
5. Generate scripts of data
6. Restore data to other system as well

DATABASE MANAGEMENT SYSTEMS LAB 15

You might also like