1. Trang chủ
  2. » Giáo án - Bài giảng

Tin hoc

11 153 0
Tài liệu được quét OCR, nội dung có thể không chính xác
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Tiêu đề Cách tạo một kết nối
Trường học University of Information Technology
Chuyên ngành Information Technology
Thể loại Bài viết
Năm xuất bản 2005
Thành phố Ho Chi Minh City
Định dạng
Số trang 11
Dung lượng 1,16 MB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

Cách Tạo Một Kết Nối Register SQL Server Wizard Welcome to the Register SQL Server Wizard This wizard helps you register one or more SQL Servers.. With this wizard you will: ® Sel

Trang 1

Cách Tạo Một Kết Nối

Register SQL Server Wizard

Welcome to the Register SQL Server Wizard This wizard helps you register one or more SQL Servers With this wizard you will:

® Select a SQL Server

® Select an authentication mode

® Specify a SQL Server group

r From now on, | want to perform this task without using 4 wizard

< Back | Next > | Cancel |

Register SQL Server Wizard

Welcome to the Register SQL Server Wizard This wizard helps you register one or more SQL Servers With this wizard you will:

® Select a SQL Server

® Select an authentication mode

® Specify a SQL Server group

iv From now on, | want to perform this task without using 4 wizard

< Back | Next > | Cancel

Sau Khi Next

Ser Registered SQL Server Properties

General

Connection

@ Use Windows authentication

© Use SQL Server authentication

Login Name: |

Password: |

E Always prompt for login name and pas sword

Options

Server Group: id SQL Server Group *| eS

ay IV Display SQL Server state in console

J¥ Show system databases and system objects

JV Automatically start SOL Server when connecting

Sau Khi Chọn Và Điền Thông Tin

Trang 2

General | q

