您的位置:首页 > 数据库

MS-SQL2005 Key Points List

2008-09-19 15:52 169 查看
1. Open Adanced options

--show advanced options

sp_configure 'show advanced options',1

go

--Enable create ole auotmation

sp_configure 'Ole Automation Procedures',1

reconfigure with override

Go

--Enable extend stored procedure xp_cmdshell

sp_configure 'xp_cmdshell',1

reconfigure with override

Go

--Enable AWE model.Use over 4GB memory

sp_configure 'awe enabled',1

reconfigure with override

Go

--Enable distributed query/transaction in AD HOC query like opendatasource/operquery

sp_configure 'Ad Hoc Distributed Queries',1

reconfigure with override

Go

2 Compatibility Level

--To use new characteristic of SQL Server2005, must set db compatibility 90

sp_dbcmptlevel dbname,90

go

Most T-SQL syntax is compatible with SQL Server2000. '=*' and '*=' have been abandoned in SQL Server 2005. Pleas use 'outer join' to take the p了ace of them.

DTS package probably encounter compatibility issue for MS has rewritten SSIS to take the place of it.

3. Transaction Isolation Level

--In SQL Server2005 there are two new kinds of Transaction isolation: read committed snapshot (it seems to be cut in RTM version) and snapshot. The two transaction isolation will improve SQL Server performance in simultaneous business greatly.

--To use new transaction isolation please perform the T-SQL statement as below

alter database db set allow_snapshot_isolation on --set off to disable the new transaction isolation

alter database db set read_committed_snapshot on --set off to disable the new transaction isolation

--Change current connection transaction isolation level. Read committed is default in SQL Server

set transaction isolation level read uncommitted/read committed/repeatable read/snapshot/serializable

4. Linked Server Issue between SQL Server2005 and SQL Server 2000

Please find file "Instcat.sql" in SQL Server2000 sp3 or sp4 installation files and copy its content to SQL Query Analyzer(2000),just run the script!

5. About Distributed Transaction

If source server and destination server can not recognize their hostname each other please add something in their "hosts" files (I have mentioned this issue before). So if you change server hostname please do not forget to modify related "hosts" files.

6. New enhanced T-SQL characteristic please refer to BOL of SQL Server2005

7. About installation / update sp of SQL Server2005

Note, please choose the right collation (FA/SMT/QSMS mostly SQL_Latin1_General_CP850_CI_AS, RMA SQL_Latin1_General_CP850_CI_AI) when you start to install SQL Server2005. It will take long time to install SQL Server2005, please be patient. Generally after installation completed you have to install SQL Server sp for twice.

8. About Database transferring

a. Restore database from backup files and when restoring completed the database will be update to SQL Server2005 version automatically.

b. Attach database from .MDF and .LDF files directly and the database will be update to SQL Server2005 version automatically, too.

c. SQL litespeed 3.0 (we use now) can be use in SQL Server2005. It is the better to know how to use SQL litespeed.

SQL litespped: ""172.26.8.1"d$"Share"QMS_software"SQL LiteSpeed"

d. Note, database backup files of SQL Server2005 can not be used in SQL Server2000 for version conflict.

e. Re-Mapping database user to new SQL Server2005 user. This means the previous database access right can be inherited by new user on SQL Server2005

--for example, re-mapping previous database user "MIS" access right to new created user "MIS" on SQL Server2005.

Use db

Go

sp_change_users_login 'Update_One','MIS','MIS'

f. To transfer previous jobs on SQL Server2000 to SQL Server2005 please use 'Create script' function shipped in SQL Server2000.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: