Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to SQL Server for Windows Administrators Presented to WiNSUG 02/05/09 Bret Stateham Owner, Net Connex Blogs.netconnex.com.

Similar presentations


Presentation on theme: "Introduction to SQL Server for Windows Administrators Presented to WiNSUG 02/05/09 Bret Stateham Owner, Net Connex Blogs.netconnex.com."— Presentation transcript:

1 Introduction to SQL Server for Windows Administrators Presented to WiNSUG 02/05/09 Bret Stateham Owner, Net Connex bret@netconnex.com Blogs.netconnex.com Twitter: @BStateham

2 Agenda The SQL Server Product Family SQL Server Installation Initial configuration Client Tools Databases Security Backup and Restore

3 The SQL Server Product Family SQL Server Database Engine SQL Server Analysis Services SQL Server Analysis Services SQL Server Integration Services SQL Server Reporting Services SQL Server Reporting Services SQL Server Analysis Services (SSAS) SQL Server Integration Services (SSIS) SQL Server Reporting Services (SSRS)

4 SQL Server Database Engine What people mean when they say “SQL Server” Relational Database Management System (RDBMS) Supports multiple databases per Instance Supports multiple instances per server Used for On Line Transaction Processing (OLTP) solutions

5 SQL Server Analysis Services Multi-Dimensional database engine Multiple databases with multiple cubes per instance Multiple instances per server Used for On Line Analytical Processing (OLAP) operations Databases are created in “Business Intelligence Development Studio” (BIDS) Includes Data Mining capabilities for discovering patterns in data.

6 SQL Server Integration Services Used to move data between databases and platforms Wizards: – “Import and Export Wizard” – “Copy Database Wizard” More complex development done in “Business Intelligence Development Studio” (BIDS) SQL Servers “Extract, Transform and Load” (ETL) tool

7 SQL Server Reporting Services Enterprise reporting platform Provides a website that users can go to for reports Reports can also be delivered via email or as files in a folder share using subscriptions Can report on data in platforms other than SQL Server Again, Business Intelligence Development Studio is the development environment Includes “Report Builder” for power users

8 SQL Server Editions EditionDescription Enterprise EditionEverything that SQL Server offers. Standard EditionDepartmental or small business use. All services, but some features are limited. Workgroup EditionFor small workgroups. Limited features Developer EditionSame as express, but can be used in development only. Lists for $49.00 Express EditionFree database engine. Legal to use in production environments but with limited features and power. Compact EditionFor use on hand-held devices or as a small footprint in memory database engine.

9 Installation Demo

10 SQL Server Services ServiceDescription SQL Server ( )The SQL Server Database Engine SQL Server Active Directory HelperUsed for AD integration SQL Server Agent ( )Performs scheduled operations SQL Server Analysis Services ( )The multi-dimensional database engine SQL Server BrowserHelps clients find instances SQL Server FullText Search ( )Creates indexes on large character fields SQL Server Integration ServicesETL (Import and Export) SQL Server Reporting Services ( )Centralized reporting platform SQL Server VSS WriterVolume Shadowcopy Service integration

11 SQL Server Files Default Path: C:\Program Files\Microsoft SQL Server \80, \90, \100 Folders are the client tools SQL 2005 - MSSQL.x are the various instances – MSSQL = Database Engine – OLAP = Analysis Services – Reporting Services = Reporting Services SQL 2008 – Folders are named: – MSSQL10. = SQL Database Engine – MSAS10. = Analysis Services – MSRS10. = Reporting Services

12 Registry Keys Software Configuration: HKLM\Software\Microsoft\Microsoft SQL Server * Service Configuration: HKLM\System\CurrentControlSet\Services\MSSQL*

13 Initial Configuration SQL Server Configuration Manager – Services – Server Network Configuration – Client Network Configuration Surface Area Configuration Manager – SQL 2005 Only (Goes away in 2008) – Enable features that are off by default – Some overlap with SQL Server Configuration Manager

14 Key Configurations Set a secure password on the SA account regardless of the security configuration Backup the system databases Apply service packs Backup the system databases again Use the SQL Server Configuration Manager to enable remote access

15 Client Tools SQL Server Management Studio (SSMS) – Replaces “Enterprise Manager” – Replaces “Query Analyzer” – Adds functionality that didn’t exist before (Analysis Services, Compact Edition, Reporting Services) SQLCMD (Command Line Tool) – Replaces “OSQL” – Allows interaction with SQL Server from the command line or batch files.

16 Databases From an Admin’s Point of View The Physical Database The Logical Database System Databases Creating Databases

