home *** CD-ROM | disk | FTP | other *** search
/ PC Plus SuperCD 4 / SuperCD_4.iso / server / servpak1.65 / fixlist.txt < prev    next >
Text File  |  1996-07-29  |  46KB  |  1,310 lines

  1. MICROSOFT SQL SERVER 6.5 SERVICE PACK 1 FIXLIST
  2.  
  3. ---------------------------------------------------------------------
  4. The information in this article applies to:
  5.  
  6.  - Microsoft SQL Server, version 6.5 Service Pack 1
  7. ---------------------------------------------------------------------
  8.  
  9. The following is a list of fixes and other various improvements that have
  10. been made in the Microsoft SQL Server version 6.5 Service Pack 1, which is 
  11. now available from your primary support provider. For more
  12. information, contact your primary support provider.
  13.  
  14. Please note that workarounds described have been provided for your
  15. information only. It is not necessary to implement these workarounds if
  16. you have the updated software.
  17.  
  18. ============================================
  19. LIST OF PROBLEMS CORRECTED IN SERVICE PACK 1
  20. ============================================
  21.  
  22. DB-LIBRARY COMPONENTS
  23. ---------------------
  24.  
  25. Q151301: FIX: dbcursorfetchex() Can Cause Blocking in DB-Library
  26.  
  27.  
  28. ODBC COMPONENTS
  29. ---------------
  30.  
  31. Q153694: FIX: SQLNumResultCols Fails with Incorrect Syntax Near 'SET'
  32. Q153908: FIX: 16-bit Driver Times Out on Async Calls to SQLTables
  33.  
  34. SERVER COMPONENTS
  35. -----------------
  36.  
  37. Q149938: FIX: AV on INSERT of UNIONed SELECTs to Table With DEFAULTs
  38. Q149939: FIX: ROLLBACK of TRUNCATE TABLE May Cause Error 3301, AV
  39. Q150775: FIX: CREATE TABLE in Stored Procedure May Fail With Error 1750
  40. Q150894: FIX: LOAD TRAN May Fail With Handled AV
  41. Q150896: FIX: SH_PAGE Locks May Be Held on Inner Tables of JOINs
  42. Q150897: FIX: LOAD TRAN May Fail With Error 1511
  43. Q150900: FIX: UPDATE May Fail With Error 107
  44. Q151111: FIX: DECLARE CURSOR on Temp Table with FOR UPDATE Causes AV
  45. Q151590: FIX: Error 4409 Generated When Using Multiple Database Views
  46. Q151693: FIX: Err Msg "Unknown Token Received from SQL Server"
  47. Q151765: FIX: SELECT INTO Inside a Temp Procedure Causes Client to Hang
  48. Q151985: FIX: SELECTs from SYSPROCESSES Result in Access Violation
  49. Q151988: FIX: 1108 Errors with Heavy Tempdb Activity
  50. Q152353: FIX: Select with CASE Statement Inside View Can Cause Client AV
  51. Q152416: FIX: sp_processmail Will Only Process One Query per Execution
  52. Q152615: FIX: Syntax Error in SELECT List May Cause Handled AV
  53. Q152709: FIX: Update of BLOB Data w/SQL Server 2.65.0201 Driver Stops
  54. Q152800: FIX: GROUP BY Clause without Index Executes More Slowly
  55. Q153006: FIX: Dump or Load w/Tape Devices Results in Errors, AVs
  56. Q153079: FIX: SQL Server Stops w/ Temporary Procedure in a Transaction
  57. Q153186: FIX: Filtered Stored Procedures Cannot Reference Multiple Tables
  58. Q153235: FIX: DATEPART Gives Incorrect Week Number
  59. Q153802: FIX: Deadlock During Cursor Update Causes CPU Spin and Spinloop
  60. Q153803: FIX: GRANT ALL Fails to Give Permissions on Stored Procedures
  61. Q153805: FIX: Error 2525 From Repeated Execution of DBCC DBREINDEX
  62. Q153836: FIX: SQLGetData Fails on Multiple Active Statement Handles
  63. Q153851: FIX: AV if 4 or More Correlated Subqueries with Self-Join
  64. Q153855: FIX: IRL can cause 3307, OS error 6, unhandled server level AV
  65. Q153954: FIX: Checkpoint Process Deadlock Results in Errors 603, 3314
  66. Q153961: FIX: Full Memory and Cursors Cause AVs, 707, 706, and Spins
  67. Q153987: FIX: AV Error Using Temp Table and Cursor in Stored Procedure
  68. Q153992: FIX: Cannot Rename a Column with a Quoted Identifier
  69. Q154002: FIX: Rollback in Trigger Does Not Terminate Batch
  70. Q154018: FIX: AV in Update Mode When Script Is Run Twice
  71. Q154047: FIX: SQL Terminates on Delete Table with 15 Self-References
  72.  
  73. -------------------------------------------------------
  74. FIX: dbcursorfetchex() Can Cause Blocking in DB-Library
  75. -------------------------------------------------------
  76.  
  77. ARTICLE-ID: Q151301
  78. BUG #: NT 15039 (6.50)
  79.  
  80. SYMPTOMS
  81. ========
  82.  
  83. If a DB-library application calls dbcursorfetch() or dbcursorfetchex()
  84. successfully in one thread, subsequent calls to dbcursoropen() or dbclose()
  85. from other threads using the same DBPROCESS would be blocked. Sp_who and
  86. sp_lock show no blockage on the server side, and the DB-library application
  87. would appear to hang.
  88.  
  89. WORKAROUND
  90. ==========
  91.  
  92. Use a separate DBPROCESS for each thread.
  93.  
  94.  
  95. ------------------------------------------------------------
  96. FIX: SQLNumResultCols Fails with Incorrect Syntax Near 'SET'
  97. ------------------------------------------------------------
  98.  
  99. ARTICLE-ID: Q153694
  100. BUG #: NT: 15314 (6.50)
  101.  
  102. SYMPTOMS
  103. ========
  104.  
  105. Calling SQLNumResultCols after SQLPrepare of a SELECT statement that
  106. contains a subquery in the select list will fail with:
  107.  
  108.    szSqlState = "37000", pfNativeError = 156
  109.    szErrorMsg="[Microsoft][ODBC SQL Server Driver][SQL Server]
  110.                Incorrect syntax near the keyword 'SET'."
  111.  
  112. MORE INFORMATION
  113. =================
  114.  
  115. When the SQL Server ODBC driver constructs the T-SQL statement that will be
  116. sent to the server to resolve the number of columns that will be returned
  117. in the resultset, it incorrectly parses the initial query and excludes the
  118. final table name. For example:
  119.  
  120.    SQLPrepare(hstmt, "SELECT t1.c1, (SELECT t2.c1 FROM t2)
  121.                       FROM t1", 44)
  122.    SQLNumResultCols(hstmt, pcol1)
  123.  
  124. This results in the following statement being sent to the server on the
  125. call to SQLNumResultCols:
  126.  
  127.    SET FMTONLY ON SELECT t1.c1, (SELECT t2.c1 FROM t2)
  128.    FROM SET FMTONLY OFF
  129.  
  130. Hence, causing SQL Server to report "Incorrect syntax near the Keyword
  131. 'SET'."
  132.  
  133. WORKAROUND
  134. ==========
  135.  
  136. Where possible convert the offending query to a SQL Server VIEW.
  137.  
  138. --------------------------------------------------------
  139. FIX: 16-bit Driver Times Out on Async Calls to SQLTables
  140. --------------------------------------------------------
  141.  
  142. ARTICLE-ID: Q153908
  143. BUG #: NT: 15563 (2.65.0201)
  144.  
  145. SYMPTOMS
  146. ========
  147.  
  148. When a 16-bit ODBC application calls SQLTables() using the Microsoft SQL
  149. Server ODBC Driver version 2.65.0201 set in asynchronous mode, a "Timeout
  150. expired" error message appears immediately after the second async retry.
  151.  
  152. This problem occurs with any network library configuration and Windows NT
  153. local pipes. The Timeout error message also appears regardless of other
  154. login or query timeouts you configure on the client computer.
  155.  
  156. WORKAROUND
  157. ==========
  158.  
  159. To work around this problem, do not call the ODBC driver in asynchronous
  160. mode. This can be done with different applications and they apply as
  161. follows:
  162.  
  163.  - For ODBC programs written directly to the ODBC API, call
  164.    SQLSetStmtOption() with SQL_ASYNC_ENABLE (set to SQL_ASYNC_ENABLE_OFF).
  165.  
  166.  - For Visual Basic 3.0 and Access 2.0 applications, set DisableAsync to 1
  167.    in the [ODBC] section of in the Vb.ini, App.ini or Msacc20.ini
  168.    respectively.
  169.  
  170.  - For Visual Basic 4.0, set the INIPATH property of DBENGINE to point to
  171.    Vb.ini or App.ini that has DisableAsync set to 1.
  172.  
  173. For MSACC20.INI entry settings applicable to Access 95, please see the
  174. following article in the Microsoft Knowledge Base:
  175.  
  176.    ARTICLE-ID: Q139044
  177.    TITLE     : INF: How to Add Former MSACC20.INI ODBC Section to Registry
  178.  
  179. Jet 3.x (a base component of Access 95 and Visual Basic 4.0) registry
  180. information is on Appendix C of the Microsoft Jet Database Engine
  181. ProgrammerÆs Guide. You can obtain Jet 2.x database engine information from
  182. the Microsoft Developer Network Library Level 1 by querying the following:
  183.  
  184.    jet database engine connectivity neil black
  185.  
  186. You can also reference the Technical Backgrounder called "Jet Database
  187. Engine ODBC Connectivity."
  188.  
  189. MORE INFORMATION
  190. ================
  191.  
  192. Microsoft client/server database applications, such as Access 2.0, Visual
  193. Basic 3.0 and Visual Basic 4.0 (16-bit), are designed on top of the Jet
  194. Database engine. Therefore, they attempt to make calls to SQLTables()
  195. during several ODBC operations, which include attaching to a SQL Server 6.5
  196. table. These applications utilize ODBC in asynchronous mode, by default.
  197. Unless the default asynchronous behavior is turned off, the "Timeout
  198. Expired" error message will occur with the driver version 2.65.0201.
  199.  
  200. NOTE: Microsoft Excel and Microsoft Query are not designed on top of the
  201. Jet Database engine, thus the problem does not occur.
  202.  
  203. For more information about the Jet Database Engine, please refer to the
  204. Microsoft Jet Database Engine Programmer's Guide published by Microsoft
  205. Press. The ISBN number is 1-55615-877-7. You can order guide by
  206. calling (800) MSP-RESS.
  207.  
  208. -----------------------------------------------------------
  209. FIX: AV on INSERT of UNIONed SELECTs to Table With DEFAULTs
  210. -----------------------------------------------------------
  211.  
  212. ARTICLE-ID: Q149938
  213. BUG #: NT: 14833 (6.00 and 6.50)
  214.  
  215. SYMPTOMS
  216. ========
  217.  
  218. INSERTing to a table from a UNION of two or more SELECT statements can
  219. result in a handled Access Violation.
  220.  
  221. MORE INFORMATION
  222. =================
  223.  
  224. At a certain threshold of data, a work table needs to be created to resolve
  225. the UNION correctly. If the target table has DEFAULTs, these are not
  226. applied to intermediate work tables but other attributes of the target
  227. table, such as NOT NULL, are applied, and this would cause the query to
  228. fail with a different error if there was not the AV.
  229.  
  230. WORKAROUND
  231. ==========
  232.  
  233. Implement the INSERT as distinct INSERT SELECTs for each table in the
  234. UNION. If there is a UNIQUE INDEX on the target table, use the
  235. IGNORE_DUP_KEY option on that INDEX to filter out duplicate rows that would
  236. previously have been filtered out by the UNION. In many cases, this method
  237. can be much faster anyway because it can eliminate one or more intermedate
  238. work tables.
  239.  
  240. --------------------------------------------------------
  241. FIX: ROLLBACK of TRUNCATE TABLE May Cause Error 3301, AV
  242. --------------------------------------------------------
  243.  
  244. ARTICLE-ID: Q149939
  245. BUG #: NT: 14849 (6.50)
  246.  
  247. SYMPTOMS
  248. ========
  249.  
  250. A TRUNCATE TABLE command that is aborted or rolled back may get a 3301
  251. error "Invalid log record found in Syslogs (logop 42)" and an access
  252. violation.
  253.  
  254. If the truncated table has an IDENTITY column and the TRUNCATE aborts, or
  255. is inside a user transaction which later does a ROLLBACK, this problem can
  256. occur.
  257.  
  258. WORKAROUND
  259. ==========
  260.  
  261. If the purpose of the TRUNCATE TABLE is just to remove all the rows, use
  262. DELETE with no WHERE clause. If the purpose is also to reset the IDENTITY
  263. value, use DELETE with no WHERE clause then TRUNCATE TABLE, and make sure
  264. there is no user defined transaction at the time of the TRUNCATE TABLE via
  265. logic such as
  266.  
  267. delete t1
  268. while @@trancount > 0
  269. begin
  270.    commit tran
  271. end
  272. truncate table t1
  273.  
  274. --------------------------------------------------------------
  275. FIX: CREATE TABLE in Stored Procedure May Fail With Error 1750
  276. --------------------------------------------------------------
  277.  
  278. ARTICLE-ID: Q150775
  279. BUG #: NT: 14884 (6.50)
  280.  
  281. SYMPTOMS
  282. ========
  283.  
  284. EXECuting a stored procedure that creates a temp or permanent table with
  285. defaults may fail with the error:
  286.  
  287.    [INTERNAL ERROR] unable to locate original param in voidptr list.
  288.    Msg 1750, Level 16, State 0
  289.    Unable to create constraint. See previous errors.
  290.  
  291. MORE INFORMATION
  292. =================
  293.  
  294. If there is some activity in the stored procedure before the CREATE TABLE,
  295. this error can occur. In the simplest case, executing the following stored
  296. procedure will fail:
  297.  
  298. create proc sp_test1 as
  299. begin
  300. IF ( @@error <> 0 )
  301. BEGIN
  302.    GOTO cleanup
  303. END
  304. CREATE TABLE   #t1 (c1         int NOT NULL DEFAULT -1)
  305. cleanup:
  306. end
  307. go
  308. declare @rc int
  309. EXEC @rc = sp_test1
  310. SELECT @rc
  311. go
  312.  
  313. WORKAROUND
  314. ==========
  315.  
  316. Use some other method than a CONSTRAINT, such as ISNULL, to get the default
  317. values you want into the table.
  318.  
  319. ---------------------------------------
  320. FIX: LOAD TRAN May Fail With Handled AV
  321. ---------------------------------------
  322.  
  323. ARTICLE-ID: Q150894
  324. BUG #: 14952 (6.50)
  325.  
  326. SYMPTOMS
  327. ========
  328.  
  329. LOAD TRANSACTION may fail with the errors:
  330.  
  331.   udwritem: Operating system error 6(The handle is invalid.) on device ....
  332.   ex_testhandle: stack overflow, top=0x17a7f10, end=0x17a7f10
  333.   EXCEPTION_ACCESS_VIOLATION
  334.  
  335. The actual stack of the AV in this case can be many different places. The
  336. SQL Server may now become unresponsive and have to be restarted. The
  337. database being loaded will have to be recreated.
  338.  
  339. WORKAROUND
  340. ==========
  341.  
  342. DUMP the database and re-sync the transaction logs.
  343.  
  344. -------------------------------------------------------
  345. FIX: SH_PAGE Locks May Be Held on Inner Tables of JOINs
  346. -------------------------------------------------------
  347.  
  348. ARTICLE-ID: Q150896
  349. BUG #: NT: 15329 (6.50)
  350.  
  351. SYMPTOMS
  352. ========
  353.  
  354. A join of tables may hold the shared page locks on the inner tables of the
  355. join(s) for the duration of the SELECT.
  356.  
  357. MORE INFORMATION
  358. =================
  359.  
  360. The page locks on the inner table(s) of joins where a unique index matches
  361. the join on the inner table are not released until the end of the SELECT.
  362. On earlier versions, SQL Server would obtain and release the locks one at a
  363. time as the page chain is traversed. The outer table's page locks are not
  364. held. If the tables are large, this can be a significant concurrency
  365. impact. This did not happen in prior versions of SQL Server.
  366.  
  367. WORKAROUND
  368. ==========
  369.  
  370. Use non-unique indexes instead of unique.
  371.  
  372. ---------------------------------------
  373. FIX: LOAD TRAN May Fail With Error 1511
  374. ---------------------------------------
  375.  
  376. ARTICLE-ID: Q150897
  377. BUG #: NT: 15114 (6.50)
  378.  
  379. SYMPTOMS
  380. ========
  381.  
  382. If the transaction log being LOADed contains the log records for a CREATE
  383. CLUSTERED INDEX on a large table (> 150 MB), then the transaction may fail
  384. to load with the 1511 error.
  385.  
  386. Error : 1511, Severity: 20, State: 8
  387.    Sort cannot be reconciled with transaction log
  388.  
  389. WORKAROUND
  390. ==========
  391.  
  392. DUMP the whole DATABASE after a CREATE CLUSTERED INDEX on a large table.
  393.  
  394. -----------------------------------
  395. FIX: UPDATE May Fail With Error 107
  396. -----------------------------------
  397.  
  398. ARTICLE-ID: Q150900
  399. BUG #: NT: 14984 (6.50)
  400.  
  401. SYMPTOMS
  402. ========
  403.  
  404. If using the 204 trace flag for backwards compatibility, UPDATEs using
  405. JOINs may fail with an error 107.
  406.  
  407. Msg 107, Level 15, State 1
  408.    The column prefix 'so' does not match with a table name or alias name
  409.    used in the query
  410.  
  411. WORKAROUND
  412. ==========
  413.  
  414. Turn off the 204 trace flag or rewrite the JOIN as a subquery.
  415.  
  416. ----------------------------------------------------------
  417. FIX:DECLARE CURSOR on Temp Table with FOR UPDATE Causes AV
  418. ----------------------------------------------------------
  419.  
  420. ARTICLE-ID: Q151111
  421. BUG #: NT: 15086 (6.00)
  422.  
  423. SYMPTOMS
  424. ========
  425.  
  426. A DECLARE CURSOR statement that has a FOR UPDATE clause with multiple
  427. columns in the column list can generate a handled access violation if the
  428. table in the SELECT clause is a temporary table.
  429.  
  430. WORKAROUND
  431. ==========
  432.  
  433. Do not use the FOR UPDATE clause for more than one column in case of a
  434. temporary table. Use a permanent table if more than one column is
  435. absolutely necessary in the FOR UPDATE clause.
  436.  
  437. ------------------------------------------------------------
  438. FIX: Error 4409 Generated When Using Multiple Database Views
  439. ------------------------------------------------------------
  440.  
  441. ARTICLE-ID: Q151590
  442. BUG #: NT: 14645 (6.00)
  443.  
  444. SYMPTOMS
  445. ========
  446.  
  447. Under certain conditions, you may receive 4409 errors. The problem arises when the first view in 
  448. the chain of views can be executed but subsequent views are unavailable for use. For example:
  449.  
  450. If you have viewA and viewC in the master database and viewB in the pubs
  451. database, where viewA selects * from viewB and viewB selects * from viewC
  452. and viewC selects * from sysdatabases. And, SQL Server has been stopped
  453. while a client continues to try to execute a select * from viewA. When SQL
  454. Server is restarted, the master database is always recovered first and then
  455. the subsequent databases. As soon as master is recovered, the client
  456. attempts to execute the select and receives the 4409 error because pubs has
  457. not yet been recovered.
  458.  
  459. The same behavior can occur when you take a database on and offline, or you
  460. try to drop and create viewC in the above scenario while someone is trying
  461. to access it.
  462.  
  463. WORKAROUND
  464. ==========
  465.  
  466. Drop and add the views when you are sure no one is accessing them.
  467.  
  468. -----------------------------------------------------
  469. FIX: Err Msg "Unknown Token Received from SQL Server"
  470. -----------------------------------------------------
  471.  
  472. ARTICLE-ID: Q151693
  473. BUG #: NT: 15056 (6.50)
  474.  
  475. SYMPTOMS
  476. ========
  477.  
  478. When you set the statement options to use a server-side cursor and prepare
  479. a select statement on a SQL Server system table, the first execution of the
  480. select creates the cursor successfully. After you close this cursor, if you
  481. execute the prepared statement again, the following error message appears:
  482.  
  483.    unknown token received from SQL Server.
  484.  
  485. WORKAROUND
  486. ==========
  487.  
  488. Use a forward-only cursor instead of a static, keyset, or dynamic cursor on
  489. the system tables. Note that the problem does not occur if a server-side
  490. cursor is created on a user-defined table or view.
  491.  
  492. If a forward-only cursor is unacceptable, prepare the select statement
  493. again on the system table and execute it to create a server-side cursor.
  494. Note that the first execution works fine and applications typically do not
  495. need to create a cursor on a system table repeatedly.
  496.  
  497. ----------------------------------------------------------
  498. FIX: SELECT INTO Inside a Temp Proc Causes Client to Hang
  499. ----------------------------------------------------------
  500.  
  501. ARTICLE-ID: Q151765
  502. BUG #: NT: 15113 (6.50)
  503.  
  504. SYMPTOMS
  505. ========
  506.  
  507. In SQL Server version 6.5, executing a temporary stored procedure 
  508. containing a SELECT INTO statement causes the client to stop responding. 
  509. The server never finishes the execution and the control is not returned to 
  510. the client. CPU utilization on the server computer goes above 95 percent 
  511. and persists, with the result that the server slows down drastically. This does 
  512. not prevent other clients from connecting to SQL Server, but the queries executed 
  513. from these clients will be slow.
  514.  
  515. WORKAROUND
  516. ==========
  517.  
  518. Use permanent stored procedure in place of temporary stored procedure. For
  519. ODBC clients, clear the Generate Stored Procedures for Prepared Statements
  520. option check box in the ODBC SQL Server Driver Setup dialog box, or set the
  521. SQL_USE_PROCEDURE_FOR_PREPARE option in the SQLSetConnectOption function to
  522. SQL_UP_OFF.
  523.  
  524. MORE INFORMATION
  525. ================
  526.  
  527. This behavior is also seen in Microsoft SQL Server 6.0.
  528.  
  529. With ODBC clients the same behavior is seen if:
  530.  
  531. 1. Generate Stored Procedures for Prepared Statements option checkbox in
  532. the ODBC SQL Server Driver Setup dialog box is checked.
  533.  
  534. 2. SQL_USE_PROCEDURE_FOR_PREPARE option in the SQLSetConnectOption function
  535. is set to SQL_UP_ON.
  536.  
  537. and a SELECT INTO statement is prepared and executed.
  538.  
  539. ---------------------------------------------------------
  540. FIX: SELECTs from SYSPROCESSES Result in Access Violation
  541. ---------------------------------------------------------
  542.  
  543. ARTICLE-ID: Q151985
  544. BUG #: NT: 15280 (6.00 and 6.50)
  545.  
  546. SYMPTOMS
  547. ========
  548.  
  549. On busy symmetric multiprocessing (SMP) computers, queries against the
  550. virtual table sysprocesses may infrequently get a handled access violation,
  551. causing the client connection to be terminated. Other clients are
  552. unaffected. The call stack of the access violation will look similar to the
  553. following:
  554.  
  555. findwaitfor+0x2f
  556. ins_sysproc+0x7fc
  557. make_fake+0xe8
  558. s_setuptables+0x2bc
  559. s_execute+0x7d8
  560. sequencer+0x23f
  561. execproc+0xfb7
  562. s_execute+0xb8c
  563. sequencer+0x23f
  564. language_exec+0x65e
  565.  
  566. -------------------------------------------
  567. FIX: 1108 Errors with Heavy Tempdb Activity
  568. -------------------------------------------
  569.  
  570. ARTICLE-ID: Q151988
  571. BUG #: NT: 15209 (6.50)
  572.  
  573. SYMPTOMS
  574. ========
  575.  
  576. SQL Servers with lots of tempdb activity, sorts, and deadlocks can get 1108
  577. errors in the error log and at the client. The following error message
  578. appears:
  579.  
  580.    Error : 1108, Severity: 21, State: 1
  581.    Cannot deallocate extent 944, database 2. Object id 0, index id 0,
  582.    status 0 in extent does not match object id -49604, index id 0, status 0
  583.    in object being deallocated.  Run DBCC CHECKALLOC
  584.  
  585.  
  586. You can get 1108 errors in tempdb when there are sorts of small work tables
  587. and some other event occurs such as a deadlock or cancel, causing a
  588. backout. Normally, the client is already backing out for some other reason
  589. so they don't even notice the error, but it does show up in the errorlog.
  590.  
  591. ---------------------------------------------------------------
  592. FIX: Select with CASE Statement Inside View Can Cause Client AV
  593. ---------------------------------------------------------------
  594.  
  595. ARTICLE-ID: Q152353
  596. BUG #: WINDOWS: 15383 (6.00 and 6.50)
  597.  
  598. SYMPTOMS
  599. ========
  600.  
  601. A View that has a Select statement with a CASE construct that does a sub-
  602. select with an IN clause may cause the client to access violate (AV) during
  603. a Select from the View.
  604.  
  605. The following sample is the problem View definition:
  606.  
  607.    create view MyView as
  608.    Select   Column1, Column2=
  609.          Case
  610.            When SomeColumn In
  611.             (Select  SomeOtherColumn
  612.               From   SomeOtherTable)
  613.              Then SomeValue
  614.            Else Null
  615.          End
  616.    From  MyTable
  617.  
  618. A Select from MyView may cause the client to access violate.
  619.  
  620. WORKAROUND
  621. ==========
  622.  
  623. Try to avoid the CASE construct inside a View Definition or perform some
  624. pre-processing for the CASE logic before the View Definition by using the
  625. IF-ELSE construct and Temporary Tables, and then define the View on the
  626. Temporary Table.
  627.  
  628. -------------------------------------------------------------
  629. FIX: sp_processmail Will Only Process One Query per Execution
  630. -------------------------------------------------------------
  631.  
  632. ARTICLE-ID: Q152416
  633. BUG#: 15475
  634.  
  635. SYMPTOMS
  636. ========
  637.  
  638. The stored procedure sp_processmail will only process one query sent via e-
  639. mail each time it is run if SQLMail is running with Microsoft Exchange
  640. Client software.
  641.  
  642. WORKAROUND
  643. ==========
  644.  
  645. If you are scheduling sp_processmail as a task, you have the following
  646. options:
  647.  
  648. 1. Change the task to run every minute. Note that this will work as long as
  649.    there is not more than one query per minute sent to SQL Server via
  650.    e-mail.
  651. 2. Make multiple tasks to run sp_processmail that run every minute. This
  652.    provides a workaround for option 1 above.
  653. 3. Change the sp_processmail stored procedure not to delete the mail it
  654.    responds to by commenting the xp_deletemail call.
  655. 4. Change the sp_processmail stored procedure to not run in a loop but to
  656.    instead do several iterations.
  657.  
  658. -----------------------------------------------------
  659. FIX: Syntax Error in SELECT List May Cause Handled AV
  660. -----------------------------------------------------
  661.  
  662. ARTICLE-ID: Q152615
  663. BUG#: 15027 (6.0)
  664.  
  665. SYMPTOMS
  666. ========
  667.  
  668. The absence of a comma between columns in the SELECT list may cause a
  669. handled AV under some narrow circumstances.
  670.  
  671. The parser incorrectly perceives that an alias is intended. A reference to
  672. the object later in the SELECT query, usually in a GROUP BY or ORDER BY
  673. clause triggers the parser confusion.
  674.  
  675. WORKAROUND
  676. ==========
  677.  
  678. Add the comma to the SELECT clause.
  679.  
  680. ------------------------------------------------------------
  681. FIX: Update of BLOB Data w/SQL Server 2.65.0201 Driver Stops
  682. ------------------------------------------------------------
  683.  
  684. ARTICLE-ID: Q152709
  685. SYMPTOMS
  686. ========
  687.  
  688. Update of a BLOB data causes SQL Server 2.65.0201 driver to stop with a
  689. syntax error. When an update statement is sent to the driver, it generates
  690. an invalid statement that results in the syntax error. This happens during
  691. an update of a large BLOB data (larger than 64K).
  692.  
  693.       The syntax error generated is
  694.        Incorrect syntax near the keyword 'UPDATE'.
  695.        State:37000, Native:156, Origin:[Microsoft][ODBC SQL Server
  696.        Driver][SQL Server]
  697.  
  698.        Line 1"Incorrect syntax near '='
  699.        State:37000, Native:170, Origin:[Microsoft][ODBC SQL Server
  700.        Driver][SQL Server]
  701.  
  702. MORE INFORMATION
  703. ================
  704.  
  705. If the SQL Server 4030 trace is turned on , the 2.65.0201 SQL server driver
  706. generates the following syntax when an update statement of BLOB data is
  707. issued:
  708.  
  709.    SELECT TEXTPTR(imagecol) FROM imagetest where intcol=update imagetest
  710.    set imagecol=0x00
  711.  
  712. This is an invalid syntax.
  713.  
  714. This does not happen in  2.50.0121 (6.0 drivers).They generate:
  715.  
  716.    SELECT TEXTPTR(imagecol) FROM imagetest where imagecol LIKE
  717.    0x000000
  718.  
  719.    WRITETEXT BULK imagetest.imagecol 0xa
  720.  
  721. -------------------------------------------------------
  722. FIX: GROUP BY Clause without Index Executes More Slowly
  723. -------------------------------------------------------
  724.  
  725. ARTICLE-ID: Q152800
  726. BUG#: 14825
  727.  
  728. SYMPTOMS
  729. ========
  730.  
  731. If a Transact-SQL query contains a GROUP BY clause and an index is not
  732. defined on the column involved in GROUP BY, the query requires many more i/oÆs
  733. than expected, esulting in slower performance. This problem occurs only only on the Alpha 
  734. platform.
  735.  
  736. WORKAROUND
  737. ==========
  738.  
  739. Sort the columns in the GROUP BY clause. Alternately, define an index
  740. encompassing the columns involved in the GROUP BY clause and make sure the
  741. index is used when grouping the columns in the query.
  742.  
  743. -------------------------------------------------------
  744. FIX: Dump or Load w/Tape Devices Results in Errors, AVs
  745. -------------------------------------------------------
  746.  
  747. ARTICLE-ID: Q153006
  748. BUG #: NT: 15499 (6.50)
  749.  
  750. SYMPTOMS
  751. ========
  752.  
  753. Attempts to dump or load with tape devices may generate errors 3201,
  754. tbswritecheck, or access violations (AVs).  Msg 3201 and the tbswritecheck
  755. errors are seen when attempting to dump; the AV may occur during the load.
  756.  
  757. WORKAROUND
  758. ==========
  759.  
  760. Do not dump to a tape device; dump and load using a different type of dump
  761. device, such as disk.  If dumping to disk, use another backup package, such
  762. as Windows NT Backup, to archive the dump file to tape.
  763.  
  764. MORE INFORMATION
  765. ===============
  766.  
  767. The behavior and error messages may vary from computer to computer. Some
  768. computers may report a Msg 3201 while the same tape drive and software may
  769. work correctly on a different computer, or the load process may generate an
  770. access violation (AV).
  771.  
  772. The 3201 and tbswritecheck errors may occur on any of the DUMP commands
  773. (DATABASE, TRANSACTION), and the AV may occur on any of the LOAD commands
  774. (DATABASE, TRANSACTION, TABLE).
  775.  
  776. For a robust backup and restore strategy, Microsoft recommends occasional
  777. verification that dumps can be loaded, along with additional testing when a
  778. device or software is changed.  Certain database errors may also prevent a
  779. successful load, so it is important to run the recommended DBCC commands at
  780. the time of each backup.
  781.  
  782. -------------------------------------------------------------
  783. FIX: SQL Server Stops w/ Temporary Procedure in a Transaction
  784. -------------------------------------------------------------
  785.  
  786. ARTICLE-ID: Q153079
  787. BUG# 15570 (6.50)
  788.  
  789. SYMPTOMS
  790. ========
  791.  
  792. When a temporary stored procedure is created and executed within a user-
  793. defined transaction and the client (DBLIB or ODBC) disconnects without
  794. either committing or rolling back the transaction, SQL Server stops
  795. running. The SQL Service manager shows a red light.
  796.  
  797. An attempt to kill the process that initiated the transaction also causes
  798. SQL Server to stop running.
  799.  
  800. WORKAROUND
  801. ==========
  802.  
  803. Use a permanent stored procedure instead of a temporary stored procedure
  804. within a transaction.
  805.  
  806. You can also commit or roll back the transaction before the client
  807. disconnects.
  808.  
  809. MORE INFORMATION
  810. ================
  811.  
  812. The SQL Server errorlog (under SQL..\LOG directory on the server) would
  813. look like:
  814.  
  815. Error : 631, Severity: 21, State: 1
  816. spid12   The length of 116 passed to delete row routine for the row at
  817. offset 32 is incorrect on the following page: Page pointer = 0xa8b000,
  818. pageno = 104, status = 0x101, objectid = 6, indexid = 0
  819. kernel   WARNING: Process being freed while holding Dataserver semaphore
  820. Error : 631, Severity: 21, State: 1
  821. The length of 116 passed to delete row routine for the row at offset 32 is
  822. incorrect on the following page: Page pointer = 0xa8b000, pageno = 104,
  823. status = 0x101, objectid = 6, indexid = 0
  824. kernel   udread: Operating system error 6(The handle is invalid.) on device
  825. 'C:\SQL60\DATA\MASTER.DAT' (virtpage 0x000002fb).
  826. Buffer 8d8700 from database 'master' has page number 0 in the page header
  827. and page number 759 in the buffer header
  828. Recursive error 822 in ex_print
  829. kernel   mirrorproc: i/o error on primary device 'C:\SQL60\DATA\MASTER.DAT'
  830.  
  831. ----------------------------------------------------------------
  832. FIX: Filtered Stored Procedures Cannot Reference Multiple Tables
  833. ----------------------------------------------------------------
  834.  
  835. ARTICLE-ID: Q153186
  836. BUG #: NT: 15451 (6.50)
  837.  
  838. SYMPTOMS
  839. ========
  840.  
  841. The Filtered Stored procedures used to facilitate horizontal partitioning
  842. in SQL Server 6.50 replication may cause the Logreader task to keep
  843. retrying with the following message:
  844.  
  845.    ConnectionTransact (GetOverLappedResult()).Possible network error:
  846.    Write to SQL Server. Failed. Connection broken.
  847.  
  848. This error prevents logreader from processing transactions, effectively
  849. stopping replication. The problem occurs when rows that do not match the
  850. restriction clause are inserted. This behavior is only exhibited in SQL
  851. Server version 6.50.
  852.  
  853. WORKAROUND
  854. ==========
  855.  
  856. To avoid encountering the bug you can:
  857.  
  858.  - Publish the entire table instead of using horizontal partitioning.
  859.  
  860. -OR-
  861.  
  862.  - Create a permanent table with the data from the original tables
  863.    selectively siphoned out (using triggers  with the partition
  864.    condition)  and then publish the new table.
  865.  
  866. -----------------------------------------
  867. FIX: DATEPART Gives Incorrect Week Number
  868. -----------------------------------------
  869.  
  870. ARTICLE-ID: Q153235
  871. BUG #: Windows NT: 13717 (6.00.121 6.50.201) (sqlserver)
  872.  
  873. SYMPTOMS
  874. ========
  875.  
  876. The week numbering system of the DATEPART( ) function produces an
  877. undesirable result if the first day of the week is not Sunday. Most
  878. European countries use week calculations which specify that the week begins
  879. with Monday (see ISO 8601 for more details).
  880.  
  881. WORKAROUND
  882. ==========
  883.  
  884. Change to some language where datefirst equals 7.
  885.  
  886. ----------------------------------------------------------------
  887. FIX: Deadlock During Cursor Update Causes CPU Spin and Spinloop
  888. ----------------------------------------------------------------
  889.  
  890. ARTICLE-ID: Q153802
  891. BUG #: 15422 (6.50)
  892.  
  893. SYMPTOMS
  894. ========
  895.  
  896. A group of updates through cursors that result in the cursor being a
  897. deadlock victim can cause the following error to appear in the error log:
  898.  
  899.    closetable:table already closed for sdes %d
  900.  
  901. After this error occurs, the process can become unkillable, and its status
  902. in sysprocesses is marked as "spinloop." At this point SQL Server becomes
  903. very unresponsive and will often stop responding entirely, allowing no one
  904. to log on or shut it down. Processes that were accessing the tables become
  905. blocked.
  906.  
  907.  
  908. WORKAROUND
  909. ==========
  910.  
  911. When using cursors for updates make sure they will not get into a deadlock
  912. situation.
  913.  
  914. -------------------------------------------------------------
  915. FIX: GRANT ALL Fails to Give Permissions on Stored Procedures
  916. -------------------------------------------------------------
  917.  
  918. ARTICLE-ID: Q153803
  919. BUG #: 15102 (6.50)
  920.  
  921. SYMPTOMS
  922. ========
  923.  
  924. When a user attempts to GRANT ALL to a stored procedure, the permissions
  925. can fail to be applied. No errors are reported; SQL Server simply does not
  926. give permission to the stored procedure. Once this happens to a stored
  927. procedure, it will always happen, and GRANT ALL will never work for that
  928. stored procedure.
  929.  
  930. WORKAROUND
  931. ==========
  932.  
  933. To grant permissions to a stored procedure, use GRANT EXEC instead of GRANT
  934. ALL.
  935.  
  936. ----------------------------------------------------------
  937. FIX: SQLGetData Fails on Multiple Active Statement Handles
  938. ----------------------------------------------------------
  939.  
  940. ARTICLE-ID: Q153836
  941. BUG #: 15053 (6.50)
  942.  
  943. SYMPTOMS
  944. ========
  945.  
  946. When there are two active statement handles, SQLGetData fails to
  947. fetch results from the two statement handles simultaneously.
  948. The following error is generated:
  949.  
  950.    szErrorMsg="[Microsoft][ODBC SQL Server Driver]Connection is busy
  951.    with results for another hstmt"
  952.  
  953. WORKAROUND
  954. ==========
  955.  
  956. Bind the result set columns using SQLBindCol before a fetch. This allows
  957. multiple active statement handles.
  958.  
  959. MORE INFORMATION
  960. ================
  961.  
  962. When you are using server-based cursors, the connection between the client
  963. and server does not remain busy between operations. This allows you to have
  964. multiple cursors statements active at the same time. However, with the SQL
  965. Server ODBC driver 2.65.0121v, an attempt to fetch data using SQLGetData
  966. between multiple statement handles fails. If SQLFetch is being done on a
  967. statement handle hstmt1 and if, before a result of SQL_NO_DATA_FOUND is
  968. returned, another statement hstmt2 is allocated and another fetch operation
  969. is done, and then a simultaneous SQLGetData is done on hstmt1, the result
  970. will be a "Connection is busy with results" error.
  971.  
  972. ---------------------------------------------------------
  973. FIX: AV if 4 or More Correlated Subqueries with Self-Join
  974. ---------------------------------------------------------
  975.  
  976. ARTICLE-ID: Q153851
  977. BUG #: 14802 (6.50)
  978.  
  979. SYMPTOMS
  980. ========
  981.  
  982. If a complex query does a self-join and has four or more subqueries, all
  983. referencing the same table, it may get a thread-level access violation (AV)
  984. if the table has only a non-clustered index.
  985.  
  986. WORKAROUND
  987. ==========
  988.  
  989. Convert the non-clustered index to a clustered index, or drop it.
  990.  
  991. --------------------------------------------------------------
  992. FIX: IRL can cause 3307, OS error 6, unhandled server level AV
  993. --------------------------------------------------------------
  994.  
  995. ARTICLE-ID: Q153855
  996. BUG #: NT: 15569 (6.50)
  997.  
  998. SYMPTOMS
  999. ========
  1000.  
  1001. If a table is set to enable Insert - Row Locking (IRL) with "sp_tableoption
  1002. 'table_name', 'Insert row lock', true"  within a transaction and the user
  1003. fails to end the transaction with 'commit tran' or 'rollback tran' before
  1004. exiting, it could cause 3307 "Process %ld was expected to hold logical lock
  1005. on page %ld.", OS error 6, 602 "Could not find row in Sysindexes for dbid
  1006. '%d', object '%Id',index '%d'." and an unhandled server level access
  1007. violation (AV).
  1008.  
  1009. MORE INFORMATION
  1010. ================
  1011.  
  1012. On a single processor computer, when the user exits without 'commit tran',
  1013. it can cause the following error in the errorlog:
  1014.  
  1015. Error : 3307, Severity: 21, State: 1
  1016. Process 10 was expected to hold logical lock on page 336.
  1017. WARNING: Process being freed while holding Dataserver semaphore
  1018. udread: Operating system error 6(The handle is invalid.) on device
  1019. 'C:\MSSQL\DATA\MASTER.DAT' (virtpage 0x000009a4).
  1020. udread: Operating system error 6(The handle is invalid.) on device
  1021. 'C:\MSSQL\DATA\MASTER.DAT' (virtpage 0x00000394).
  1022. udread: Operating system error 6(The handle is invalid.) on device
  1023. 'C:\MSSQL\DATA\MASTER.DAT' (virtpage 0x00000383).
  1024. Buffer 8d3b20 from database 'master' has page number 0 in the page header
  1025. and page number 895 in the buffer header
  1026. Recursive error 822 in ex_print
  1027. mirrorproc: i/o error on primary device 'C:\MSSQL\DATA\MASTER.DAT'
  1028.  
  1029. SQL Server will terminate itself afterwards.  When SQL Server is restarted
  1030. and DBCC CHECKDB("pubs") is executed, the results sometimes report error
  1031. 602: Could not find row in Sysindexes for dbid '%d', object '%Id',index
  1032. '%d'.
  1033.  
  1034. After a user exits on a multi-processor computer, sp_who shows the spid is
  1035. still valid and the status shows 'spinloop', which does not allow you to
  1036. kill the spid.  DBCC CHECKDB or other queries will either hang, or become
  1037. extremely slow. There will also be many bufwait() errors in the errorlog.
  1038. Stopping SQL Server would either cause an AV or cause SQl Server to stop
  1039. responding.
  1040.  
  1041. ------------------------------------------------------------
  1042. FIX: Checkpoint Process Deadlock Results in Errors 603, 3314
  1043. ------------------------------------------------------------
  1044.  
  1045. ARTICLE-ID: Q153954
  1046. BUG #: NT: 15307 (6.50)
  1047.  
  1048. SYMPTOMS
  1049. ========
  1050.  
  1051. A stored procedure that performs the following actions:
  1052.  
  1053. 1. creates a temporary table
  1054. 2. inserts data into the table
  1055. 3. creates a cursor for read-only access that is then used to update the
  1056.    contents of the temporary table
  1057. 4. drops the cursor
  1058. 5. drops the temporary table
  1059.  
  1060. can, if executed by multiple users, result in the Checkpoint Process being
  1061. chosen as a deadlock victim (spid 3). In this case, the following message
  1062. will come up three times:
  1063.  
  1064.    Your server command (process id 3) was deadlocked with another process
  1065.    and has been chosen as a deadlock victim. Re-run your command.
  1066.  
  1067. The message will be followed by the following errors:
  1068.  
  1069.    603: There are not enough system session descriptors available to run
  1070.    this query. The maximum number available to a process is %d. Split query
  1071.    and rerun.
  1072.  
  1073.    3314: Error while undoing log row in database '%.*s'. %S_RID.
  1074.  
  1075. A thread-level Access Violation will also be displayed.
  1076.  
  1077. If you run sp_who prior to receiving 1105 errors in tempdb, the Checkpoint
  1078. Process is not present, and if the client processes continue to run, the
  1079. result is that tempdb eventually fills because the log is not being
  1080. truncated.
  1081.  
  1082. -----------------------------------------------------------
  1083. FIX: Full Memory and Cursors Cause AVs, 707, 706, and Spins
  1084. -----------------------------------------------------------
  1085.  
  1086. ARTICLE-ID: Q153961
  1087. BUG #: NT: 14828 (6.50)
  1088.  
  1089. SYMPTOMS
  1090. ========
  1091.  
  1092. A user application that uses engine side cursors in a stored procedure can
  1093. cause a myriad of problems when available SQL Server system memory becomes
  1094. full. Usually it starts with error 707:
  1095.  
  1096.    System error detected during attempt to free memory at address 0x%1x.
  1097.    Please consult the SQL Server error log for more details.
  1098.  
  1099. Or Error 706:
  1100.  
  1101.    Process %d tried to remove PROC_HDR 0x%lx that it does not hold in Pss.
  1102.  
  1103. These are then followed by handled access violations. The access violations
  1104. can also occur without the 707 or 706 errors. After the access violations,
  1105. SQL Server will often lock up and become unusable as it goes into a 100
  1106. percent CPU spin.
  1107.  
  1108. MORE INFORMATION
  1109. ===================
  1110.  
  1111. When the SQL Server procedure cache needs to swap out a stored procedure it
  1112. can incorrectly deallocate the procedure twice. This can cause a memory
  1113. leak as well as the access violations. This will only occur if the stored
  1114. procedure is using engine side cursors.
  1115.  
  1116. WORKAROUND
  1117. ==========
  1118.  
  1119. Increasing the amount of procedure cache available to SQL Server will
  1120. reduce the chance of the problem occurring. This can be accomplished by
  1121. giving SQL Server more memory to use, or by increasing the procedure cache
  1122. using sp_configure.
  1123.  
  1124. -------------------------------------------------------------
  1125. FIX: AV Error Using Temp Table and Cursor in Stored Procedure
  1126. -------------------------------------------------------------
  1127.  
  1128. ARTICLE-ID: Q153987
  1129. BUG #: NT: 15510 (6.50)
  1130.  
  1131. SYMPTOMS
  1132. ========
  1133.  
  1134. A stored procedure that performs selects against a cursor with a temporary
  1135. table in the cursor will fail with a handled access violation or with the
  1136. following error message:
  1137.  
  1138.    Msg 208 "Invalidobject name #temptable"
  1139.  
  1140. The problem will only occur after SQL Server has been shut down and
  1141. restarted after the initial creation of the stored procedure. If the stored
  1142. procedure is then dropped and re-created, it will work again until SQL
  1143. Server is shut down and restarted.
  1144.  
  1145. WORKAROUND
  1146. ==========
  1147.  
  1148. The problem only occurs if both the temporary table and the cursor are both
  1149. created inside a stored procedure. Creating the temporary table outside of
  1150. the stored procedure will allow the stored procedure to function correctly.
  1151. An alternative workaround would be to convert the temporary table to a
  1152. permanent table.
  1153.  
  1154. ----------------------------------------------------
  1155. FIX: Cannot Rename a Column With a Quoted Identifier
  1156. ----------------------------------------------------
  1157.  
  1158. ARTICLE-ID: Q153992
  1159. BUG #: NT: 15100 (6.50)
  1160.  
  1161. SYMPTOMS
  1162. ========
  1163.  
  1164. If you try to rename a table's column to use a quoted identifier column
  1165. name, sp_rename gives an error indicating that the column name is invalid.
  1166. The errors are as folows:
  1167.  
  1168.    Msg 15006, Level 16, State 1
  1169.    '<column name>' is not a valid name since it contains invalid characters
  1170.  
  1171.    Msg 15224, Level 11, State 1
  1172.    Error, the value for parameter NewName contains invalid characters or
  1173.    violates a basic restriction
  1174.  
  1175. WORKAROUND
  1176. ==========
  1177.  
  1178. Export the data. Drop and re-create the table with quoted identifiers on
  1179. necessary columns. Import the data back in.
  1180.  
  1181. -----------------------------------------------
  1182. FIX: AV in Update Mode When Script Is Run Twice
  1183. -----------------------------------------------
  1184.  
  1185. ARTICLE-ID: Q154018
  1186. BUG#: 14827 (6.50)
  1187.  
  1188. SYMPTOMS
  1189. ========
  1190.  
  1191. This problem arises with simple scripts that use trace flag 323 to
  1192. determine if UPDATE IN PLACE is occurring. When you run such a script
  1193. twice, a handled access violation (AV) occurs.
  1194.  
  1195. WORKAROUND
  1196. ==========
  1197.  
  1198. To avoid this problem, do not use trace flag 323. Without the trace flag,
  1199. the script will run successfully.
  1200.  
  1201. -----------------------------------------------------------
  1202. FIX: SQL Terminates on Delete Table with 15 Self-References
  1203. -----------------------------------------------------------
  1204.  
  1205. ARTICLE-ID: Q154047
  1206. BUG #: NT: 15629 (6.50)
  1207.  
  1208. SYMPTOMS
  1209. ========
  1210.  
  1211. Trying to delete a table that contains 15 self-references can cause the
  1212. system to return the following errors and warnings:
  1213.  
  1214.    Error : 1202, Severity: 20, State: 2
  1215.    Table_lock was called with illegal mode 0.
  1216.    
  1217.    WARNING: Process being freed while holding Dataserver semaphore
  1218.    
  1219.    udwritem: Operating system error 6(The handle is invalid.) on device
  1220.    'C:\MSSQL\DATA\MASTER.DAT' (virtpage 0x00002739).
  1221.    
  1222.    udread: Operating system error 6(The handle is invalid.) on device
  1223.    'C:\MSSQL\DATA\MASTER.DAT' (virtpage 0x00000394).
  1224.    
  1225.    Error: 5157, Severity: 20, State: 0
  1226.    Recursive error 1202 in ex_print
  1227.  
  1228. This action also results in an unhandled exception, essentially terminating
  1229. the server.
  1230.  
  1231. WORKAROUND
  1232. ==========
  1233.  
  1234. The workaround for this problem is to avoid having more than 14 self-
  1235. references on a table. Establish another table that can contain the
  1236. additional required references.
  1237.  
  1238. MORE INFORMATION
  1239. ================
  1240.  
  1241. This problem is specific to 15 self-references and hence is extremely
  1242. uncommon.
  1243.  
  1244. NOTE: If a default debugger is set up, it will generate a debug log (like
  1245. Dr. Watson log).
  1246.  
  1247. ---------------------------------
  1248. FIX: SELECT INTO Locking Behavior
  1249. ---------------------------------
  1250.  
  1251. ARTICLE-ID: Q153441
  1252. BUG #: 14818 (DCR, 6.50)
  1253.  
  1254. SUMMARY
  1255. =======
  1256.  
  1257. In SQL Server 6.5, SELECT INTO wraps within a transaction. Tables created
  1258. by using SELECT INTO hold to the ACID (atomicity, consistency, isolation,
  1259. durability) transaction properties. This also means that system resources,
  1260. such as pages, extents, and locks, are held for the duration of the SELECT
  1261. INTO statement. With larger system objects, this leads to the condition
  1262. where many internal tasks can be blocked by other users performing SELECT
  1263. INTO statements. For example, on high-activity servers, many users running
  1264. the SQL Enterprise Manager tool to monitor system processes can block on
  1265. each other, which leads to a condition where the SEM application appears to
  1266. hang.
  1267.  
  1268. MORE INFORMATION
  1269. ================
  1270.  
  1271. When you upgrade to SQL Server 6.5 Service Pack 1, SELECT INTO locking
  1272. characteristics is a system settable feature. Wrapping the SELECT INTO with
  1273. a transaction remains the default behavior. For users wishing not to hold
  1274. system catalog locks on the activity, a trace flag has been added to allow
  1275. for such operations. To apply the trace flag, start the server with the
  1276. -T5302 command line parameter, or from within a query window, use the
  1277. following commands:
  1278.  
  1279. > dbcc traceon (3604)
  1280. > go
  1281. > dbcc traceon (5302)
  1282. > go
  1283.  
  1284. When the 5302 trace flag is applied and a SELECT INTO fails, the table is
  1285. still created. Note that the locking behavior you select is applied for all
  1286. databases within the server.
  1287.     
  1288.  
  1289. KBCategory: kbref kbfixlist6.50.sp1
  1290. KBSubcategory: SSrvGen
  1291. Additional reference words: 6.50 sp1 database
  1292.  
  1293. ========================================================================
  1294.  
  1295. THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED
  1296. "AS IS" WITHOUT WARRANTY OF ANY KIND.  MICROSOFT DISCLAIMS ALL 
  1297. WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF 
  1298. MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  IN NO EVENT SHALL 
  1299. MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES 
  1300. WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF 
  1301. BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR 
  1302. ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.  SOME 
  1303. STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR 
  1304. CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY 
  1305. NOT APPLY.
  1306.  
  1307. Copyright Microsoft Corporation 1996.
  1308.  
  1309. Copyright (c) Microsoft Corporation. All rights reserved.
  1310.