Tải bản đầy đủ (.pdf) (15 trang)

1. Gioi thieu va cai dat SQL SERVER 2005 express

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (1.3 MB, 15 trang )

Giới thiệu

Giới thiệu SQL SERVER 2005
Express Edition





TRẦN THỊ BẠCH HUỆ

SQL Server 2005 là một hệ quản trị CSDL
quan hệ (RDBMS – Relational Database
Management System) sử dụng TransactSQL để trao đổi dữ liệu giữa client và server
Một số hệ quản trị khác như Oracle, Access,
MySQL,…

3

1

Nội dung





Giới thiệu
Cài đặt
Đăng nhập SQL Server 2005 Express
Một số thao tác cơ bản






2



Các phiên bản của SQL Server 2005:





Tạo mới database, tạo mới bảng
Xoá bảng, xoá database
Mở một query editor để viết câu lệnh SQL




Enterprise
Standard
Workgroup
Express
Developer
Compact

4


1




Enterprise:







Chỉ hỗ trợ cho các hệ điều hành Windows Server
Bao gồm tất cả các đặc tính của SQL Server
2005 và có khả năng xử lý giao dịch kinh doanh
trực tuyến và các ứng dụng data warehousing
Hỗ trợ không giới hạn số lượng CPU, kích thước
Database, RAM (nhưng tùy thuộc vào kích thước
RAM tối đa mà HĐH hỗ trợ) và hỗ trợ trên các hệ
thống 64 bit

5

Workgroup:




Bao gồm các tính năng cốt lõi của SQL Server.

Đây là giải pháp quản trị dữ liệu cho các tổ chức
nhỏ cần có một CSDL không giới hạn về kích
thước cũng như số lượng người dùng
Hỗ trợ 2 CPU và tối đa 3GB RAM

7





Standard:






Express:


Chủ yếu hỗ trợ cho các hệ điều hành Windows
Server
Bao gồm các tính năng cần thiết cho các giải
pháp thương mại điện tử, data warehousing và
line-of-bussiness
Hỗ trợ tối đa 4 CPU




Bản miễn phí, dễ sử dụng, nhẹ. Bao gồm một số tính năng
như SQL Server 2005 Reporting Services và SQL Server
2005 Management Studio Express
Hỗ trợ tối đa 1CPU, 1GB RAM và kích thước database giới
hạn trong 4GB

Tham khảo chi tiết tại link sau (ngày cung cấp link
9/5/2013):
/>
6

8

2




Developer (có thể sử dụng trên Windows XP)






Windows Server 2003 Web Edition SP1
Windows Small Business Server 2003 SP 1 hoặc cao
hơn
Vista Home Basic và các phiên bản cao hơn (SQL
Express SP1 và SQL Express Advanced SP2)


Bao gồm tất cả các tính năng của phiên bản kinh doanh
(Enterprise Edition)
Được dùng chủ yếu cho việc phát triển (development), test
và demo

Compact



Bản miễn phí, dễ sử dụng
Dành cho các nhà phát triển xây dựng các ứng dụng
Windows Desktop và di động, chạy trên tất cả các nền
Windows

9

Memory

Tối thiểu 192 MB RAM; tốt nhất là 512MB trở lên

Hard Disk

350 MB ổ cứng cho các cài đặt cơ bản
425 MB ổ cứng co việc cài SQL Server Books Online,
SQL Server Mobile Books Online và CSDL mẫu
(sample database)

Drive


CD-ROM hoặc DVD-ROM

11

Cài đặt SQL Server 2005 Express


10

Các yêu cầu hệ thống

Display

Super VGA (1,024x768) hoặc cao hơn

32 bit

Other devices

Mouse, Keyboard

Processor

Pentium III 600-megahertz (MHz) hoặc cao hơn
Đề nghị: 1GHz hoặc cao hơn

Framework

Trước khi cài SQL Server 2005 Express, cần phải
cài .NET Framework 2.0 trước


Microsoft Internet Explorer 6.0 SP1
hoặc cao hơn

Hệ điều hành
(Operating
System)

Windows XP Service Pack (SP) 2 hoặc cao hơn
Windows 2000 Professional SP4
Windows 2000 Server SP 4 hoặc cao hơn
Windows Server 2003 Standard, Enterprise, hoặc
Datacenter editions SP 1 hoặc cao hơn

Các yêu cầu
khác
(other
requirements)

Tham khảo link sau (ngày cung cấp link 9/5/2013):
/>
12

3




Các bước cài đặt SQL Server Express
Các bước thực hiện ở các slide sau được lấy từ link

sau (ngày truy cập 9/5/2013)
/>
15

13





14

