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

Giáo trình SQL bài 2

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 (494.79 KB, 15 trang )

Lab 01 a
SQL Server 2008

1


Outlines
SQL Server 2008
Install guide
Using T-SQL

Faculty of Science and Technology

Database Fundamentals

2


SQL Server 2005
Microsoft SQL Server 2005 extends the
performance, reliability, availability, programmability
ease-of-use of SQL Server 2000.
includes several new features that make it an
excellent database platform for :
large-scale online transactional processing (OLTP)
data warehousing
e-commerce applications.

Faculty of Science and Technology

Database Fundamentals



3


Faculty of Science and Technology

Database Fundamentals

4


Prerequires Software
.NET Framework 3.5
MSXML

Faculty of Science and Technology

Database Fundamentals

5


Installation
Reading:
how-to-install-sql-server-2008-a-step-by-stepguide.pdf

Faculty of Science and Technology

Database Fundamentals


6


Veryfy the installation
Click Start
Run
Cmd.
Type the following command and press
ENTER:
NET START MSSQLSERVER ↵

Faculty of Science and Technology

Database Fundamentals

7


Enter the following command to connect to MSSQLSERVER using the
SQLCMD utility. Enter the following Transact-SQL commands to
retrieve the server name:
SELECT @@SERVERNAME
GO

Faculty of Science and Technology

Database Fundamentals

8



Confirm that the server name is returned, and then enter
the following command to exit the SQLCMD utility:
Exit

Faculty of Science and Technology

Database Fundamentals

9


SQL Server Management Studio
Start
Programs
SQL Server 2008
Server Management Studio

SQL

1. Enter
Password
(If exists )

2. click
Connect

Faculty of Science and Technology

Database Fundamentals


10


SQL Server Management Studio (2)

Faculty of Science and Technology

Database Fundamentals

11


Using T-SQL
File
New
Or click

Query with Current Connection
SQL Edit toolbar

Faculty of Science and Technology

Database Fundamentals

12


SQL Editor Toolbar (1)
Connect

Opens the Connect to Server dialog box. Use this dialog
box to establish a connection to a server.
Disconnect
Disconnects the current Query Editor from the server.
Change Connection
Opens the Connect to Server dialog box. Use this dialog
box to establish a connection to a different server.
New Query with Current Connection
Opens a new Query Editor window and uses the connection
information from the current Query Editor window.
Available Databases
Change the connection to a different database on the same
server.
Faculty of Science and Technology

Database Fundamentals

13


SQL Editor Toolbar (2)
Execute
Executes the selected code or, if no code is selected, executes all the
code in the Query Editor.
Debug
Enables the Transact-SQL debugger. This debugger supports debugging
actions such as setting breakpoints, watching variables, and stepping
through code.
Cancel Executing Query
Sends a cancellation request to the server. Some queries cannot be

canceled immediately, but must wait for a suitable cancellation condition.
When transactions are canceled, delays might occur while transactions
are rolled back.
Parse
Check the syntax of the selected code. If no code is selected, checks the
syntax of the all code in the Query Editor window.

Faculty of Science and Technology

Database Fundamentals

14



Tài liệu bạn tìm kiếm đã sẵn sàng tải về

Tải bản đầy đủ ngay
×