|
SQL Servers upgrade from 6.5 to 7.0
Step-by-step manual and checklist
Phase 1. Preparing the
upgrade
- Required Windows NT 4.0 SP4
- IE 4.01 SP1
- SQL Server 6.5 SP3
- Required hard drive space = (size
of 6.5’s databases) * 1.5 + 170 Mbytes (except
“tape” method of upgrade)
- Old 6.5 and new 7.0 instances of
SQL Server must be running under user (non-system) account,
under the same in ideal.
- Tempdb must be at least 10MB size
(25MB strongly recommended)
- @@SERVERNAME must be not NULL (just
check)
- master database must have at least
3MB of free space
- Ensure that no encrypted or renamed
objects in databases (very attractive perspective!)
- Ensure that no
“orphaned” users in DB (which not associated
with any logins)
- Ensure that no mission-critical
stored procs, which operate with systables directly (they
won’t be updated)
- Ensure that “open
databases” parameter is large enough for actual number
of databases
- Ensure that no read-only databases
- List all backup-related tasks in
msdb
- Run DBCC CHECKDB, DBCC
CHECKCATALOG, DBCC NEWALLOC, DBCC TEXTALL
- Backup master, msdb, model and
users’ databases
- Make inactive all startup
procedures (sp_helpstartup)
- Run sp_helpsort to determine sort
order and charset in old installation
- Stop MSSQL, MSDTC and SQLExecutive
and backup *.dat files in mssql\data
- Increase disk space by deleting
*.rpt, *.bcp, *.dmp etc files from mssql\log
- Refresh ERD if needed.
Phase 2. Processing
upgrade
- Run SQL Server 7.0 setup with the same sort order and charset.
- Run SQL Server Upgrade Wizard as a
last step of setup process
- Suppose Wizard completed
successfully ;-)
- Recreate backup devices and startup
parameters (trace flags’ recovery is impossible, I
believe)
- “Switch” to 7.0
- Apply SQL 7.0 SPLast
- Test user db applications
Phase 3. Upgrading database
applications
This step may be performed after start of using user databases under 7.0 (In reality they will be in 7.0 format, but in 6.5 compatibility mode). Below the most possible TSQL conflicts between 6.5 and 7.0
- UPDATE works in 6.5 with
“mix” of aliases and real table names, SQL 7.0
doesn’t
- 6.5 allows compatible datatypes for
foreign key columns (e.g. char-varchar), 7.0 doesn’t
- Deferred name resolution: 6.5
requires tables and views are in place when compile
dependent views and sp, 7.0 doesn’t (VB 1.0 in
action!).
- Old-style joins *= and =* still
supported, but time is coming … They are not in ANSI
standard
- Optimizer hints! (optimizer 100%
changed in 7.0)
- Subsequent runs of the same query
in 7.0 may return the same rows in different orders, 6.5
doesn’t
- 7.0 has forced NULL behavior to
ANSI_NULLS ON, 6.5 (guess what?), of course, OFF
- NULL values in aggregates now
issues warning, which may be treated as error by client apps
(by stupid Access clients, for example. 99% Access
applications I saw before were stupid. Rest 1% were my own
apps)
- Implicit truncation of strings no
longer allowed, even in “65” compatibility mode!
(it’s certainly a new definition of term
“compatibility” from MS)
- In 6.5, if INSERT caused arithmetic
overflow, error message was issued, but row (with NULL) was
inserted. In 7.0 message the same, but no rows inserted.
- 7.0 can operate with empty
(‘’) strings, in 6.5 they treated as ‘
‘ or NULL, depends of moon phase. E.g. in 6.5:
DATALENGTH(‘’)=1, RTRIM(‘ ’)=NULL.
In 7.0, DATALENGTH(‘’)=0, RTRIM(‘
’)=’’
- @@DBTS now updated only after
modification of timestamp column, not after any row
- Good number for resume: Forget the compatibility! It’s a fiction.
Phase 4. Finalizing
upgrade
- Set compatibility level for all
databases in 7.0 mode (sp_dbcmptlevel db_name,70)
- Test db applications
|