Module01
Upcoming SlideShare
Loading in...5
×
 

Module01

on

  • 774 views

 

Statistics

Views

Total Views
774
Views on SlideShare
774
Embed Views
0

Actions

Likes
0
Downloads
5
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • 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.

Module01 Module01 Presentation Transcript

  • M1: Introduction to SQL Server 2005 SQL Server 2005
  • Content
    • Introduction to SQL Server
    • Introduction to SQL Server 2005
    • Introduction to Management Studio
        • Introduction to Object Explorer
        • Introduction to Registered Servers
        • Introduction to Solution Explorer
        • Introduction to Query Editor
    • Introduction to SQL Server Agent
    • Backup & Restore Database
    • Import & Export Database
    • At the end of the Module you should be able to understand and work with:
      • SQL Server
      • SQL Server 2005
      • SQL Server Management Studio & its Componants
        • Object Explorer
        • Registered Server
        • Solution Explorer
        • Query Editor
      • What is a SQL Server Agent?
      • How to take database backup?
      • How to restore database?
      • How to import/export Database?
    Objectives
    • Microsoft SQL Server originated from Sybase SQL Server (referred as Sybase)
    • Microsoft partnered with Sybase in 1989 to develop a version of SQL Server for OS/2.
    • SQL Server was migrated to Windows NT in 1993 with version 4.2
    • From version 6.5 onwards, SQL Server has been a Microsoft-only product.
    • In 1998, Microsoft released SQL server version 7.0 which implemented database engine .
    • Sybase SQL Server is now known as Sybase ASE (Adaptive Server Enterprise)
    • In 2000, Microsoft released SQL Server 2000
    History of SQL Server
    • SQL Server is a relational database management system (RDBMS)
    • SQL Server is built into client/server system
    • This helps the database to reside in a centre computer which is known as server
    • This data is shared among different users which is known as client
    • It is a multi-threaded, multi-user database
    • It is a specialized software used to store, query and manage the business data.
    • It can be used for both OLTP and OLAP databases
      • OLTP is On line Transaction Processing
      • OLAP is On Line Analytical Processing
    • In SQL Server (OLTP)
      • A user can continuously update the data with fully normalized base for data consistency
      • The replication is very easy in this
    • In SQL Server (OLAP)
      • Normalization is not required for consistency
      • The replication is very difficult
    • SQL base database is used to store and organize the enterprise application
    • These applications supports the daily operations of large companies
    What is SQL Server?
    • SQL server is a natural vehicle for implementing applications using a distributed client/server architecture.
    • The server acts as the link between “front end” computer system for user interaction and “backend” system specialized for database management
    How SQL Server works? Query Result Client Client Application SQL Server Relational database management system OLTP OLAP
    • The client runs on multiple computers
    • It is also run on server computer with SQL server
    • In SQL Server, user interacts with server database by using a client.
    • All the data in the server is stored as a file and the access to the file is controlled by a single master program (SQL server)
    • SQL server manages database and allocates the available server resources (such as memory, network bandwidth, disk operations) among multiple users requests.
    SQL Server Architecture
  • Introduction to SQL Server Management Studio
    • Microsoft SQL Server 2005 has an integrated development environment.
    • It provides easy access to create and configure, manage and administer all components of SQL Server.
    • It has combined the graphical tools with script editors helping the developer and administrator of all skill levels.
    • The Enterprise Manager, Query Analyzer, and Analysis Manager of SQL Server 2000 are now available in a single environment.
    • SQL Server Management Studio works with all components of SQL Server such as Reporting Services, Integration Services, SQL Server Compact Edition, and Notification Services.
  • SQL Server Management Studio Components
    • Object Explorer
    • Registered Servers
    • Solution Explorers
    • Query editors
  • Working with SQL Server 2005 Registered Servers Object Explorer Solution Explorer Query Editor
  • Introduction to SQL Server Agent
    • SQL Server Agent is a windows service which executes the scheduled jobs, i.e. the administrative tasks such as taking periodic database backups
    • SQL server Agent runs a job in response to a specific event on a specific schedule.
      • Example
        • If we want to back up all the company servers on every Friday after 4:00pm, SQL Server Agent helps you automate this process.
        • In case of problem, SQL Server Agent can record the event and notify the user.
  • Database Back-up
  • Database Restore
  • Database Import/Export
  • Key Points
    • SQL Server 2005 has an IDE support to connect to various server types.
    • It supports all the object types.
    • SQL Server Agent lets you automate the administrative jobs.
    • With the introduction of SQL Server Management Studio, it is very easy to perform the backup/restore or import/export task.
  • Questions & Comments