Icrosoft SQL Server Is A Relational Database Management
Icrosoft SQL Server Is A Relational Database Management
INTRODUCTION
icrosoft SQL Server is a relational database management system developed by Microsoft. As a database, it is a software product whose primary function is to store and
retrieve data as requested by other software applications, be it those on the same computer or those running on another computer across a network (including the Internet).
here are at least a dozen different editions of Microsoft SQL Server aimed at different audiences and for different workloads (ranging from small applications that store and retrieve data on the same computer, to millions of users and computers that access huge
amounts of data from the Internet at the same time). Prior to version 7.0 the code base for MS SQL Server was sold by Sybase SQL Server to Microsoft, and was Microsoft's entry to the enterprise-level database market, competing against Oracle, IBM, and, later, Sybase. Microsoft, Sybase and Ashton-Tate originally teamed up to create and market the first version named SQL Server 1.0 for OS/2 (about 1989) which was essentially the same as Sybase SQL Server 3.0 on Unix, VMS, etc. Microsoft SQL Server 4.2 was shipped around 1992 (available bundled with IBM OS/2 version 1.3). Later Microsoft SQL Server 4.21 for Windows NT was released at the same time as Windows NT 3.1. Microsoft SQL Server v6.0 was the first version designed for NT, and did not include any direction from System base. About the time Windows NT was released, Sybase and Microsoft parted ways and each pursued its own design and marketing schemes. Microsoft negotiated exclusive rights to all versions of SQL Server written for Microsoft operating systems. Later, Sybase changed the name of its product to Adaptive Server Enterprise to avoid confusion with Microsoft SQL Server. Until 1994, Microsoft's SQL Server carried three Sybase copyright notices as an indication of its origin.SQL Server 7.0 and SQL Server 2000 included modifications and extensions to the Sybase code base, adding support for the IA-64architecture. By SQL Server 2005 the legacy Sybase code had been completely rewritten. In the ten years since release of Microsoft's previous SQL Server product (SQL Server 2000), advancements have been made in performance, the client IDE tools, and several complementary systems that are packaged with SQL Server 2005. These include: an Elton (SQL Server Integration Services or SSIS), a Reporting Server, an OLAP and data mining server (Analysis Services), and several messaging technologies, specifically Service Broker and Notification Services.
Database Engine
Service Broker Replication Full-Text Search Notification Services
As Shown in the preceding Figure, SQL server 2005 consists of the following core components: Database Engine Integration Services Analysis Services Reporting Services
Database Engine The database engine provides support to store, query, process, and secure data on the database server. The database engine allows you to create and manage database objects, such as tables. Apart from providing support for data management, the database engine also provides the following background services:
publisher/subscribe model. In this model, the changes are sent out by one database server (publisher) and are received by others (subscribe). Full-text search: Allow you to implements fast and intelligent search in large database. It allows you to search records containing certain words and phrases. You can search for different forms of a specific word, such as produce, produces, or production. In addition, you can search for synonyms of a given word, such as garments, cloth, and fabric. Notification services: Allow you to generate and send notification message to the users or administrator about any event. For example, the database administrator should be notified when a table is created or deleted.
Analysis Services: Data warehouse are designed to faculties reporting and analysis.
Enterprise are increasing using data stored in data warehouse for analytical purpose to
Features of SQL Server 2005 The Components of SQL Server 2005 help improve the database management and developer productivity. These benefits are provided by the following features: Built-in support for Extensible Markup Language (XML) data: Allows you to store and manage XML data in variables or columns of the XML data type. The XML data is the data stored in a structure format. This format can be used across different platforms and applications built by using different languages. CLR integration: Allows you to implements programming logic in any language supported by the .NET Framework. Scalability: Allows partitioning of database tables to help in parallel processing of queries. This makes the database scalable and improves the performance of queries. Service-oriented architecture: Provide a distributed, asynchronous application framework for large-scale applications. This allows the database clients to send request to the database server even if the server is not available to process the request immediately. Support for web services: Allows you to provide direct access to the data from the web services by implementing the HTTP endpoints. High availability: Ensures that the database server is available to all users at all times. This reduces the downtime of the server. In SQL server 2005, high availability is
S
data.
QL Server 2008 (formerly codenamed "Katmai") was released on August 6, 2008and aims to make data management self-tuning, self-organizing, and self-maintaining with the development of SQL Server Always On technologies, to provide near-zero
downtime. SQL Server 2008 also includes support for structured and semi-structured data, including digital media formats for pictures, audio, video and other multimedia data. In current versions, such multimedia data can be stored as BLOBs (binary large objects), but they are generic bit streams. Intrinsic awareness of multimedia data will allow specialized functions to be performed on them. According to Paul Flossier, senior Vice President, Server
Applications, Microsoft Corp. SQL Server 2008 can be a data storage backend for different varieties of data: XML, email, time/calendar, file, document, spatial, etc. as well as perform search, query, analysis, sharing, and synchronization across all data types. Other new data types include specialized date and time types and a spatial data type for location-dependent Better support for unstructured and semi-structured data is provided using the
new FILESTREAM data type, which can be used to reference any file stored on the file system structured data and metadata about the file is stored in SQL Server database, whereas the unstructured component is stored in the file system. Such files can be accessed both via Win32 file handling APIs as well as via SQL Server using T-SQL; doing the latter accesses the file data as a BLOB. Backing up and restoring the database backs up or restores the referenced files as well SQL Server 2008 also natively supports hierarchical data, and SQL Server includes better compression features, which also helps in improving scalability. It enhanced the indexing algorithms and introduced the notion of filtered indexes. NET Entity Framework and the reporting tools, replication, and data definition will be built around the Entity Data Model. SQL Server Reporting Services will gain charting capabilities from the integration of the data visualization products from Dundee Data Visualization, Inc., which was acquired by Microsoft. On the management side, SQL Server 2008 includes the Declarative Management Framework which allows configuring policies and constraints, on the entire database or certain tables, declaratively. A "Flat Earth" (GEOMETRY or planar) data type represents geospatial data which has been projected from its native, spherical, coordinate system into a plane. A "Round Earth" data type (GEOGRAPHY) uses an ellipsoidal model in which the Earth is defined as a single continuous entity which does not suffer from the singularities such as the international
8 SQL SERVER 2008
Studio included with SQL Server 2008 supports IntelliSense for SQL queries against a SQL Server 2008 Database Engine. SQL Server 2008 also makes the databases available via Windows Power Shell providers and management functionality available as Camlets, so that the server and all the running instances can be managed from Windows The protocol layer implements the external interface to SQL Server. All operations that can be invoked on SQL Server are communicated to it via a Microsoft-defined format, called Tabular Data Stream (TDS). TDS is an application layer protocol, used to transfer data between a database server and a client. Initially designed and developed by Sybase Inc. for their Server relational database engine in 1984, and later by Microsoft in Microsoft SQL Server, TDS packets can be encased in other physical transport dependent protocols, including TCP/IP, Named pipes, and Shared memory. Consequently, access to SQL Server is available over these protocols. In addition, the SQL Server API is also exposed over web services. The Search process includes the indexer (that creates the full text indexes) and the full text query processor. The indexer scans through text columns in the database. It can also index through binary columns, and use iFiltersto extract meaningful text from the binary blob (for example, when a Microsoft Word document is stored as an unstructured binary file in a database).
SQL Server 2008 R2 SQL Server 2008 R2 (10.50.1600.1, formerly codenamed "Kilimanjaro") was announced at Tech Ed 2009, and was released to manufacturing on April 21, 2010. SQL Server 2008 R2 adds certain features to SQL Server 2008 including a master data management system branded as Master Data Services, a central management of master data entities and hierarchies. Also Multi Server Management, a centralized console to manage multiple SQL Server 2008 instances and services including relational databases, Reporting Services, Analysis Services & Integration Services. SQL Server 2008 R2 includes a number of new services including Power Pivot for Excel and SharePoint, Master Data Services, Stream Insight, Report Builder 3.0, Reporting Services Add-in for SharePoint, a Data-tier function in Visual Studio that enables packaging of tiered databases as part of an application, and a SQL Server Utility named UC (Utility Control Point), part of AMSM (Application and Multi-Server Management) that is used to manage multiple SQL Servers The first SQL Server 2008 R2 service pack (10.50.2500, Service Pack 1) was released on July 11, 2011. The second SQL Server 2008 R2 service pack (10.50.4000, Service Pack 2) was released on July 26, 2012
SQLCMD SQLCMD is a command line application that comes with Microsoft SQL Server, and exposes the management features of SQL Server. It allows SQL queries to be written and executed from the command prompt. It can also act as a scripting language to create and run a set of SQL statements as a script. Such scripts are stored as a .SQL file, and are used either for management of databases or to create the database schema during the deployment of a database. SQLCMD was introduced with SQL Server 2005 or this continues with SQL Server 2008. Its predecessor for earlier versions was OSQL and ISQL, which is functionally equivalent as it pertains to TSQL execution, and many of the command line parameters are identical, although SQLCMD adds extra versatility. Visual Studio Microsoft Visual Studio includes native support for data programming with Microsoft SQL Server. It can be used to write and debug code to be executed by SQL CLR. It also includes
11 SQL SERVER 2008
management interface for Microsoft SQL Server since SQL Server 2005. A version of SQL Server Management Studio is also available for SQL Server Express Edition, for which it is known as SQL Server Management Studio Express (SSMSE). A central feature of SQL Server Management Studio is the Object Explorer, which allows the user to browse, select, and act upon any of the objects within the server. It includes the query windows which provide a GUI based interface to write and execute queries.
DATABASE SERVER A database server is a computer program that provides database services to other computer programs or computers, as defined by the clientserver model. The term may also refer to a computer dedicated to running such a program. Database management systems frequently provide database server functionality, and some DBMSs (e.g., My SQL) rely exclusively on the clientserver model for database access. Such a server is accessed either through a "front end" running on the users computer which displays requested data or the "back end" which runs on the server and handles tasks such as data analysis and storage. In a master-slave model, database master servers are central and primary locations of data while database slave servers are synchronized backups of the master acting as proxies. Some examples of proprietary database servers are Oracle, DB2, Informix, and Microsoft SQL Server. Examples of GNU General Public License database servers are Ingres and MySQL. Every server uses its own query logic and structure. The SQL query language is more or less the same in all the database servers.
SQL Server Management Studio SQL Server Management Studio (SSMS) is a software application first launched with the Microsoft SQL Server 2005 that is used for configuring, managing, and administering all components within Microsoft SQL Server. The tool includes both script editors and graphical tools which work with objects and features of the server. A central feature of SQL Server Management Studio is the Object Explorer, which allows the user to browse, select, and act upon any of the objects within the server. It also has an "express" version that can be freely downloaded. Starting from version 11, the application has been rewritten in WPF that is similar to Visual Studio 2010. DATA STORAGE Data storage is a database, which is a collection of tables with typed column.
As Integer, Float, Decimal, Char (including character strings), Archer (variable length character strings), binary (for unstructured blobs of data), Text (for textual data) among others.
13 SQL SERVER 2008
Running Multiple Instances of SQL Server When you are running multiple instances of the Database Engine, there are two approaches you can use to manage memory:
Use max server memory to control memory usage. Establish maximum settings for each instance, being careful that the total allowance is not more than the total physical memory on your machine. You might want to give each instance memory proportional to its expected workload or database size. This approach has the advantage that when new processes or instances start up, free memory will be available to them immediately.
Use min server memory to control memory usage. Establish minimum settings for each instance, so that the sum of these minimums is 1-2 GB less than the total physical memory on your machine. Again, you may establish these minimums proportionately to
Programmability
T-SQL
T-SQL (Transact-SQL) is the Secondary means of programming and managing SQL Server. It exposes keywords for the operations that can be performed on SQL Server, including creating and altering database schemas, entering and editing data in the database as well as monitoring and managing the server itself. Client applications that consume data or manage the server will leverage SQL Server functionality by sending T-SQL queries and statements which are then processed by the server and results (or errors) returned to the client application. SQL Server allows it to be managed using T-SQL. For this it exposes read-only tables from which server statistics can be read. Management functionality is exposed via system-defined stored procedures which can be invoked from T-SQL queries to perform the management operation. It is also possible to create linked Server using T-SQL. Linked server allows operation to multiple server as one query