Presentation is loading. Please wait.

Presentation is loading. Please wait.

SQL Server 2000 Preview 김연홍 k3701@hitel.net 한국 HP / Microsoft.

Similar presentations


Presentation on theme: "SQL Server 2000 Preview 김연홍 k3701@hitel.net 한국 HP / Microsoft."— Presentation transcript:

1 SQL Server 2000 Preview 김연홍 한국 HP / Microsoft

2 Windows DNA 2000 Next Generation Web Application Platform
Client Tier Application Logic Tier Data Tier Application Services IIS/ASP, COM+/MTS, MSMQ. ADO/OLE DB Data Access, Active Directory, XML, Commerce Data Access and Storage ASP/COM+ Application Other Database Legacy Host Browser SQL Server Rich Client Devices Major update of all the fundamental Windows DNA building blocks as well as introduces new building blocks: Windows 2000 is the cornerstone – includes an integrated Web Applications Server that leverages COM+, MTS and MSMQ, plus Active Directory, IIS5 which is significantly faster than previous version and is the first OS with integrated XML support built in. SQL Server 2000 – Commerce Server 2000 – expands capabilities of most widely used off-the-shelf commerce server Host Integration Server 2000 – expands interop capabilities New Products BizTalk Server 2000 – provides XML-based business process integration Application Center 2000 – provides management services for scale out server farm operations Internet (TCP/IP, HTTP, HTML, XML) Microsoft SQL Server2000

3 SQL Server History SyBase SQL 1.0 for OS/2 SQL 4.2 SQL 4.2 for NT
YUKON ( 2002년, 클러스터링 관리 )

4 SQL Server 2000 version SQL Server 2000 Enterprise Edition
SQL Server 2000 Standard Edition SQL Server 2000 Personal Edition SQL Server 2000 Developer Edition SQL Server 2000 Enterprise Evaluation Edition SQL Server 2000 Desktop Engine SQL Server 2000 Windows CE Edigion

5 SQL Server 2000 version 비교 1. Enterprise Edition과 비교해 일부 기능이 족합니다. 2. Commerce Server 2000이 필요합니다. 3. OLAP, 데이터 마이닝, 기타 데이터 웨어하우징 기능 등의 분석 서비스가 Personal Edition에 포함되 어 있지만 Windows 또는 Windows Me에는 설치할 수 없습니다.

6 SQL Server 2000 설치 하드웨어 요구사항 => CPU : Pentium 166MHz => Memory : 64MB ( 128MB권장 ) 운영체제 요구사항 => Windows NT Server 4.0 => Windows NT Enterprise 4.0 => Windows 2000 Server => Windows 2000 Advanced Server => Windows 2000 Data Center Server 하드 디스크 => 420MB ( SQL Server, AS, EQ )

7 SQL Server 2000 디자인의 주안점 완벽한 웹 사용 : 다양한 XML 및 인터넷 표준 지원 : 웹을 통한 쉽고도 안전한 데이터 액세스 : 강력하고도 융통성 있는 웹 기반의 분석 고도의 확장성 및 안정성 : 전자 상거래 솔루션을 위한 확장성(클러스터링) : Line-of-Business(LOB) 솔루션을 위한 확장성 :데이터 웨어하우징 솔루션을 위한 확장성 :사용 시간 및 안정성의 최대화

8 SQL Server 2000 디자인의 주안점 신속한 상품화 기능 제공 : 확장할 수 있으며 통합된 Analysis Services : 단순화된 관리 및 튜닝 : 향상되고 단순화된 T-SQL 개발 및 디버깅 : 확장 가능하고 융통성 있는 데이터 변환

9 SQL의 새로운 특징들 완전한 한글화 백업/ 리스토어 사용자 정의 함수/ 자료형
도구의 메뉴, Books Online한글화(F1) 백업/ 리스토어 사용자 정의 함수/ 자료형 색인 (Indexed view) / 파티션드 뷰 INSTEAD OF / AFTER TRIGGER XML지원 Cascade RI 데이터베이스별/ 컬럼별 Collation 풀 텍스트 색인 멀티 인스턴스 클러스터 서버/ 스탠바이 서버 text in row 데이터 마이닝