Step 1: To begin installation, double-click
sqlexpr.exe
Step 2: On the End User License Agreement
page, read the license agreement, and then
select I accept the licensing terms and
conditions check box. Click Next



Step 3: SQL Server Component Update
runs, installing the software required prior to
installing SQL Server Express. Click Next

16

4



17



18

19

Step 4: The Welcome to the Microsoft SQL
Server Installation Wizard page appears.
Click Next.



Step 5: On the System Configuration
Check page, the computer is scanned for
potential installation problems. To interrupt
the scan, click Stop. To proceed with setup
after the scan completes, click Continue

20

5




Step 6: On the Registration Information page,
enter information in the Name and Company
text boxes. Click Next.





21

Because SQL Server Express is free, there is no
Product Key text box on this page.
If you select the Hide advanced configuration
options check box, the Service Account,
Collation Settings, Instance Name, and User
Instances pages do not appear during setup.

23

22

24

6




Step 7: On the Feature selection page, select
the program features to install and click Next

27

25




26

Step 8: On the Instance Name page, select a
Default instance or a Named instance for
your installation. If you select Default
instance, an existing default instance will be
upgraded. If you select Named Instance,
specify an instance name or the default
named instance of SQLExpress is used.
Click Next

28

7


29



Step 9: The Service Account page lets you assign
local system account or a domain user account to
SQL Server service. This page does not appear if
you select the Hide advanced configuration
options check box





30

31



Step 10: On the Authentication Mode page,
specify the security mode used to connect to
your instance of SQL Server.


Select Use a Local System account that does not require
a password to connect to SQL Server on the same
computer, and then click Next.
Select Use a Domain User account, enter the Username,
Password, and the Domain name, and then click Next



If you select Windows Authentication, Setup
creates an sa account that is disabled by default.
If you select Mixed Mode Authentication you must
set strong passwords for all SQL Server logins.
Enter and confirm a strong sa logon password.
Click Next

32


8


33



34



Step 13: On the Error and Usage Report
Setting page, select whether to turn on error
reporting and usage reporting for SQL Server
and its components. By default, error
reporting is turned on. To turn off error
reporting, clear the check box. Click Next



Step 14: On the Ready to Install page, click
Install to finish installing SQL Server.

35

Step 12: On the User Instances page,
specify if you want to generate a separate
instance of the Database Engine for nonadministrator users. By default, user instance
functionality is enabled. To turn off user
instances, clear the check box. This page

does not appear if you select the Hide
advanced configuration options check
box. Click Next
36

9


37



38

39

Step 15: On the Setup Progress page, you
can monitor installation progress as setup
proceeds. Click Next.



Step 16: On the Completing the Microsoft
SQL Server Installation Wizard page, you
can view the setup summary log by clicking
the link provided on this page. To complete
the SQL Server Installation Wizard, click
Finish.

40


10


41

43

Đăng nhập SQL Server 2005 Express




Khởi động SQL Server Management Studio
Express
Server name: Đã được điền sẵn
Authentication: Có thể chọn:





42





Nếu trong quá trình cài đặt chúng ta không cho phép
SQL Server kích hoạt ngay khi khởi động máy, bấm

nút Connect sẽ gây ra lỗi
Khắc phục:


Windows Authentication
SQL Server Authentication: Phải nhập password
(được thiết lập trong quá trình cài đặt)





Nhấn nút Connect (tham khảo hình slide sau)

Start | Run | gõ services.msc | enter
Nhấp đúp vào SQL Server (SQLExpress), chọn Automatic
tại combo box Startup | Apply | Start | OK

Giao diện sau khi đăng nhập thành công như slide
sau:

44

11


Tạo mới database

45


47

Một số thao tác cơ bản


Một số thao tác cơ bản





46

Tạo mới database, tạo mới bảng
Nhập dữ liệu vào bảng
Xoá bảng, xoá database
Mở một query editor để viết câu lệnh SQL

48

12


49

Tạo bảng mới

50

51


• Save bảng mới

52

13


53

55

Nhập dữ liệu vào bảng


Xoá bảng, xoá database (DB)

Tham khảo slide sau





54

Nhắp phải chuột lên bảng hay DB cần xoá |
chọn Delete | OK
Trong trường hợp xoá một DB, nên check
vào mục Close existing connections. Khi đó
SQL Server 2005 sẽ ngắt tất cả các kết nối

vào CSDL này và việc xoá sẽ không gây lỗi

56

14


Mở một query editor để viết câu lệnh SQL




Hết

Các bước tạo một query
(tham khảo slide sau)
Chú ý: Câu lệnh SQL sẽ có tác dụng trên CSDL
đang được chọn trong Combo box. Do đó cần chú ý
lựa chọn đúng CSDL cần tương tác

57

59

1

3
2

4


58

15



×