17 The Physical Database A database is at least two files: – At least one database file (.mdf and.ndf) – At least one transaction log file (.ldf) – Most databases will only have one of each Data files store – The data in the tables and indexes – The code for the stored procedures, etc. – The “meta data” (object definitions, security, etc.) Log Files store – Details about the transactions that occur in the database.

18 The Logical Database Tables – Store the various types of data we want to work with (Employees, Products, etc) Indexes – Help SQL Server find your data quickly (Index by last name, postal code, phone number, etc) Views, Stored Procedures, Triggers, Functions – Code objects stored in the database for re-use – Adds a layer of security to the database

19 System Databases DatabaseUse MasterThe only database SQL Server knows about at start up Documents all the other databases Stores the server configuration values (like memory config,etc) Stores “logins” to control access to the instance ModelThe template database used when each database is created MSDBStores SQL Server Agent jobs, alerts, operators, schedules Stores backup and restore history Stores SSIS packages that are saved to “SQL Server” or “MSDB” TempDBUsed by SQL Server when it needs extra room during sorts, etc. Can be used by developers to store temporary data Is used in certain cases to store previous versions of data

20 Creating a Database SQL Server Management Studio (SSMS) File Placement – Data files and log files should be in different drives – Data files work well on striped arrays – Log files work well on mirror sets Choose an appropriate initial file size Choose appropriate file growth settings

21 Creating a Database Demo

22 SQL Server Security Authentication methods Instance Level Permissions User Accounts Database Level Permissions

23 Authentication Methods Windows Authentication – Recommended method – Uses Windows User Accounts and Groups – Easiest management in the long run SQL Authentication – The “SA” Account – Can use the same password policies as Windows – Use only in special situations Logins – Can be either “Windows” or “SQL” logins – Used to gain access to the instance

24 Instance Level Permissions Are stored in the “master” database Fixed Server Roles – Assign bundles of instance permissions to logins – Sysadmin: full control over the instance – Dbcreator: allowed to create databases All permissions are assignable – The “CONTROL” permission grants full control over any resource

25 User Accounts Are stored in each database Used to grant access to individual databases Map to a login “dbo” stands for Database Owner – Maps to the login that owns the database – Full control over the database “guest” exists, but is disabled by default

26 Database Level Permissions Fixed Database Roles – Assign bundles of permissions to users – Db_owner: Full control over the database – Db_ddladmin: can create any object – Db_datareader: can select data from any table Assignable Permissions – CONTROL, CREATE, SELECT, INSERT, UPDATE,etc. User Defined Roles – You can create roles to simply the assignment of permissions

27 SQL Server Security Overview Active Directory Windows Server SQL Server Logins & Roles Database Users & Roles Schema & Objects Administrator Domain Admins Administrator Administrators sa sysadmin dbo db_owner BUILTIN Administrators Creator or Owner

28 Creating Logins and Users Demo

29 Backup and Restore Backup Types Backup Media Third Party Backup Solutions Database Recovery Model Option Performing Backups Performing Restores

30 Backup Types Database Backups – Backup data from the data files – Full Backups: Backup everything – Differential Backups: Backup changes since the last full backup Transaction Log Backups – Backup any unbacked-up information in the transaction log – Act as “Incremental” backups – Allow us to restore our databases to the point of failure

31 Backup Media Tape – Can backup to tape if there is a tape device visible to SQL Server File – Can backup instead to a file on disk – Can be a local file or a unc path Can “Append” or “Overwrite” media when backing up Common solution – SQL Server to backup to disk – Enterprise backup solution backs up backup files

32 Third Party Backup Solutions Enterprise Backup Solutions support SQL Typically, and “Agent” is installed Most of them perform regular SQL Backups They store they backup data on their media

33 Database Recovery Model Option Each database has a “Recovery Model” option FULL – All transactions logged in detail, including bulk operations – Transactions are kept in the log until we backup – Best choice for most production databases BULK_LOGGED – All transactions are logged, Bulk operations only “lightly” – Bulk data is included in the log backup, not the live log – Transactions are kept in the log until we backup – Use this when you do a lot of bulk loads SIMPLE – Transactions are logged just like BULK_LOGGED – Transactions are cleared from the log when they are done – You can not backup the log – Good choice for development databases or databases where it is ok to lose some data.

34 Performing Backups

35 Performing Restores

36 Summary The SQL Server Product Family SQL Server Installation Initial configuration Client Tools Databases Security Backup and Restore

37 Thanks! Stay in touch: – Email: bret@netconnex.com – Blog: blogs.netconnex.com – Twitter: @BStateham Do you know about Microsoft Tag? gettag.mobi


Download ppt "Introduction to SQL Server for Windows Administrators Presented to WiNSUG 02/05/09 Bret Stateham Owner, Net Connex Blogs.netconnex.com."

Similar presentations


Ads by Google