a Server: [192.168.0.11 vị se |

Connection

© Use Windows authentication

© Use SQL Server authentication

Í— Always prompt for login name and password

Options

Server Group: Em Group | |

Eb IV Display SQL Server state in console

I¥ Show system databases and system objects

JV Automatically start SOL Server when connecting

OK | Cancel | Help |

Sau Khi Bấm OK Nó Sẽ Tao Ra Nhu Sau

'm SQL Server Enterprise Manager

File Action View Tools Window Help

£ + ml X #làlä @ % z0 #fš

Console Root SQL Server Group 1 Item

= 4 SQL Server Group

py 192.168.0.11 (Wind

+) (Windows | 145 168.0.11

(Windows NT)

mỗi máy đơn ở nhà có địa chỉ IP là 127.0.0.1 được gọi là địa chỉ loopbaek

// Tạo Một Cơ Sở Dữ Liệu

Trang 3

Database Properties - QL SinhVien

General | Data Files | Transaction Log |

Database

Date created: (Unknown)

Space available: (Unknown)

Number of users: (Unknown)

Backup

Last database backup: None

Last transaction log backup: None

Maintenance

Maintenance plan: None

OK | Cancel | Help |

Sau Khi Tao Xong Ta Properties

QL SinhVien Properties

General Data Files | Transaction Log| Filegroups | Options | Permissions |

Database files

File Name Location Space allocated (MB) Filegraup

Delete | File properties

I¥ Automatically grow file

File growth Maximum file size

( In megabytes: | es (* Unrestricted file growth

@ By percent: 0 [= © Restrict fle growth (MB} —_ | +

| OK Cancel | Help

Va Trong Thu Muc Database Sé Nhu Sau

Trang 4

File Action View Tools Window Help

?m Console Root\Microsoft SQL Servers\SQL Server Group\192.168.0.11 (Windows NT)\Ðatabases\QL SinhVien\Tables [ |[E]

—1 Console Root Tables 20 Items

= 9 MY me conan (windows |=! steroperties dbo System 12/26/2005 9:06:43 AM

sysfulltextnotify dbo System 8/6/2000 1:29:12 AM

{3 Replication

(2) Security

(5) Support Services

Meta Data Services

//' Tạo Một Bảng Dữ Liệu

Chon Right Table -> New Table ->

'm New Table in 'QL SinhVien' on '192.168.0.11'

Column Name Data Type Lenath | Allow Nulls

Columns

Description

Default Value

Precision

Scale

Identity

Identit E

Identity Increment

Is RowGuid

Formula

Collation

Sau Khi Tạo Xong Ta Muốn Mở Lại Ta Chọn Table Và Right

Trang 5

m SQL Server Enterprise Manager

File Action View Tools Window Help

+ + HRs Xx¥RQxt `; f4

=) 192.168.0.11 (Windows New Table

U Northwind er

=) 9 QL Sinhvien Full-Text Index Table >

a Diagrams

Copy

Delete

Rename

gE User Defined

{5} Data Transformation

CS] Management

(5) Replication

(5) Security

{5} Support Services

Meta Data Services

Ế > ee me Marg tc ee) bai ly thuyetmonSQ

// Cách Tạo Bảng Bằng Câu Lệnh Query

Trang 6

cy bai ly thuyet mon SQL server - Microsoft Word

File Edit View Insert Format Tools Accessories

(ACD Systems

Dae cử m cổ Lò vị la n Corel Graphics Suite 11

44 Normal+ Bold + VNI-Times x _ ‹(E Font Unicode

New Office Document

Open Office Document

Vietkey 2000

Windows Catalog

Windows Update

Winzip

Set Program Access and Defaults

n Games

n HTML Help Workshop

n Intel Application Accelerator

(LAC vIET mtd2002

(Q Macromedia (Microsoft NET Framework SDK v1.1 (Microsoft Developer Network (Q Microsoft Office Tools (®) Microsoft SQL Server - Switch (Q Microsoft Visual Studio 6.0

Proqrarns

n Microsoft Visual Studio NET 2003

(_PrintMe Internet Printing

a >

Connect to SOL Server

Sau Đó Xuất Hiện Như Sau

C là Documents > (&R) Realtek Sound Manager

= » Search r n Symantec Client Security

3 Z7 Run () Xara Webstyle 3.1

Wi] Adobe Reader 6.0

Wes) Internet Explorer

(Q_REALTEK Gigabit and Fast Ethernet NIC Driver

Microsoft Access Microsoft Excel Microsoft FrontPage Microsoft Outlook Microsoft PowerPoint

= ©) I [ze]

Microsoft Visio Microsoft Word MSN Explorer Outlook Express Remote Assistance SWISH v2.0 Windows Media Player

Books Online Client Network Utility

Configure SQL XML Support in IIS Enterprise Manager

Import and Export Data Profiler

G ;ẽi

Ít bò

2 ï :

ấ ISIIEIIE

® Query Analyzer

3 Server Network Utility

a SQL Server: lI 92.168.0.11

[~ Start SOL Server if it is stopped

|

Connect using:

Windows authentication

(© SQL Server authentication

Password: |

vi dụ tạo một bảng svien như sau

Trang 7

r# SQL Query Analyzer - [Query - 192.168.0.11.QL SinhVien.sa - Untitled1*]

(Aa-cWH :;=>eR@eslo B-\v> a

Object Browser x| CREATE TABLE SVIEN

| J 192.168.0.11fsa) — vị | TEN CHAR (30),

Masv INT,

msdb

Northwind

pubs

QL Sinh¥ien

"| tempdb

Common Objects

J Configuration Functior

J Cursor Functions

(ea Mathematical Functior) |/The command(s) completed successfully

) Aggregate Functions

_] Metadata Functions

_} Security Functions

J String Functions

_} System Functions

_} System Statistical Fun

J Text and Image Funct

—_] Rowset

_} System Data Types

| # BE Grids (EH) Messages |

"

ð 0biects [Èz| Templatesj ÍC.;ery batch completed 192.168.0.11(8.0) sa(52) QL5inhVien 0:00:00 0rows Ln5, Col 13

CAPS NUM ZB

> Senco) Mey ata ag nh ee # SQL Query Änaly

Sau Khi Gõ Lệnh Xong Ta Bấm F5 Hoặc Là Chọn Nút

“J master

CREATE TABLE SVIEN _ [Execute Query (F5)

| TEN CHAR (30),

MaSV INT, NAM INT, MAKH (4), )

GO

HES OFS SIS 248 S18 24S SYS 8 oF 8 OIE STS ES Ác ES OIE STE OI CC TÁC TÁC SẠC TÁC OTe TÁC OIE OTe OE Oe TÁC TÁC tự ES OIE STS OIE tự SẠC TC TH TÁC STS ES OIE SẠC OAS SẠC OI CC IS OIE tự TÁC TC SẠC OIE SẠC SẠC TC TH SẮC OR OS OE OR OE OR SẠC Ác

Trang 8

TAO BANG NHO TRO GIUP

*# SQL Query Analyzer - [Query - 192.168.0.11.QL SinhVien.sa - Untitled3*]

(Aa) ME1 : -6@rđđâ - E- v› 5s |

Attach and Detach Database » F- Create table basic template

- Create Database BR SSS SSS SS SS SS SSS SS SS SSS SS SS SSS SSS SSS SS SSS

Create Procedure > WHERE name = N'<table name, sysname, test _table>'

peme, vest_vable>

Create Trigger > 2 Create Table Specifying Constrains

Create View >) 3 Create Table Specifying File Groups me, test table> (

Template 4 Create Table with Computed Column pe f or_co lưnn 1, ,„ int> NULL,

5 Create Table with IDENTITY Column pe for column 2, , int> NOT NULL)

#)-_] Stored Proced 6 Create Table with ROWGUIDCOL Column — ~

+)-(_] Functions 7 Create Temp Table

+) User Defined [

PJ tempdb

J Common Objects

_) Configuration Func

_} Cursor Functions

+) J Date and Time Fur

#i- ] Mathematical Func

+) J Agaregate Functio

_] Metadata Functior

$8 Dbiects |[ÈzÍ Templates| |peady 192.168.0.11(8.0) sa(55) QL5inhVien 0:00:00 0rows Ln16, Col 1

Connections:3 CAPS5 NUM ⁄

TRA CUU CAU LENH TAO BANG DU LIEU

START-> Microsoft SQL Server->Books Online->Chon_ The Index và gõ như sau EBˆ SQL Server Books Online

File Edit View Go Help

Hide Locate Previous Next Back Forward Home Font Print Options

CREATE TABLE

Creates a new table

Contents Index | Search | Favorites |

Type in the keyword to find:

CREATE TRIGGER 5 [ ¢database_name.[ owner ] | owner ] tabie_name

CREATE UNIQUE CLUSTERED INDE € { < column_definition >

CREATE VIEW | cofurmmn_name AS computed _cofumn_expression

Create View Wizard = | < table_constraint > ::= [ CONSTRAINT constraint_name ] }

CreateégentProfile method

CreateAlias method |[ { PRIMARY KEY | UNIQUE } [, 9 J

CreateByUser property

CreateClassD ef method

CreateCube property [ ON { ##eøgroup | DEFAULT } J

CrosteDote mosey” method [ TEXTIMAGE_ON { fi¥egroup | DEFAULT } ]

CreateE rrorQueue method

CreateForAttach property < column_definition > ::= { cofumn_name cata_type }

CreatelnterfaceDef method [ COLLATE < collation_name > ]

CreateMethodDef method [ [ DEFAULT constant_expression ]

CreateObject method | [ IDENTITY [ ( seed , increment ) [ NOT FOR REPLICATION ]]]

CreateObjectE x method

CreateParameterD ef method

CreateProcessT ask object [ ROWGUIDCOL]

CreateProcessT ask2 object [ < column_constraint > ][ .7 ]

CreateProject method

CreatePropertyDef method xã < column_constraint > ::= [ CONSTRAINT constraint_name ]

im SQL Server En Pe} et ae Củ SQL Query An EP SOL Server Bo

HES OFS SIS 248 S18 24S SYS 8 oF 8 OIE STS ES Ác ES OIE STE OI CC TÁC TÁC SẠC TÁC OTe TÁC OIE OTe OE Oe TÁC TÁC tự ES OIE STS OIE tự SẠC TC TH TÁC STS ES OIE SẠC OAS SẠC OI CC IS OIE tự TÁC TC SẠC OIE SẠC SẠC TC TH SẮC OR OS OE OR OE OR SẠC Ác

Trang 9

Để Không Hiển Thị Các File Hệ Thống Ta làm Nhu Sau,

HE macy Enterprise Manager

File Action View Tools Window Help

+ 1m x lộ @* AVGEHEG

'im Console Root\Microsoft SQL Servers\SQL Server Group\HS9 (Windows NT)\WDatabases\QLSVIEN\Tables

& d SQL Server Group

E wf Da New SQL Server Registration

g Edit SQL Server Registration properties

t Delete SQL Server Registration

ụ Disconnect

Stop Pause Start

New Window From Here Refresh

E Dã Properties

1 Ma

+] Re Help

1 5ecurity

El Support Services

Meta Data Services

(in > ary g ch '@ SQL Query An : va SOL Server En mi 5Q cay bailythuyetm Pah @ jim yz) 8:45 4M

Sau Đó Ta Đánh Dấu Check Nhu Sau

© Use Windows authentication

(© Use SQL Server authentication

Login Name: lsa

Password: Joc

[ Always prompt for login name and password

Options

Server Group: id SQL Server Group | |

th I¥ Display SOL Server state in console

[ Show system databases and system objects

|¥ Automatically start SOL Server when connecting

| ñK | Cancel Help

3k 3k BIS OIE SIS 2 OIE 2 IS OS IS OIE 24 OI 3S OS aS OIE OIE FIR OIE 2S IS BIS OIE 24k OI OI 2 3K 3K 2K 2K 2 2k is 2S 2s OIE 24k OI lK 3K 3K 3K 2K 2K 2 lK 3K 3€ 2K 2K 2K 2 2k Is Ie 2S 24k 2k Ik 2k 3g Fie 2k 2k 2k 2k 2k

Trang 10

//Cài Đặt RBTV Miễn Giá Trị:

C1: Ngay lúc tạo bảng

CREATE TABLE .(

9

CONSTRAINT <tén RB> CHECK (<Diéu kiện>)

);

C2: Sau khi tạo bảng

ALTER TABLE

ADD CONSTRAINT <tén RB> CHECK (<Diéu kiện>)

HES OFS SIS 248 S18 24S SYS 8 oF 8 OIE STS ES Ác ES OIE STE OI CC TÁC TÁC SẠC TÁC OTe TÁC OIE OTe OE Oe TÁC TÁC tự ES OIE STS OIE tự SẠC TC TH TÁC STS ES OIE SẠC OAS SẠC OI CC IS OIE tự TÁC TC SẠC OIE SẠC SẠC TC TH SẮC OR OS OE OR OE OR SẠC Ác

Tín chỉ môn học: 3,4,6

C1: TINCHI=3 OR TINCHI=4 OR TINCHI=6

C2:TINCHI IN (3,4,6)

MASV theo c4u tric Tinxxxx

MASV LIKE ‘TIN[0-9] [0-9] [0-9] ’

Trang 11

P96 01.070) 1

File Actin View Tools Window Help

TY) MerosoFt 501 Servers =

Northwind

=

New Database, New View

Delete Refresh ors bata Ta

Gireplcatic Help

Gi security

G2 Support Services

Meta Data Services

» New Window fram Here

& &

User Defined User Defined

Export Data, Maintenance Plan, Generate SQL Script Backup Database

Restore Database

Shrink Database

Detach Database Take Offine Copy Subscription Database,

Ngày đăng: 27/06/2013, 11:44

Xem thêm

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN

w