10 멀티 인스턴스 단일 인스턴스로 충분 그런데도 필요한 이유 클러스터링 (MS Cluster Service)
한대의 서버에서 개발/ 운영 MSData Engine에서 서로 다른 설정으로 운영될 필요가 있을 때 Hosting: 한대의 서버에 여러 회사의 SQL server를 호스팅 다중 인스턴스를 이용한 복제 가능

11 SQL Query Analyzer (1) Increased Usability / Authoring Object Browser
Multiple result sets to grid Editor enhancements Block indent, block comment out Bookmarks in editor Object Browser Drag / Drop Scripting, editing Open Table (table editor) Extended Property Editor Browser docked left or right in shell Object Search Templates and Parameter Search / Replace

12 SQL Query Analyzer (2) Integrated Statement Tracing
Basic statement, duration, CPU, I/O Complete integration of Tuning Wizard instead of Index Analysis Client Statistics (client side performance counters) Shortcut Queries Assign SP’s, XP’s, short SQL Statements to pre-defined key combinations Alt+F1, Ctrl+F1, Ctrl + 1…0 Custom commands Basic shell out like Visual Studio® 6 Command line version control integration 이게 뭐지? Custom commands Basic shell out like Visual Studio® 6 Command line version control integration

13 SQL Query Analyzer (3) Open Table with updateable grid
Need PK or Unique index on table, using server side keyset cursor Integrated T-SQL Debugger Stored procedure debugging Global, local variables, call stack Version dependent and case sensitive color coding for SQL Server 6.5, 7.0 and 2000 Manage Indexes, index distribution information

14 SQL Enterprise Manager
Made Editor dialogs resizable (SP, trigger etc.). SQL DMO footprint reduction of over 50% in memory compared to 7.0 SP1. 7x Load time improvement, due to new Unicode redirection layer, compared to 7.0 SP1. Could not remove modal dialog restrictions in SQL EM

15 Relational to XML SELECT … FOR XML Annotated Schema Templates
FOR XML RAW (return an XML rowset) FOR XML AUTO (exploit RI, name matching, etc.) FOR XML EXPLICIT (maximal control) Annotated Schema Mapping between XML and relational schema expressed in XML Templates Encapsulated parameterized query XSL/T support XPATH support Direct URL access (SQL “owned” virtual root) Annotated schema

16 XML Example Result set:
Result set: <Customers ContactTitle="Sales Agent" /> <Customers ContactTitle="Sales Associate" /> <Customers ContactTitle="Sales Manager" /> <Customers ContactTitle="Sales Representative" />

17 사용자 정의 함수 CREATE FUNCTION CubicVolume
-- Input dimensions in centimeters. decimal(4,1), @CubeHeight decimal(4,1) ) RETURNS decimal(12,3) -- Cubic Centimeters. AS BEGIN RETURN ) END

18 User-Defined Functions (UDFs)
Multi-statement T-SQL routines callable from query Strongly typed input arguments, return value No output parameters ( sp ) Could be scalar- or table-valued Can be created as schema-bound: Prevents ALTERing dependent objects

19 Scalar UDFs: Example CREATE FUNCTION varchar(100), @part tinyint) RETURNS varchar(30) BEGIN tinyint = charindex(' = 1 return ELSE = 2 RETURN NULL END

20 Table-Valued UDFs (Inline)
Single statement of the form RETURN (<select-stmt>) Advantage: integrated optimization in calling query Example CREATE FUNCTION varchar(30)) RETURNS TABLE AS RETURN (SELECT title, qty FROM sales s, titles t WHERE s.stor_id and t.title_id = s.title_id)

21 Table-Valued Udfs: Multi-Statement Example
CREATE FUNCTION varchar(30)) TABLE(title varchar(30), qty int) AS BEGIN SELECT title, qty FROM sales s, titles t WHERE s.stor_id and t.title_id = s.title_id RETURN END

22 자료형 bigInt table sql_variant CREATE TABLE AAA ( id int identity
, c1 sql_variant null ) GO INSERT AAA VALUES ('a') INSERT AAA VALUES (1) INSERT AAA VALUES (getdate())

23 색인 (Indexed view) Use pubs create view abcv with schemabinding as
select title_id , price from dbo.titles go CREATE UNIQUE CLUSTERED INDEX idx ON abcv (title_id) Go sp_helpindex abcv

