This document provides an introduction to Microsoft SQL Server 2005 and its components. It discusses the history of SQL Server and how it works as a relational database management system. It also summarizes the key components of SQL Server Management Studio, including Object Explorer, Registered Servers, Solution Explorer, and Query Editor. Finally, it provides overviews of SQL Server Agent and how it can automate tasks, as well as how to perform database backup, restore, and import/export functions.
Faculty notes: SQL Server 1.0 (Released in 1989) was a joint venture of Microsoft, Sybase and Ashton-Tate for OS/2 SQL Server 4.21(Released in 1993) was released for Windows NT with the launch of Windows NT 3.1 SQL Server 6.0 (Released in 1995, known as SQL 96/Hydra) was the first independent version designed for Windows NT. SQL Server 7.0 (Released in 1998, known as Sphinx) and SQL Server 7.0 OLAP Tools (Released in 1999 known as Plato) was the first independent GUI based database server. SQL Server 2000 (Release in 2000, known as Shiloh) SQL Server 2005 (Release in 2005, known as Yukon) was released with Client IDE tool and for better performance complementary systems were provided along with the tool i.e. SQL Server Integration Services, Reporting Server, Analysis services. Service broker and Notification services were included as messaging technology. The evaluation of history of database architecture and the role of SQL in each one Centralized Architecture : In centralized architecture the DBMS and the physical data both reside on a central minicomputer or mainframe system along with the application program that accept input from the user terminal and display data on user screen The application program communicates with DBMS using SQL. 2)File Server Architecture : In this architecture ,an application running on a personal computer can transparently access data located on a file server which stores shared files. When a PC application request data from shared file ,the networking software automatically retrieves the request block of the file from the server. 3)Client server architecture : In client server database architecture the personal computer are combined in a local area network with a database server that stores shared database. Where DBMS are split into two parts Database front-ends, such as interactive query tools, report writer and application program run on personal computer. The back-end database engine that stores and manages the data runs on the server. As the client server architecture grew in popularity in 2000 , SQL became the standard standard database language for communication between the front end tool and back end in architecture. The detailed explanation of architecture give in a next slide.
Microsoft SQL Server: is a Relational Database Management System(RDBMS) produced by Microsoft . SQL Server’s primary query language is Transact SQL Which is an implementation of the ANSI/ISO standard Structured Query Language (SQL) used by both Microsoft and Sybase. SQL Server uses for both OLTP and OLAP Databases In OLTP (On line Transaction Processing), user can continuously update the data with fully normalized base with data consistency. In OLAP (On Line Analytical Processing), normalization is not required for consistency. It focuses on multiple records analysis. Here replication is very easy. SQL server uses the Client /Server Architecture where multiple users can create the database simultaneously.
Faculty Notes : SQL Server Architecture : SQL allows each system to do what it does best. SQL allows personal computer to function as font-end to network servers or to larger minicomputer and mainframe database, providing access to corporate data from personal computer application. The Client and server components in client server communication architecture model. Client Server Architecture : In this client server database architecture, personal computers are combined in a LAN with a database server that stores shared database. The functions of the DBMS are split into two parts. Database Front end such as interactive query tools, report writer and application programs, run on personal computer. The backend database Engine that stores and manages the data which runs on the server . The client Server Architecture reduces the network traffic and splits the database workload. User interactive functions such as handling input and displaying data are concentrated on the user PC Data intensive functions, such as file IO and query processing and are concentrated in the database server .Most importantly, the SQL language provides a well defined interface between the front-end and backend systems. Client Components :A client application sends Transact-SQL statements and receives result sets. User develops an application by using a database API. The application has no knowledge of the underlying network protocols used to communicate with SQL Server. Database API :Database API (OLE DB, ODBC) uses a provider, driver, or DLL to pass Transact-SQL statements and receive result sets. This is an interface that an application user has to send requests to SQL Server and to process results that SQL Server returns. Client Net Library : A client Net-Library manages network connections and routing on a client. This is a communication software component that packages the database requests and results for transmission by the appropriate network protocol. Server Components : The server components in the communication architecture include: SQL Net Libraries : SQL Server can monitor multiple Net-Libraries concurrently. The client Net-Library must match one of the server Net-Libraries to communicate successfully. SQL Server supports network protocols such as TCP/IP, Named Pipes, NWLink, IPX/SPX, VIA ServerNet II SAN, VIAGigaNet SAN, Banyan VINES, and AppleTalk. Open Data Services : makes data services appear to a client as SQL Server by providing a network interface for handling network protocol processes and server routines. This is a component of SQL Server that handles network connections, passing client requests to SQL Server for processing and returning any results and replies to SQL Server clients. Open Data Services automatically listens on all server Net-Libraries that are installed on the server. Relational Engine : The relational engine parses Transact-SQL statements, optimizes and executes execution plans, processes data definition language (DDL) and other statements, and enforces security. Storage Engine : The storage engine manages database files and the use of space in the files, builds and reads data from physical pages, manages data buffers and physical input/output (I/O), controls concurrency, performs logging and recovery operations, and implements utility functions such as Database Consistency Checker (DBCC), backup, and restore.
Faculty Notes: Client server architecture allows user to design and deploy (submit) the application in SQL Server where Client programming interface provide the means for application to run on separate where client computers and to communicate to server in a network. Client/server architecture is constructed so that the database can reside on a central computer, known as a server, and can be shared among several users. Users access the server through a client or server application. The client application runs both business logic and the code to display output to the user. The client application is also known as a thick client. In SQL Server user is interacting with client server database ,by contrast, the data is still stored in a file, but all access to the file is controlled by a single master program ( the server). When an application wants to make use of existing data, this application (the client) sends a request to the server. The server finds the proper data and send it back. When an application wants to write new data to the database, it sends the data to server, which does the actual writing. In a multi-tier client/server system, the client application logic is run in two locations: • The thin client is run on the user's local computer and is focused on displaying results to the user. • The business logic is located in server applications running on a server. Thin clients request functions from the server application, which is itself a multithreaded application capable of working with many concurrent users. The server application is the one that opens connections to the database server and can be run on the same server as the database, or it can connect across the network to a separate server operating as a database server. Having data stored and managed in a central location offers several advantages: • Each data item is stored in a central location where all users can work with it. Separate copies of the item are not stored on each client, which eliminates problems with users having to ensure they are all working with the same information. • Business and security rules can be defined one time on the server and must be enforced equally among all users. This can be done in a database through the use of constraints, stored procedures, and triggers. It can also be done in a server application. • A relational database server optimizes network traffic by returning only the data an application needs. For example, if an application working with a file server needs to display a list of the names of sales representatives in Pune, it must retrieve the entire employee file. If the application is working with a relational database server, it sends this command: SELECT first_name, last_name FROM employees WHERE emp_title = 'Sales Representative' AND emp_state = 'Pune‘ The relational database sends back only the names of the sales representatives in Pune, not all of the information about all employees. Because the data is not stored on each client, clients do not have to dedicate disk space for storing data. The clients also do not need the processing capacity to manage data locally, and the server does not need to dedicate processing power to displaying data. The server can be configured to optimize the disk I/O capacities needed to retrieve data, and clients can be configured to optimize the formatting and display of data retrieved from the server. The server can be stored in a relatively secure location and equipped with devices such as an Uninterruptable Power Supply (UPS) more economically than fully protecting each client. • Maintenance tasks such as backing up and restoring data are simplified because they can focus on the central server.
Faculty Notes : Object Explorer - component connects to Database Engine instances, Analysis Services, Integration Services, Reporting Services, and SQL Server Compact Edition. It provides an user interface in a tree view of all the objects present in the server in order to manage them. It includes the development features for databases, and management features for all server types. It provides the features to register, browse and manage servers. You can also create, browse and manage server components. It can be used to configure the Security, Notification Services, Replication, SQL Server Agent, Management Services and other Server Objects. Registered Servers – It displays a list of all the registered servers. Used to organize & manage information of the servers user accesses frequently. This is useful to preserve the connection information, check the running registered servers, to connect the object explorer and the query editor to a running registered server, Create groups of servers. Through this we can provide user-friendly names to these registered servers by providing a value in the Registered server name box that is different from the Server name list. The registered server information includes detailed descriptions for registered servers and the server groups. We can export or import the registered server groups. Query Editor : It is text/code editor, a word processing tool for editing & displaying the code/text. It provides the ability to execute Queries written in T-SQL, DMX, XMLA, and MDX. It is called the Query Editor, the Text Editor, or the Editor, based on its content. If it contains only text without an associated language, it is referred to as the Text Editor. If it contains source code associated with a language, it is referred to as the Query Editor. When referring to a particular type of Query Editor the code type is added to the name, for instance the SQL Query Editor or the MDX Query Editor. It integrates with SourceSafe version control. Solution Explorer: The Solution Explorer provides an organized view of your projects and files. SQL Server Management Studio provide projects, which are organized into solution. A solution can contain multiple projects, and a project typically contains multiple items. A new solution is automatically generated when you create a project, and you can add additional project as needed to an existing solution. The items in each project container are saved as files in project folders in the system. Whenever you create a new solution, it organizes its data in 3 folders: Connections : Stores the server connection information Queries : Stores the .sql code files Miscellaneous : any other file used for reference.
Faculty Notes :
Faculty Notes: Image1 -In order to take database backup, first select a database. Right click on the database, select “Task” ->Backup from the pop-up menu. Image2 – Above indicated window will appear. Image3 – Select the database, for backup Image4 – You can select full back up in the backup type. Full back up would take the back up of both, the MDF and LDF files. Image5 -Keep the default settings and click on ok. The notification of successful backup would come.
Faculty Notes : In order to restore the database, Image 1 – Right click on the database, select “Task” ->Restore from the pop-up menu. Image2 – Above indicated window will appear. Select the database from device, provide it the path. It should indicate the name of the database to be restored. Select the To Database list, ensure the restore name and database name are the same. Click on ok
Faculty Notes : In order to import the database, Image 1 – Right click on the database, select “Task” ->Import from the pop-up menu. Image2 – This window will appear. Select the source data source and the server. Image3 – We select MS Access as our data source. Browse the file. Click on the advance button. Test the connection Image4 – Select the destination. In our case, we would keep it as SQL Native Client. Identify the server name. Keep the authentication as Windows authentication. For the database, click on new button. Image5 – Provide the name of the new database and click on ok Image6 – Select the first option Image7-List of table would appear, select the tables to be imported. Image 8 – Select execute immediately checkbox Image9- Click on finish Image10 – Execution successful confirmation will appear. Check the new database created. Image4 – The advance options window will appear.