1. Trang chủ
  2. » Công Nghệ Thông Tin

Microsoft SQL Server 2005 Express Edition for Dummies phần 10 ppsx

33 397 0

Đ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

Định dạng
Số trang 33
Dung lượng 743,86 KB

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

Nội dung

assembly: Application logic that is stored in, and managed by, the SQL Server 2005 Express database server, including objects such as triggers, CLR soft-ware, and stored procedures.. che

Trang 1

1 Launch the Windows Control Panel and then choose Administrative Tools➪ODBC.

2 In the ODBC Data Source Administrator dialog box, click either the User DSN or System DSN tab.

Selecting the System DSN tab is generally a good idea; your data source

is then visible to other users on your computer

3 From the list of drivers, pick either the SQL Native Client or the SQL Server driver.

The SQL Native Client is the more current connectivity driver, so I ommend that you select this option

rec-4 Enter the name and description of your connection, pick the server, and click Next.

5 Choose the authentication method you want, and click Next.

6 Choose your default database and click Next.

7 Fill in the final settings, and click Finish.

8 Test your new ODBC connection.

The SQL Native Client offers a very useful feature to help validate thatyour connection was set up correctly Just click the Test Data Sourcebutton (shown in Figure B-8) to launch this verification utility Figure B-9show a successful connection

With these last steps out of the way, you can now confidently start using yourSQL Server 2005 Express database

Figure B-8:

Summary

of ODBCsettings

362 Part VIII: Appendixes

Trang 2

Figure B-9:

A cessfulconnection

suc-363

Appendix B: Migrating to SQL Server 2005 Express

Trang 3

364 Part VIII: Appendixes

Trang 4

Appendix C Glossary

Advanced Services: A more capable version of SQL Server 2005 Express.

While this edition maintains its sibling’s free price point, it includes someadvanced technologies such as full-text searching and reporting services

article: A database object (such as a table, stored procedure, or view) that is

contained within a publication See also replication.

assembly: Application logic that is stored in, and managed by, the SQL Server

2005 Express database server, including objects such as triggers, CLR

soft-ware, and stored procedures See also Common Language Runtime (CLR).

attribute: Information, contained in the form of name-value pairs, located

after the start tag of an XML element See also element; content.

backup: The process of copying your database’s information to another form

of media, such as tape or disk A good backup strategy is vital for any

produc-tion SQL Server 2005 Express environment See also full backup; full

differ-ential backup.

backup device: A hardware unit that hosts the media for your database

back-ups You configure your backup to work with this object These devices are

typically disk or tape drives See also backup.

Business Intelligence Development Studio: Found in the SQL Server toolkit,

this environment makes it easy to create and deploy useful reports See also

reporting services.

checkpoint: Like any modern relational database management system, SQL

Server 2005 Express performs much of its work within high-performancememory However, to make any data alterations permanent, eventually memorymust preserve data onto disk drives The checkpoint process is how the data-base server accomplishes this synchronization

column: Stored within tables, a column contains a particular piece of

infor-mation For example, if you’re tracking details about a customer, you likelyplace this data in a table Within the table, you have columns to monitor

things such as name, address, and so on See also table.

Trang 5

Common Language Runtime (CLR): When building a database application,

