Monday, 24 August 2020

Basic Walkthrough SQL Server Part-1

 

Basic Walkthrough SQL Server Part-1

What is SQL Server (MSSQL)

MS SQL Server is a relational database management system (RDBMS) developed by Microsoft. This product is built for the basic function of storing retrieving data as required by other applications. It can be run either on the same computer or on another across a network. SQL Server works in client-server architecture; hence it supports two types of components − (a) Workstation and (b) Server.

·        Workstation components are installed in every device/SQL Server operator’s machine. These are just interfaces to interact with Server components. Example: SSMS, SSCM, Profiler, BIDS, SQLEM etc.

·        Server components are installed in centralized server. These are services. Example: SQL Server, SQL Server Agent, SSIS, SSAS, SSRS, SQL browser, SQL Server full text search etc.

Installing MSSQL Express

            Almost all flavors of MSSQL are very easy to install. And the best part is that it configures all interface drivers as a part of installation. Once you finish installation you are ready to fly your imaginations. MSSQL takes care of everything other than logic. And it takes care of logic too at some points, where it comes to integrity and security of your data.

            For our walkthrough we will be using sql sever express and sql server management studio on windows xp 32 bit. Because we have snapshots, you would hardly need any comments or notes for help. First of all, you need a copy of MSSQL Server 2008 Express which is free and you can download it from Microsoft’s software download site.

            So simple as anything else, insert the CD and wait for following screen. Or if it does not show up in few seconds, go head and start sqlexpr_x86_enu.exe from your CD. Same thing applies if you are using download extracted in any folder.  

Check files on your source media. You need to have SQLEXPR_X86_ENU.exe and SQLManagementStudio_x86_ENU.exe files available for full install.


 

1.        Click SQLEXPR_X86_ENU.exe


2.      In the left hand menu click Installation, then click New installation or add features to an existing installation at the top of the screen to start the installation wizard


 


 

4. Accept the license agreement and click Next.



5. Select all features and verify installation path. Click Next.


 

6. Instance Configuration - next screen probably have all settings as default. Click next.

 

 

7. Server Configuration – make SQL Server Browser automatic, click next.

 





 

8. Database Engine Configuration. Select Mixed Mode, provide “sa” password. Click next.


 

9. Installation will progress.


10. Finally installation succeeds. Close the window.

 


 

11. To install SQL management Studio, click SQLManagementStudio_x86_ENU.exe. Software extraction will begin.

 




 

12. In the left-hand menu click Installation, then click New installation or add features to an existing installation at the top of the screen to start the installation wizard.


 


 

13. Setup Support Rules - If installing on XP, you need to install PowerShell V1. Obtain powershell for XP download (WindowsXP-KB926139-v2-x86-ENU) and install it pausing the SQL Server Install and then re-run it.

 


 

14. Installation Type. Just keep “New Installation or shared features” selected and press Next.

 


 

15. Accept the license and hit Next.

 


 

16. Leave all features selected and hit Next.

 




 

17. Error Reporting – None. Just hit Next with check box un-selected.


 

18. Installation Progress – it will take few extra minutes to install SSMS.

 


 

19. Complete – with success. You can close this window now.

 


 

 

20. Start Command Prompt to run command line utility ‘sqlcmd.exe’.


 

21. Now, proud to have SQLServer available, Create Database, Create Table and insert one row of data as below.

 

Microsoft Windows XP [Version 5.1.2600]

(C) Copyright 1985-2001 Microsoft Corp.

 

C:\Documents and Settings\sgill>sqlcmd -U sa

Password:

1> CREATE DATABASE SAMPLE

2> GO

1> USE SAMPLE

2> GO

Changed database context to 'SAMPLE'.

1> CREATE TABLE PERSON ( ID SMALLINT  NOT NULL , FNAME  NCHAR(20) NOT NULL , LNAME NCHAR(20)  )

2> GO

1> INSERT INTO PERSON VALUES (1,'SARBJIT','GILL')

2> GO

 

(1 rows affected)

1>

1> SELECT * FROM PERSON

2> GO

ID     FNAME                LNAME

------ -------------------- --------------------

     1 SARBJIT              GILL

 

(1 rows affected)

1>

22. Fire up SSMS from start menu.


23. Login as ‘sa’.


24. Once in expand Databases, you will see SAMPLE database there.


25. Expand further and you will be able to see the structure of PERSON table.


26. Select SAMPLE, right click and select New Query


27. Type insert and select commands in the Query window and hit Execute Button.


 

 

28. The results will be displayed in the Results window

 


This concludes first chapter – installation or SQL Server 2008.

No comments:

Post a Comment