Title: Start up
1Start up
- Log on to the network
- Start Management Studio
- Connect to Reliant\sql2k5 and your SalesOrders
database - Start Books Online
2MIS 431Dr. Steve RossSpring 2007
- Security, Recovery,
- and Data Transfer
Material for this lecture is drawn from SQL
Server 2005 Applied Techniques, and the
professors experience.
3Security
- Enabling remote access
- Authentication
- Principal person, group, or process
- Operating system, server, database levels
- Indivisible or collection
- Authentication mode
- Windows authentication mode
- Requires trusted connection
- Mixed authentication mode
4Creating a SQL Server Login
- Must specify
- Login name
- Password
- Default DB
- Server role (if any)
- Database role
5Server Roles (Fixed)
- bulkadmin
- dbcreator
- diskadmin
- processadmin
- securityadmin
- serveradmin
- setupadmin
- sysadmin
See Table 2-2 and Books Online for descriptions
6Database Roles (Default)
- db_accessadmin
- db_backupoperator
- db_datareader
- db_datawriter
- db_ddladmin
- db_denydatareader
- db_denydatawriter
- db_owner
- db_securityadmin
- public
See Table 2-3 and Books Online for descriptions
7Application Roles
- Allow access to specific data only to users that
connect through a specific application
8Schemas
- Container objects that allow you to group
database objects - Default schema is dbo or the login of the
object creator - Fully qualified name
- server.database.schema.object.field
- Separates user from object ownership
9Table and Column Permissions
- Table permissions
- alter
- control
- delete
- insert
- references
- select
- take ownership
- update
- view definition
- Column permissions
- select
- update
- reference
See Tables 2-4, 2-5, and Books Online for
descriptions
10Programmable Objects Permissions
- Stored procedures
- alter
- control
- execute
- take ownership
- view definition
- User-defined functions
- take ownership
- view definition
- select (table-valued functions)
- execute (scalar functions)
See Tables 2-6, 2-7, and Books Online for
descriptions
11Ownership Chains
- The sequence of database objects accessing each
other - Granting permission to execute or select a
programmable object also grants permission to
select or update a referenced object if they have
the same owner
12Creating a Login
13Creating a Login
14Creating a Login
15Creating a Login
16Creating a Login
17Practical Exercise 5
- In the sql2k5 instance of SQL Server
- Add logins for each employee
- Ann, Mary, Thomas, Janet, John, David, Peter,
and Susan - The login name should be your initials employee
first name e.g., SCRAnn - SQL Server authentication
- Grant public access to each login to your
database.
18Determining User ID
?
?
?
19Practical Exercise 6
- In your database
- Create a table (UserIDs) to hold SQL user
identification numbers and person identification
numbers. - Person ID numbers are a foreign key to Employees
- SQL user ID numbers match the uid in sysusers
- Neither field can be null
- Both ID numbers are unique (within your database)
- A person might have more than one SQL user ID
- Populate your table
20Practical Exercise 6 (contd)
- Update your ER Diagram in SQL Server
- Refresh your ER Diagram in Visio
21Disaster Recovery Backup
- Recovery Model
- Simple
- Use with Full or Differential Backups
- Might not recover most recent transactions
- Full
- Use with Transaction Log Backups
- Allows recovery of all committed transactions
22Disaster Recovery Backup
- Backup Device
- Tape
- Less common
- Disk
- Physical or logical device
- Whenever possible, not the same device containing
database files
23Disaster Recovery Backup
- Backup type
- Full
- Differential
- Transaction log
- If disaster occurs atthen recover either F1
D2or F1 TL1 TL2
24Disaster Recovery Restore
- Restore last full backup
- Then, either
- Last differential backup
- or
- All transaction log backups
- since the last full backup
25Backup Your Database
- Right-clickyour db, then choose
Slide added 5/23/07
26Backup Your Database
Slide added 5/23/07
27Backup Your Database
- TypicalOptionschoices
- After allchoiceshave been,click OK
Slide added 5/23/07
28The MaintenancePlan Wizard
- Under Management,right-clickMaintenance Plans
- Choose MaintenancePlan Wizard
Slide added 5/23/07
29The Maintenance Plan Wizard
Slide added 5/23/07
30The Maintenance Plan Wizard
Slide added 5/23/07
31The MaintenancePlan Wizard
Slide added 5/23/07
32The Maintenance Plan Wizard
Slide added 5/23/07
33The Maintenance Plan Wizard
- Click through several OK and Finish buttons
Slide added 5/23/07
34Transferring Data
- Backup and restore
- Detach and attach
- Replication
- SQL Server Integration Services (SSIS)
35Next Lecture
- Multiple Tables I Inner Joins