10.07.2008BSG Group - Dau Anh Trong1 Introduction about MS SQL Server 2005.

25
10.07.2008 BSG Group - Dau Anh Trong 1 Introduction about MS SQL Server 2005

Transcript of 10.07.2008BSG Group - Dau Anh Trong1 Introduction about MS SQL Server 2005.

Page 1: 10.07.2008BSG Group - Dau Anh Trong1 Introduction about MS SQL Server 2005.

10.07.2008 BSG Group - Dau Anh Trong 1

Introduction about MS SQL Server 2005

Page 2: 10.07.2008BSG Group - Dau Anh Trong1 Introduction about MS SQL Server 2005.

10.07.2008 BSG Group - Dau Anh Trong 2

Introduction about MS SQL Server 2005

• What’s new ?

• Installation

• Connect to Database Engine

• Create Database

• Backup and restore Database

• Create user and grant permission for user.

• References

Page 3: 10.07.2008BSG Group - Dau Anh Trong1 Introduction about MS SQL Server 2005.

10.07.2008 BSG Group - Dau Anh Trong 3

What’s new ?

•SQL Server Management Studio : providing one integrated management console to monitor and manage the SQL Server relational database as well as SQL Server 2005’s services

•Replication

•Scalability

•Query Notification

•Service Broker

•Business Intelligence : make better decisions faster

•More and detail at References

Page 4: 10.07.2008BSG Group - Dau Anh Trong1 Introduction about MS SQL Server 2005.

10.07.2008 BSG Group - Dau Anh Trong 4

Installation

Page 5: 10.07.2008BSG Group - Dau Anh Trong1 Introduction about MS SQL Server 2005.

10.07.2008 BSG Group - Dau Anh Trong 5

Installation

First, installing MS SQL Server Update Advisor. Click “Next” and “Finish” to complete install process.

Page 6: 10.07.2008BSG Group - Dau Anh Trong1 Introduction about MS SQL Server 2005.

10.07.2008 BSG Group - Dau Anh Trong 6

Installation

Second, installing MS SQL Server 2005 and its components. Select all component (Recommended)

Page 7: 10.07.2008BSG Group - Dau Anh Trong1 Introduction about MS SQL Server 2005.

10.07.2008 BSG Group - Dau Anh Trong 7

Installation

Select “Default instance” and click Next

Page 8: 10.07.2008BSG Group - Dau Anh Trong1 Introduction about MS SQL Server 2005.

10.07.2008 BSG Group - Dau Anh Trong 8

Installation

Select “Use the build-in System account” and choose “Local System” in the drop down list.We must select SQL Server Agent (very important)

Page 9: 10.07.2008BSG Group - Dau Anh Trong1 Introduction about MS SQL Server 2005.

10.07.2008 BSG Group - Dau Anh Trong 9

Installation

Select “Mixed Mode” option so that we can connect to DataBaseEngine through Windows accounts and SQL Accounts

Page 10: 10.07.2008BSG Group - Dau Anh Trong1 Introduction about MS SQL Server 2005.

10.07.2008 BSG Group - Dau Anh Trong 10

Installation

Let everything is default.

Page 11: 10.07.2008BSG Group - Dau Anh Trong1 Introduction about MS SQL Server 2005.

10.07.2008 BSG Group - Dau Anh Trong 11

Installation

Impossible to change options

Page 12: 10.07.2008BSG Group - Dau Anh Trong1 Introduction about MS SQL Server 2005.

10.07.2008 BSG Group - Dau Anh Trong 12

Installation

Don’t check any options unless you want to waste time

Page 13: 10.07.2008BSG Group - Dau Anh Trong1 Introduction about MS SQL Server 2005.

10.07.2008 BSG Group - Dau Anh Trong 13

Installation

Installation process, you can take a coffee or go to sleep. Because it’s very long and slow. After all, click “Finish” to complete installation