many developers choose to use SQL Server’s internal language, SQL However, other programming languages (such as Visual Basic, Visual C#,and so on) offer better performance and functionality for certain tasks, such

Transact-as parsing a string or solving sophisticated mathematical computations, thanTransact-SQL CLR is a Microsoft software development and integration tech-nology that allows you to build software and store it within SQL Server 2005Express using one of these other languages In most cases, however, usingTransact-SQL will be the right choice

composite index: This index is made up of two or more columns See also

column.

content: All information contained between the start and end tag of an XML

element See also element; attribute.

database server: A sophisticated software product that hosts a broad range

of data, making it available for many concurrent clients SQL Server 2005Express is one example of a database server Other vendors, such as Oracleand IBM, offer their versions of this type of product

distributor: A central database server that acts as an administrator and

coor-dinator for replication See also replication.

Document Type Definition (DTD): A specification that describes the

struc-ture and format of an XML document Generally included at the top of theXML document, it helps people and applications better understand and work

with the XML-based information See also XML.

element: Surrounded by a start and end tag, this XML-based information may

also include attributes and content Elements may contain other nested, child

elements See also attribute; content.

file backup: A type of backup relevant only when there are multiple filegroups.

See also filegroup.

filegroup: Collections of SQL Server 2005 Express data files For performance

and administrative reasons, you can place user objects into their own,

dedi-cated filegroups See also master data file (MDF); file backup.

first normal form: One of the three normal forms that make up relational

database guidelines, this rule states that a table should not have any repeating

fields See also normalization; second normal form; third normal form.

foreign key: Information that establishes a relationship between two or more

tables By preventing erroneous data modifications, this association helps

preserve data integrity See also primary key.

366 Part VIII: Appendixes

Trang 6

full backup: As its name implies, this type of backup archives all information

within a database Should the database be lost or damaged, you can restore it

to its state as of the time you created the full backup See also full

differen-tial backup; pardifferen-tial backup; restore.

full differential backup: Identical to a full backup, with one major difference:

A full differential backup archives only information that has changed sincethe last full backup This backup can be very handy if only small portions ofyour database change on a regular basis; by running differential backups youdon’t need to incur the time and media costs of full backups See also

backup; full backup.

full text catalog: The file system-based object that holds the contents of all

full-text indexes

full-text search: The ability, present in SQL Server 2005 Express with

Advanced Services, to quickly and efficiently search large quantities of based information

text-function: A centralized, server-based routine that can be included as part of

your Transact-SQL statements Typically used to streamline logic and reducethe amount of required programming effort, you can build your own func-tions You can also take advantage of the many built-in functions offered bySQL Server Express 2005 One difference between functions and stored proce-dures is that the former must return a value; it’s optional with the latter See

also stored procedure.

index: An internal database structure, sometimes defined by the database

administrator, and sometimes automatically created by SQL Server 2005Express Indexes enable speedy access to information, as well as perform

integrity and other validations to safeguard data See also unique index;

composite index.

isolation level: A configurable setting that affects how a transaction interacts

with other SQL Server Express users and processes Increasingly stringentisolation levels are

Repeatable read

These isolation levels interact with your application, allowing or denying

visi-bility to modified data depending on the setting See also transactions.

367

Appendix C: Glossary

Trang 7

log file: A file system–based, internal database construct that records data

and table modifications, and restores information to its previous state shouldthe application rollback a transaction

logical design: The abstract design and structure of your relational database.

Focusing on the high-level objects, and their interrelationships, this design isusually generated during the analysis phase of most projects It then serves

as a guideline for creating the actual implementation of your SQL Server 2005

Express database See also physical design.

master data file (MDF): SQL Server 2005 Express databases contain two

types of operating system files: MDF and log files This class of file stores

data, and is dedicated to one-and-only-one database See also log file;

filegroup.

named pipes: A communication method between two processes In the

con-text of SQL Server 2005 Express, this is a means for a database client to

com-municate with the database server See also protocol.

namespace: A collection of element and attribute names designed to reduce

confusion and ambiguity when dealing with database objects as well as XML

documents See also XML.

normalization: A series of database design recommendations that dictate

how information should be dispersed among tables, as well as how these

tables should relate See also first normal form; second normal form; and

third normal form.

optimizer: The optimizer is an internal technology that is responsible for

selecting the most efficient means to accessing or altering information Ituses detailed statistics about the database to make the right decision

partial backup: An operation that archives a subset of your database,

including

Data from the primary filegroupAny requested read-only filesAll read-write filegroups

See also partial differential backup; full backup; full differential backup.

partial differential backup: Archives only those portions of the last partial

backup that have changed since the partial backup was completed See also

partial backup; full backup; full differential backup.

368 Part VIII: Appendixes

Trang 8

permission: A privilege that you grant to a principle After it’s authorized, the

principle may then interact with one or more securables See also principal;

securable.

physical design: The actual tables, columns, indexes, and other data

struc-tures used to store information in a SQL Server 2005 Express database

Development projects typically progress from a logical database design to a

physical database design See also logical design.

primary key: This column, or group of columns, provides a unique definition

for a given row By definition, no two rows in the same table can have the

same primary key value See also foreign key.

principal: Any user or process that you can authorize to interact with your

SQL Server 2005 Express database See also securable.

procedural language: A general-purpose programming language containing

full logic and flow control capabilities Typically compiled to binary code,these languages can usually handle more complex algorithms at higher per-formance than interpreted database-centric languages such as Transact-SQL

See also Common Language Runtime (CLR).

protocol: To communicate effectively, client applications and database

servers need a commonly agreed-upon approach A protocol is a tion standard adhered to by both parties that makes these conversations

communica-possible See also TCP/IP; named pipes.

publication: A single unit containing one to many articles, available for

repli-cation to other database servers See also replirepli-cation.

publish-and-subscribe: An architecture that allows easy interchange of

infor-mation among distributed computers and processes Data may be pushed by

a publisher, or pulled by a subscriber See also replication.

publisher: A specific database server that offers information to other

data-bases using replication technology See also replication.

record: A grouping of information typically returned from a query or other

database operation It may consist of data from only one table, or it may be

an aggregation of information dispersed among many tables See also row.

recovery model: A preset plan used by SQL Server 2005 Express when

archiving and restoring information See also backup; restore.

369

Appendix C: Glossary

Trang 9

referential integrity: A set of rules enforced by the database server, the

user’s application, or both that protects the quality and consistency of mation stored in the database

infor-replication: A process whereby information is published from a database

server and sent to one or more subscribers Data may be transferred tively by the publisher, or may be requested by the subscribers See also

proac-publish-and-subscribe.

reporting services: The collection of technologies, found in SQL Server 2005

Express with Advanced Services, that make it easy to design, develop, and

deploy reports for users regardless of their location See also Business

Intelligence Development Studio.

restore: The process of reinstating archived information onto your database

server See also backup; recovery model.

row: An individual entry from a given table For example, a table may contain

details about thousands of customers; a specific customer’s data is in one

row See also record.

schema: A group of database objects that make up a given namespace.

Objects include tables, views, and statements that grant or revoke access toother securable objects No two objects in any namespace may have thesame name

second normal form: Data is said to be in the second normal form if it

com-plies with the first normal form, as well as having one or more columns in a

table that uniquely identify each row See also first normal form; third

normal form.

securable: This represents any type of object that can be given its own

secu-rity setting Some examples of securables include tables, views, and users

See also principal.

SQL Server Management Studio Express: Provided by Microsoft, this

graphi-cal tool lets you perform common database administration tasks as well asrun direct Transact-SQL statements

stored procedure: Centralized, server-based application code Typically used

to standardize business logic and reduce the amount of required ming effort, you can build your own stored procedures, or leverage the manybuilt-in stored procedures offered by SQL Server 2005 Express One differ-ence between stored procedures and functions is that the latter must return

program-a vprogram-alue; it’s optionprogram-al with the former See program-also Common Lprogram-anguprogram-age Runtime

(CLR); functions.

370 Part VIII: Appendixes

Trang 10

Structured Query Language (SQL): Originally developed by IBM, this

standards-based language allows access to information stored in a relational

database See also Transact-SQL.

subqueries: A nested query that returns information to an outer query,

thereby helping the outer query correctly identify results

subscriber: A database server that collects replicated, published information

sent by one or more publishers See also replication.

subscription: An appeal, sent to a publisher, requesting a publication to be

sent via replication See also replication.

table: These contain logical groupings of information about a given topic For

example, if you’re interested in students and their grades, your applicationwould have at least two tables: One to track details about students, and one

to monitor their test scores See also column.

TCP/IP: An abbreviation for Transmission Control Protocol/Internet Protocol, this

standard protocol makes up the foundation of most computer-to-computercommunication across the Internet as well as on local networks

third normal form: Table data that complies with both the first and second

normal forms, and also directly relates to each rows primary key See also

first normal form; second normal form.

transactions: To prevent data corruption or other inconsistent results,

developers use transactions to logically group sets of related database accessstatements into one work unit If something goes wrong during the processing

of these statements, it’s easy to rollback, or cancel, the transaction so that

none of the changes take place On the other hand, if everything completesnormally, the transaction ensures that all the alterations are made at thesame time

Transact-SQL: Microsoft’s implementation of SQL It includes a number of

enhancements that make it easier to develop powerful database applications

These additions include conditional logic, variables, and error-handling logic

See also Structured Query Language (SQL).

trigger: Stored in and managed by your database server, this software

exe-cutes when a certain event occurs These events can range from informationcreation or modification to structural changes to your database After theevent occurs, the trigger executes, causing a predetermined set of actions totake place These actions can encompass data validation, alerts, warnings,and other administrative operations Triggers can invoke other triggers and

stored procedures See also stored procedure.

371

Appendix C: Glossary

Trang 11

unique index: Sometimes created explicitly by the user, and sometimes

cre-ated automatically by the database server, by guaranteeing one-and-only-onevalue for a given table, this structure speeds access to information as well as

preserves data integrity See also index.

view: A virtual grouping of one or more tables, often done to reduce

complex-ity while increasing securcomplex-ity and reliabilcomplex-ity An administrator defines the view,which is then available for developers and users to access instead of workingwith the underlying tables

Visual Studio: Microsoft’s flagship development environment, supporting a

wide variety of programming languages with a full set of professional features

and capabilities for the modern software developer See also Visual Studio

Express.

Visual Studio Express: An easy-to-learn, integrated collection of software

development and data management tools provided by Microsoft These toolsare aimed at entry-level developers, students, and hobbyists

XML: A standards-based, structured way of representing and working with

information in easily readable text files Consisting of nested elements thatcontain content and attributes, XML has become the de facto standard fortransmitting data among disparate systems SQL Server 2005 Express sup-

ports storing and working with XML data See also element; attribute;

content

XQuery: Designed to interrogate XML-based data, this standards-based

query language also has some programming capabilities See also XML.

372 Part VIII: Appendixes

Trang 12

Appendix D About the CD-ROM

In Chapter 2, I describe several different ways that you can obtain andinstall your own copy of the SQL Server 2005 Express software One of theeasiest methods is simply to install the product from the CD that comes withthis book

System Requirements

Make sure your computer meets the minimum system requirements listed Ifyour computer doesn’t match most of these requirements, you may haveproblems installing or running the contents of the CD:

⻬ A PC with a 600 MHZ Pentium III or faster processor

⻬ Any of the following Windows operating systems:

• Windows Server 2003 with SP1

• Windows Small Business Server 2003 with SP1

• Windows XP Home Edition with SP2 or later

• Windows XP Media Center Edition with SP2 or later

• Windows XP Professional Edition with SP2 or later

• Windows XP Tablet PC Edition with SP2 or later

• Windows 2000 Advanced Server with SP4

• Windows 2000 Professional Edition with SP4 or later

• Windows 2000 Server with SP4 or later

⻬ The Microsoft NET Framework 2.0

⻬ At least 192MB of total RAM installed on your computer 512MB of RAM

is recommended

Trang 13

⻬ At least 500MB of available disk space If you’re storing a lot of tion in your database, you need more disk space.

informa-⻬ Administrative privileges on the computer If you have insufficient mission, Windows blocks any software installation

per-⻬ A CD-ROM drive

If you need more information on the basics, check out PCs For Dummies, by Dan Gookin; or any of the Windows For Dummies titles by Andy Rathbone (all

published by Wiley Publishing, Inc.)

What You’ll Find

The CD contains a free, fully functional copy of Microsoft SQL Server 2005Express Edition with Advanced Services, including a series of associated programs and utilities listed here:

⻬ The database server and all supporting files

⻬ The character-based SQLCMD utility, through which you can directlyenter SQL to work with your database

⻬ The bcp utility, which you use to interchange information between SQLServer 2005 Express and other applications

⻬ The SQL Server Configuration Manager, which helps you construct andtune your environment

⻬ The SQL Server Surface Area Configuration tool, which lets tors enable or disable protocols, services, and features This can helpimprove security

administra-⻬ SQL Server Management Studio Express Edition, an easy-to-use yet erful database administration application

pow-You can use this database platform alone, or in combination with populardevelopment tools from Microsoft and other vendors You can even use it as aninformation repository for office productivity software such as Microsoft Excel,PowerPoint, and other data analysis and business intelligence technologies

374 Part VIII: Appendixes

Trang 14

If You Have Problems (Of the CD Kind)

SQL Server 2005 Express installed for me with no problems I’ve tested all thescripts and application code Alas, your computer may differ, and some pro-grams may not install correctly or work properly for some reason

The three most likely problems are that you don’t have administrative leges, don’t have enough memory (RAM) for the programs you want to use,

privi-or you have other applications running that are affecting installation privi-or ning of a program If you get error messages like Not enough memory orSetup cannot continue, try one or more of these methods and then tryusing the software again:

run-⻬ Turn off any antivirus software that you have on your computer.

Installers sometimes mimic virus activity and may make your computerincorrectly believe that virus is infecting it

⻬ Close all running programs The more programs you’re running, the

less memory is available to other programs Installers also typicallyupdate files and programs So if you keep other programs running,installation may not work properly

⻬ Add more RAM to your computer This is, admittedly, a drastic and

somewhat expensive step However, if you’re running any of theWindows operating systems I listed earlier in this chapter, adding morememory can really help the speed of your computer and allow more pro-grams to run at the same time

375

Appendix D: About the CD-ROM

Trang 15

376 Part VIII: Appendixes

Trang 16

• A •

Access (Microsoft)accessing database using, 128migrating from, 355–359ACID test, 194–195

actions triggered by events See triggers

ad-hoc remote queries, enabling, 38administration

automated, 346features for, 13, 20–22, 58–60, 339with SQL Server Management StudioExpress, 60, 67–68, 339

with SQLCMD, 59, 339third-party tools for, 60administrators, 183Advanced Services edition, 263–267ALTER DATABASEcommand, 206ALTER TABLEstatement, 117–118analysis services, 14, 57, 346antivirus software, 375application developers, 182application development platforms, 130application power users, 182

application users, 182applications

adding, effect on database size, 56desktop, creating, 290–298desktop, customizing, 298–300desktop, debugging, 301desktop, packaging and shipping, 301–302error handling for, 256–257

features for, 19–20performance of, 82, 342processes used by, controlling, 73stability of, 252

Web, database for, 306–310Web, user interface for, 311–315Web, Web site for, 304–306

archives See backups

articles, 86, 365

assembly, 242, 365atomicity of transaction, 195attributes, XML, 96, 319, 365authentication mode, specifying, 30, 186AUTOdirective, 329

autogrowth feature, 61automated server administration, 346automatic performance tuning, 12AVG()function, 141

• B •

backup devices, 365backups

best practices for, 206–207definition of, 365

exporting data as, 210features for, 15full backups, 207, 367full differential backups, 207, 367limitations of, 346

partial backups, 207, 368partial differential backups, 207, 368performing, 208–209

recovery models for, 15, 205–206, 369replication for, 84

restoring, 15, 207, 210–212, 370strategy for, 204–205

bcputility, 135–136, 210BEGIN TRANSACTIONstatement, 198, 202bigintdata type, 94

binarydata type, 94bitdata type, 94blogs, 336

books See publications (resources)

Boolean searches, 139buffer cache, 203built-in functions, SQL, 140–141BULK INSERTstatement, 134–136bulkadminserver role, 180bulk-logged recovery model, 205–206

Index

Ngày đăng: 08/08/2014, 22:20

TỪ KHÓA LIÊN QUAN

w