24 계산된 열의 Index CREATE TABLE ABC ( c1 int , c2 int , c3 as (c1 * c2) )
insert ABC values (2, 3) go create index idx on ABC (c3)

25 파티션드 뷰 CREATE TABLE SUPPLY1 (
supplyID INT PRIMARY KEY CHECK (supplyID BETWEEN 1 and 150), supplier CHAR(50) ) ….. CREATE TABLE SUPPLY4 ( supplyID INT PRIMARY KEY CHECK (supplyID BETWEEN 451 and 600),

26 파티션드 뷰 CREATE VIEW all_supplier_view AS SELECT * FROM SUPPLY1
UNION ALL SELECT * FROM SUPPLY2 SELECT * FROM SUPPLY3 SELECT * FROM SUPPLY4

27 INSTEAD OF / AFTER TRIGGER
CREATE TRIGGER trigger_name ON { table | view } [ WITH ENCRYPTION ] {     { { FOR | AFTER | INSTEAD OF }         { [ DELETE ] [ , ] [ INSERT ] [ , ] [ UPDATE ] }         [ WITH APPEND ]         [ NOT FOR REPLICATION ]         AS         sql_statement [ ...n ]     } ….

28 INSTEAD OF Trigger Example
Non-updateable view CREATE VIEW AuthorsView AS SELECT au_fname+ ' ' + au_lname as au_name, au_id, phone, address, city, state, zip, contract FROM authors

29 INSTEAD OF Trigger Example
CREATE TRIGGER AuIns on AuthorsView INSTEAD OF INSERT AS BEGIN INSERT authors(au_id,au_fname,au_lname,…) SELECT au_id, dbo.ExtractNamePart(au_name, 1), dbo.ExtractNamePart(au_name, 2), phone, address, city, state, zip, contract FROM inserted END INSERT AuthorsView VALUES(‘John Doe’, …)

30 Cascade RI < column_constraint > ::= [ CONSTRAINT constraint_name ] | [ [ FOREIGN KEY ] REFERENCES ref_table [(ref_column ) ] [ON DELETE { CASCADE | NO ACTION } ] [ON UPDATE { CASCADE | NO ACTION } ] ….

31 Cascade RI example CREATE TABLE 부서 ( 부서코드 char(2) primary key
, 부서명 char(10) not null ) GO CREATE TABLE 사원 사번 int primary key , 이름 char(10) not null , 부서코드 char(2) FOREIGN KEY REFERENCES 부서 (부서코드) ON UPDATE CASCADE ON DELETE NO ACTION

32 데이터베이스별/ 컬럼별 Collation
Setup 시의 collation 이 default SELECT * FROM product ORDER BY productNameHebrew COLLATE Hebrew_BIN

33 In-Row Text Page 11 ID Comment 12345 ‘OK’
UPDATE Comments SET COMMENT = ‘Well, not so bad but…’ WHERE ID = 12345 Page 11 ID Comment 12345 <root ptr> Page 33 ‘Well, not so bad but…’

34 Top ‘N’ Sort Efficient Engine to process queries of the form:
SELECT TOP 5 * FROM ORDERS ORDER BY ORDER_ID DESC SQL Server 7.0 SQL Server 2000 Top ‘n’ Engine Full Sort

35 백업/ 리스토어 Primary File 장애 시에도 backup log .. with NO_TRUNCATE 가능
세 가지 Recovery Mode FULL Recovery Model SIMPLE Recovery Model BULK LOGGED Recovery Model SHIRINK LOG

36 Setting The Recovery Model
Example ALTER DATABASE sales SET RECOVERY FULL The default recovery model is… SIMPLE for SQL Server 2000 Desktop Edition and Desktop Engine FULL for SQL Server 2000 Standard and Enterprise Editions To change the default, alter the Model database

37 Available Backup Types For Each Model
Database Database Differential Log File File Differential Full Required (or file backups) Optional Bulk_logged Simple Not Allowed

38 Changing Recovery Model
From To  Full Bulk_Logged Simple No change Database backup after change No Change Last log backup just prior to change Bulk Logged  FULL: Recovery to point-in-time is enabled by the next log backup. FULL BULK_LOGGED doesn’t break automated backup procedures Transitions to and from SIMPLE require more care but are uncommon

39 Log Backups In Bulk_Logged Mode
Log backup contains extents modified by bulk logged operations since last log backup Avoids breaking the log chain Eliminates need for special full backup Minimal impact on automated backups Transaction Log Log Backup Data Extents Extent modified by bulk logged operation

40 Partial Database Restore
Recovery from operator or application error Dropped table Incorrect update Restores a subset of the filegroups Backup of Database A Database B Partial Restore Merge or replace damaged data Database A

41 Snapshot Backup/Restore
Equivalent to full database or file backup Roll forward using regular differential and log backups History maintained in MSDB Third party VDI* application with storage system support (split mirror or copy-on-write) Tape Library 3-way Mirror Split Mirror Backup / Passive Production Storage * Virtual Device Interface for Backup

42 Snapshot Benefits Very fast restore
From mirror in seconds Longer from tape Backup with the minimum possible impact on production server Very fast backup Create reporting or test database Initialize warm standby

43 Log Shipping – what is it?
Have a standby server waiting in the event the primary server becomes unavailable Backup primary server, restore database to secondary server Apply transaction log backups from primary server to the secondary server on a schedule Typically from 1 to 15 minute interval “Log Shipping” automates this process for you

44 Automated Log Shipping
Easy setup via Maintenance Plan Easy administration via Monitor Tracks status Facilitates role change Reachable from remote Enterprise Manager Flexible Primary Secondary Monitor Secondary

45 Log Shipping With Snapshot
Create database on standby with snapshot backup/restore Set up log shipping Log backups are copied via network or mirror split Primary Secondary Split Mirror

46 Log Shipping With Replication
Replication fails over automatically Standby Primary Primary Standby Failover WLBS? If use WLBS, need sep NIC for log shipping? Distributor WLBS Distributor WLBS Subscribers Subscribers

47 데이터 마이닝 Deducing knowledge by examining data
“knowledge”: Patterns, Clusters, Rules, Decision trees, Neural networks, Equations, Association rules… “examining data” – scanning samples of known facts about “cases”. Once the “knowledge” is extracted it: Can be browsed Provides a very useful insight on the cases behavior Can be used to predict values of other cases Can serve as a key element in closed loop analysis

48 What drive high school students to attend college?

49 The deciding factors for high school students to attend college are…
All Students Attend College: 55% Yes 45% No Attend College: 79% Yes 21% No IQ=High 45% Yes 55% No IQ=Low IQ ? Attend College: 94% Yes 6% No Wealth = True 79% Yes 21% No Wealth = False Wealth Attend College: 70% Yes 30% No 31% Yes 69% No Parents Encourage = No Encourage =Yes Parents Encourage?

50 Clusters Annual Income Age

51 EM Algorithm Each case belongs to each cluster by some weight (probability of membership) No “harsh” boundaries between K clusters (bins) Compute new means (parameters in general) based on weighted computation cycle until convergence

52 EM Algorithm (Gaussians)
X X X

53 Creating the DM Model Approach 1: Approach 2:
Wait until a sufficient number of customers rented the movie Build a DM model predicting rental Target other customers that are likely to rent based on this model Approach 2: Use the movie attributes to predict who might like it Cluster the customers Find clusters that fit the profile and target their customers Target advertising for new products at existing customers. Describe needed model. Given a new movie, we know its genre, director, age, and actors Cluster customers into 20 or so groups. Input to model is NO customer demographics, average movie age, list of movie genres, list of stars, list of directors, etc. Nothing about specific movies. Use olap manager to build this model Explain nested tables Save some of the explanations for this long pause … ? Browse the model and point out some interesting clusters. ? Write simple VB app to: Input variables for a new movie. Connect to msolap Issue singleton predict query to get cluster number of new movie Issue join to training data to get list of customers in that cluster. Send this list somewhere ? like to the debug window

54 Insight Analysis Op. Sys Reports & Analysis DM OLTP DW OLAP


Download ppt "SQL Server 2000 Preview 김연홍 k3701@hitel.net 한국 HP / Microsoft."

Similar presentations


Ads by Google