Page 14: 10.07.2008BSG Group - Dau Anh Trong1 Introduction about MS SQL Server 2005.

10.07.2008 BSG Group - Dau Anh Trong 14

Connect to Database Engine

Click on “Connect” button on the top left and choose “Database Engine …”“Server name” is “.” for localhostAuthentication type is SQL Server Authentication”. Fill “Login” and “Password”. “Login” should be “sa” (SQL top-level user)Don’t forget check “Remember password”, and then click on “Connect”

Page 15: 10.07.2008BSG Group - Dau Anh Trong1 Introduction about MS SQL Server 2005.

10.07.2008 BSG Group - Dau Anh Trong 15

Create DatabaseRight click on “Databases” nodes and choose “New Database …”. Then fill database name and click OK.

Page 16: 10.07.2008BSG Group - Dau Anh Trong1 Introduction about MS SQL Server 2005.

10.07.2008 BSG Group - Dau Anh Trong 16

Backup DatabaseBackup : right click on Database name. Choose Tasks Backup.Click on “Add” button to browse to backup file.

Page 17: 10.07.2008BSG Group - Dau Anh Trong1 Introduction about MS SQL Server 2005.

10.07.2008 BSG Group - Dau Anh Trong 17

Backup Database

Browse and name database file (extension is “.bak” for recommend). Then click “OK” to come back to “Back Up Database” dialog, click “OK” again to complete backup database.

Page 18: 10.07.2008BSG Group - Dau Anh Trong1 Introduction about MS SQL Server 2005.

10.07.2008 BSG Group - Dau Anh Trong 18

Restore DatabaseRight click on Database name, choose “Task” “Restore” “Database…”. Select “From device” option and browse to backup file.

Page 19: 10.07.2008BSG Group - Dau Anh Trong1 Introduction about MS SQL Server 2005.

10.07.2008 BSG Group - Dau Anh Trong 19

Restore Database

Choose your backup file by clicking “Add” button and click “OK” button.

Page 20: 10.07.2008BSG Group - Dau Anh Trong1 Introduction about MS SQL Server 2005.

10.07.2008 BSG Group - Dau Anh Trong 20

Restore Database

Check on your selected backup file. And then change to “Options” tab.

Page 21: 10.07.2008BSG Group - Dau Anh Trong1 Introduction about MS SQL Server 2005.

10.07.2008 BSG Group - Dau Anh Trong 21

Restore DatabaseCheck “Overwrite existing database”. Pay attention to “Original File Name”, it should point to “C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA” folder. Then click “OK” to complete.

Page 22: 10.07.2008BSG Group - Dau Anh Trong1 Introduction about MS SQL Server 2005.

10.07.2008 BSG Group - Dau Anh Trong 22

Create userFill username and password. Select user type is “SQL Server authentication”. Uncheck “Enforce password policy” and choose “Default database” for the user (optional)

Page 23: 10.07.2008BSG Group - Dau Anh Trong1 Introduction about MS SQL Server 2005.

10.07.2008 BSG Group - Dau Anh Trong 23

Grant permission for userSelect “Security” node “Login” node and double click on the username. In “Login Properties” dialog, select “User Mapping”, check on Database name and check on “db_owner” option. Then click “OK”. Now the user can access the database and manipulate on it.

Page 24: 10.07.2008BSG Group - Dau Anh Trong1 Introduction about MS SQL Server 2005.

10.07.2008 BSG Group - Dau Anh Trong 24

References• http://msdn.microsoft.com/en-us/library/bb418498.aspx

• http://www.microsoft.com/sql/prodinfo/overview/whats-new-in-sqlserver2005.mspx

• http://msdn.microsoft.com/en-us/library/ms170363.aspx

Page 25: 10.07.2008BSG Group - Dau Anh Trong1 Introduction about MS SQL Server 2005.

10.07.2008 BSG Group - Dau Anh Trong 25

Thanks your attention

BSG Group