home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0430 - 0439 / ibm0430-0439 / ibm0438.tar / ibm0438 / SQL42102.ZIP / SQL421A.002 / SQL / ALPHA / README.TXT < prev    next >
Encoding:
Text File  |  1994-07-14  |  57.8 KB  |  1,288 lines

  1. ************************************************************************
  2.              MICROSOFT(R) SQL SERVER(TM) SPECIAL INFORMATION
  3. ************************************************************************
  4. This file contains information pertaining to the installation and use of
  5. Microsoft SQL Server. The information contained 
  6. in this file is intended to supplement the manuals included in your 
  7. SQL Server package.
  8. ************************************************************************
  9.  
  10. ------------------------------------------------------------------------
  11. Using SQL Server 4.21A with Windows NT(TM) Server Version 3.5
  12. ------------------------------------------------------------------------
  13.  
  14. *****What's Changed in Microsoft SQL Server Version 4.21A*****
  15.  
  16. With this release, some SQL Server components have 
  17. been updated for better compatibility with the Windows NT 
  18. Server version 3.5 operating system. 
  19.  
  20. Beginning with this release, Microsoft SQL Server version 
  21. 4.21A is available in two package configurations: Microsoft 
  22. SQL Server and Microsoft SQL Server Workstation System. 
  23. Microsoft SQL Server and SQL Server users are now licensed 
  24. separately from one another. You must acquire separate user 
  25. licenses for each user who wants to access SQL Server; an 
  26. administrative-use license to install and configure SQL 
  27. Server is included. For Microsoft SQL Server Workstation 
  28. System, no separate user license is needed.
  29.  
  30. Also provided with this release are some additional 
  31. diskettes (this additional software is not provided on 
  32. the Microsoft SQL Server CD-ROM): 
  33.  
  34. -  Supplemental Services. For Intel(R)-, MIPS(R)-, and Alpha 
  35.    AXP(TM)-based computers, this disk provides Net-Libraries 
  36.    for DECnet(TM) sockets and for AppleTalk(R) (ADSP). 
  37.    The DECnet sockets Net-Libraries allow VMS(TM) clients 
  38.    using DECnet to access SQL Server, and the AppleTalk 
  39.    Net-Libraries allow Apple(R) Macintosh(R)-based clients 
  40.    to connect to SQL Server via AppleTalk. For more 
  41.    information, see the README.TXT file included on the disk.
  42.  
  43. -  ODBC 2.0. This disk provides ODBC client computer support 
  44.    only for Intel-based computers. It includes the Open Database 
  45.    Connectivity (ODBC) Driver Manager, SQL Server ODBC client 
  46.    drivers for Win32(R) and Win16, and online Help.
  47.  
  48.    To install ODBC drivers on Microsoft Windows(TM) version 
  49.    3.1 clients, use either File Manager or Program Manager 
  50.    to run Setup from the root directory of the ODBC 2.0 disk. 
  51.    This installs the Win16 driver, plus a special 32-bit 
  52.    version of the ODBC Driver Manager that allows Win32S 
  53.    applications to access the 16-bit driver. To install ODBC 
  54.    drivers on Windows NT version 3.1 or 3.5 clients, run Setup 
  55.    from the \32i directory of the ODBC 2.0 disk. If you will 
  56.    be running 16-bit applications in the Windows on Win32 
  57.    (WOW) subsystem of Windows NT, run both versions of Setup.
  58.   
  59.    For more information, see the ODBC online Help.
  60.  
  61. *****Microsoft SQL Server and Microsoft SQL Server Workstation System*****
  62.  
  63. Microsoft SQL Server version 4.21A is available in two package 
  64. configurations:
  65.  
  66. -  Microsoft SQL Server is a relational database management 
  67.    system that is capable (depending on your application 
  68.    and hardware environment) of supporting hundreds of 
  69.    simultaneous users.
  70.  
  71. -  Microsoft SQL Server Workstation System has the same features 
  72.    and functionality as Microsoft SQL Server, except that it is a 
  73.    single-user licensed product that supports a maximum of 15 
  74.    simultaneous database connections.
  75.  
  76. *****Install SQL Server on Windows NT Server Version 3.5*****
  77.  
  78. For Windows NT version 3.5, Microsoft SQL Server should be 
  79. installed on a computer running the Windows NT Server operating 
  80. system. SQL Server is not supported for installation on a computer 
  81. running Windows NT Workstation version 3.5. Windows NT Server 
  82. is optimized for server functions and offers better performance, 
  83. scalability, and capacity than Windows NT Workstation.
  84.  
  85. Microsoft SQL Server is not recommended for installation 
  86. on a Primary Domain Controller or a Backup Domain Controller 
  87. because those computers perform the resource-intensive tasks 
  88. of maintaining and replicating the network accounts database 
  89. and performing network login authentications. 
  90.  
  91. For Windows NT version 3.5, Microsoft SQL Server Workstation 
  92. System can be installed on a computer running either the Windows 
  93. NT Workstation or Windows NT Server operating system.
  94.  
  95. Note that SQL Server and SQL Server Workstation System are 
  96. both compatible with Windows NT version 3.1 and Windows NT 
  97. Advanced Server version 3.1.
  98.  
  99. *****Setting Frame Types for NWLink IPX/SPX*****
  100.  
  101. In order to establish and maintain connections, SQL 
  102. Servers and clients communicating via the NWLink 
  103. IPX/SPX protocol must be configured to use the same 
  104. frame type. The most commonly used frame types for 
  105. Ethernet are 802.3 and 802.2. Windows NT version 
  106. 3.5 offers an auto-detect option that in most cases 
  107. properly configures a server or workstation for the 
  108. appropriate frame type.
  109.  
  110. In some rare situations, especially on networks with 
  111. mixed Novell(R) server versions or with clients 
  112. running various frame types, you might encounter 
  113. difficulty establishing connections between SQL 
  114. Server clients and servers when the Windows NT 
  115. version 3.5-based computers are configured for 
  116. frame type auto-detect. If this occurs, you can 
  117. configure the Windows NT version 3.5-based computers 
  118. for specific frame types.
  119.  
  120. Note: Computers running the Windows NT Server operating 
  121. system can be configured for multiple frame types. 
  122. Computers running the Windows NT Workstation operating 
  123. system can be configured only for a single frame type.
  124.  
  125. First, determine what frame type(s) you will 
  126. use. Check what frame type other network clients are 
  127. using (you may want to set your Windows NT version 
  128. 3.5-based computers to that frame type). For Ethernet, 
  129. you will usually use frame type 802.2 for networks 
  130. with servers running NetWare(R) version 3.12 or 
  131. later, and frame type 802.3 for networks with 
  132. other configurations.
  133.  
  134. To set frame types on each computer running Windows 
  135. NT Server version 3.5:
  136.  
  137. 1. From the Control Panel, choose the Network application. 
  138.    The Network Settings dialog box appears. 
  139. 2. From the Installed Software list, select NWLink 
  140.    IPX/SPX Compatible Transport, and then choose 
  141.    Configure. The NWLink IPX/SPX Protocol Configuration 
  142.    dialog box appears. 
  143. 3. Select the Manual Frame Type Detection option, select 
  144.    one or more frame types from the list, and then 
  145.    choose the Add button.
  146. 4. Choose OK. The Network Settings dialog box returns.
  147. 5. Choose OK. The Control Panel returns. Close the 
  148.    Control Panel.
  149.  
  150. To set a frame type on each computer running Windows 
  151. NT Workstation version 3.5:
  152.  
  153. 1. From the Control Panel, choose the Network application. 
  154.    The Network Settings dialog box appears. 
  155. 2. From the Installed Software list, select NWLink 
  156.    IPX/SPX Compatible Transport, and then choose Configure. 
  157.    The NWLink IPX/SPX Protocol Configuration dialog box 
  158.    appears. 
  159. 3. In the Frame Type box, select the appropriate frame 
  160.    type (you may choose only one), and then choose OK. 
  161.    The Network Settings dialog box returns.
  162. 4. Choose OK. The Control Panel returns. Close the 
  163.    Control Panel.
  164.  
  165. For additional information on frame types, choose the 
  166. Help button from the NWLink IPX/SPX Protocol 
  167. Configuration dialog box.
  168.  
  169. *****SQL Server and DHCP Servers*****
  170.  
  171. Windows NT version 3.5 provides easy administration of large TCP/IP 
  172. networks by offering the Dynamic Host Configuration Protocol (DHCP) 
  173. service for automatic TCP/IP configuration. Windows Internet Name Service 
  174. (WINS) provides dynamic mapping of network names and addresses, enabling 
  175. users to operate in large scale TCP/IP networking environments with little 
  176. administrative support. 
  177.  
  178. When using the DHCP service, computers are automatically assigned a 
  179. "leased" (temporary) IP address by the DHCP server. Leases have an 
  180. expiration date and time, but if the computer is available on the network 
  181. when the lease expires, the leased IP address is automatically renewed. 
  182. However, if a computer is not available on the network when the lease 
  183. expires (for example, if it is turned off), the DHCP server can cancel 
  184. the lease and that address becomes available to any computer needing a 
  185. lease. When the original computer again becomes available on the network 
  186. it is assigned an IP address that may be different from its previous IP 
  187. address.
  188.  
  189. For SQL Server, this means that on rare occasions the IP address of a 
  190. server might change (usually, only if the server was turned off at the 
  191. time the IP address lease expired). If you occasionally encounter problems 
  192. with dropped client-server connections when using the DHCP service on 
  193. Windows NT version 3.5, you can assign reserved IP addresses to the 
  194. computers running SQL Server. (This is necessary only for servers, not 
  195. clients.)
  196.  
  197. Instructions for setting a reserved IP address can be found in Chapter 
  198. 4, "Installing and Configuring DHCP Servers," in "Microsoft Windows 
  199. NT Server TCP/IP," available with Windows NT Server. 
  200.  
  201. Instructions for setting a reserved IP address are also available from 
  202. the DHCP Manager online Help file. You can start DHCP Manager on the 
  203. DHCP server by choosing its icon from the Network Administration Tools 
  204. group in Program Manager. View the online instructions by selecting the 
  205. Help menu, choosing Contents, choosing "Administering DHCP Clients," and 
  206. then choosing "Managing Client Reservations."
  207.  
  208. *****Using Dump Devices on a NetWare Server*****
  209.  
  210. The Client Service for NetWare allows a Windows NT 
  211. Server version 3.5 to access files on a NetWare file 
  212. server. If you want to use a file on a NetWare server 
  213. as a disk dump device for SQL Server, you must:
  214.  
  215. 1. Run SQL Server as a service under a Windows NT user 
  216.    account that matches the user ID and password of a 
  217.    valid NetWare user. You cannot run SQL Server as a 
  218.    service under the LocalSystem account. 
  219.  
  220.    For information on how to set this up, see "Configuring 
  221.    Network Permissions for SQL Server," in Chapter 2 of the 
  222.    Microsoft SQL Server Configuration Guide (page 64).
  223.  
  224. 2. Identify the network share point of the dump device 
  225.    using UNC naming rather than drive letters. For 
  226.    example, the following command would be valid:
  227.  
  228.     sp_addumpdevice 'disk','netware_dump',
  229.     '\\netware1\big_disk\dumpdir\dumpfile.dat', 2
  230.  
  231.    Note: In the above command, you cannot use a drive 
  232.    letter ("n:") in place of the UNC designation for the
  233.    drive and dump share ("\\netware1\big_disk").
  234.  
  235. *****Running SQLMail on Windows NT Server Version 3.5*****
  236.  
  237. With Windows NT Server version 3.5, SQL Server can 
  238. run as a service in a user account and use SQLMail 
  239. functionality. If you run SQL Server in the LocalSystem 
  240. account on Windows NT Server version 3.5, then in the Services 
  241. application in the Windows NT Control Panel, in the Startup 
  242. dialog box, you should select the option Allow Service To 
  243. Interact With Desktop.
  244.  
  245. ------------------------------------------------------------------------
  246. Installing or Upgrading
  247. ------------------------------------------------------------------------
  248. To install Microsoft SQL Server version 4.21A, run the 
  249. Setup program and choose the Install SQL Server And Utilities 
  250. option. To upgrade a previous version of Microsoft SQL Server 
  251. to version 4.21A, run the Setup program and choose the Upgrade 
  252. SQL Server option.
  253.  
  254. The CD-ROM disc contains three separate SETUP directories, 
  255. one for Intel-based computers (the \I386 directory), one for 
  256. MIPS-based computers (the \MIPS directory), and one for Alpha 
  257. AXP-based computers (the \ALPHA directory). SQL Server 
  258. must be installed from the directory containing the software 
  259. compatible with your hardware platform. You cannot use a 
  260. different processor architectureÆs Setup program to install SQL 
  261. Server.
  262.  
  263. For detailed installation instructions, see the Setup program's 
  264. online Help or the Microsoft SQL Server Configuration Guide.
  265. Note that the printed SQL Server documentation is the same 
  266. for versions 4.2, 4.21, and 4.21A.
  267.  
  268. ------------------------------------------------------------------------
  269. If You Have a Beta Version of SQL Server for the Alpha AXP Platform
  270. ------------------------------------------------------------------------
  271. If you have a Beta version of Microsoft SQL Server for an 
  272. Alpha AXP-based computer, you must newly install this release.
  273.  
  274. This release includes a CD-ROM disc for installing SQL Server. Note that 
  275. the CD-ROM disc contains three separate SETUP directories, one for 
  276. MIPS-based computers, one for Intel-based computers, and one for Alpha 
  277. AXP-based computers. Be sure you set up SQL Server using the directory 
  278. for Alpha AXP-based computers (the \ALPHA directory). You cannot use 
  279. a different processor architecture's Setup program to install SQL Server.
  280.  
  281. ------------------------------------------------------------------------
  282. Migrating Data Between RISC and Intel Architectures
  283. ------------------------------------------------------------------------
  284. It is not possible to dump a database in one processor architecture and 
  285. load it in another. Even if the operation appears to succeed, serious 
  286. problems will subsequently result. You also should not run the Setup 
  287. program to perform an upgrade from a database environment that existed
  288. on a different computer. For example, you cannot dump a database from 
  289. an Alpha AXP-based computer and load it into an Intel-based computer. Nor 
  290. should you copy your MASTER.DAT from an Intel-based computer to a 
  291. MIPS- or Alpha AXP-based computer and run Setup to upgrade it. (However,
  292. you can use SQL Transfer Manager, provided with Microsoft SQL Server 
  293. version 4.21A, to transfer the data from one architecture 
  294. to another.)
  295.  
  296. ------------------------------------------------------------------------
  297. Microsoft SQL Server Adds SQLMail Functionality
  298. ------------------------------------------------------------------------
  299. With version 4.21, SQL Server includes extended stored procedures that 
  300. allow SQL Server to send messages through the built-in mail application 
  301. programming interface (MAPI) client interface in Windows NT. These 
  302. messages can consist of short text strings, the output from a query, or 
  303. an attached file. You can send messages from within a trigger or a 
  304. stored procedure. (For example, you can send an alert when changes 
  305. occur in the database.) Mail functionality has also been integrated 
  306. with SQL Monitor and SQL Administrator scheduled backups. You can use 
  307. this capability with SQL Administrator's scheduled backup feature to 
  308. enable SQL Monitor to notify a list of recipients when backups occur 
  309. and if errors occur during a backup. In addition, you can use the 
  310. SQLMail feature to notify you when long-running processes, such as 
  311. data downloads, are complete. 
  312.  
  313. A new DLL, SQLMAPI.DLL, is installed with SQL Server and includes the 
  314. extended stored procedures necessary for mail enabling. You enable the 
  315. SQLMail functionality through the Set Server Options dialog box in the 
  316. Setup program. You can start and stop mail or send a message by using 
  317. the new extended stored procedures (documented below). You can also 
  318. automatically start mail when you start SQL Server by setting 
  319. AutoStart Mail Client in the Set Server Options dialog box. For more 
  320. information about enabling SQLMail, see the online Help included with 
  321. the Setup program. Note that before you enable SQLMail you should ensure 
  322. that the Mail client interface in Windows NT is set up and working and that 
  323. you can send an ordinary mail message to the intended recipients of SQLMail 
  324. messages. For more information about the Mail client 
  325. interface, see your documentation for Microsoft Windows NT.
  326.  
  327. *****SQLMail Extended Stored Procedures*****
  328.  
  329. This section explains the extended stored procedures for SQLMail:
  330.  xp_startmail, xp_stopmail, and xp_sendmail.
  331.  
  332.  
  333. ----------------
  334. xp_startmail
  335. Starts a SQL Server Microsoft Mail client session.
  336.  
  337. Syntax:
  338. xp_startmail ['@user'] [, '@password']
  339.  
  340. where
  341.  
  342. @user
  343. Is an optional parameter that specifies the mail user name.
  344.  
  345. @password 
  346. Is an optional parameter that specifies the mail password.
  347.  
  348. Remarks:
  349. SQL Server attempts to log in to Microsoft Mail using the name and 
  350. password specified. If no name or password is supplied, SQL Server 
  351. uses the name and password specified in the Mail Login dialog box 
  352. under Set Server Options in Setup. If no name and password are specified
  353. in the Mail Login dialog box, or if they are incorrect, you will 
  354. receive error 17903 "MAPI login failure" in the Windows NT Event Log 
  355. and/or the SQL Server error log. 
  356.  
  357. Even if you don't use the Mail Login dialog box to save your Mail user 
  358. name and password, you must select the Copy SQLMail Configuration 
  359. From Current User Account option in the Mail Login dialog box to set up 
  360. SQLMail for the first time.
  361.  
  362. If Mail is already running on the workstation, SQL Server "piggybacks" 
  363. on that instance of Mail instead of starting one of its own.
  364.  
  365. Example:
  366. xp_startmail 'sqluser', 'sqlpassword'
  367.  
  368. Messages:
  369. Msg 17952 "Failed to start Microsoft Mail session. Check the errorlog 
  370. file in the SQL Server directory for details."
  371. The name and/or password you have typed (either in the Mail Login 
  372. dialog box, or as parameters to xp_startmail) could be incorrect. Check 
  373. that you are using the correct name and/or password and that you have 
  374. typed them correctly. Make sure that you can run a regular Microsoft 
  375. Mail session using that user name and password. Also make sure that 
  376. you have selected the Copy SQLMail Configuration from Current 
  377. User Account option in the  Mail Login dialog box after you have your 
  378. Microsoft Mail client session working.
  379.  
  380. "Microsoft Mail session is already started."
  381. A Microsoft Mail session is already started; SQL Server will not start 
  382. one of its own.
  383.  
  384. Permission:
  385. Execute permission defaults to the system administrator, who can grant 
  386. permission to others.
  387.  
  388. See Also:
  389. xp_sendmail, xp_stopmail
  390.  
  391. ----------------
  392. xp_stopmail
  393. Stops a SQL Server Microsoft Mail client session.
  394.  
  395. Syntax:
  396. xp_stopmail
  397.  
  398. Messages:
  399. Msg 17966 "Microsoft Mail session is not started."
  400. There is no existing SQL Server mail session to stop.
  401.  
  402. Permission:
  403. Execute permission defaults to the system administrator, who can grant 
  404. permission to others.
  405.  
  406. See Also:
  407. xp_sendmail, xp_startmail
  408.  
  409. -----------------
  410. xp_sendmail
  411. Sends a message, and/or a query result set, and/or an attachment to the 
  412. specified recipients.
  413.  
  414. Syntax:
  415. xp_sendmail @recipients, [@message] [, @query] [, @attachments] 
  416. [, @copy_recipients] [, @blind_copy_recipients] [, @subject] [, @type] 
  417. [, @attach_results] [, @no_output] [, @no_header] [, @width]
  418.  
  419. where
  420.  
  421. @recipients
  422. Is a required parameter specifying the names of the people you are 
  423. sending the mail to. If you specify more than one name, separate the
  424. names by semicolons (;).
  425.  
  426. @message
  427. Is an optional parameter that specifies the message to be sent. You 
  428. must specify @message, @query, or @attachments.
  429.  
  430. @query
  431. Is an optional parameter that specifies a valid SQL Server query, the 
  432. result of which will be sent in mail. You must specify @query, @message,
  433. or @attachments.
  434.  
  435. @attachments
  436. Is an optional parameter that specifies a file to attach to the mail. 
  437. You must specify @attachments, @query, or @message.
  438.  
  439. @copy_recipients
  440. Is an optional parameter that identifies other recipients you are 
  441. sending the mail to.
  442.  
  443. @blind_copy_recipients
  444. Is an optional parameter that identifies other recipients you are 
  445. sending a blind copy of the mail to.
  446.  
  447. @subject
  448. Is an optional parameter that specifies the subject of the mail. If you 
  449. do not specify a subject, "SQL Server Message" is used as the subject.
  450.  
  451. @type
  452. Is an optional parameter that sets a custom message type of the mail 
  453. message. Custom message types are of the form
  454.  
  455. IP<MIC>.VendorName.subclass
  456.  
  457. A message type beginning with IPM (interpersonal message) will appear 
  458. in the recipients' Inbox; a message type beginning with IPC will not 
  459. appear in the Inbox and must be read by a custom MAPI application. The 
  460. default is Microsoft Mail's IPM type. See the "Windows NT Resource Guide"
  461. or the "Microsoft Mail Technical Reference" (available separately) for 
  462. more information about using custom message types.
  463.  
  464. @attach_results
  465. Is an optional parameter that specifies that the results set of a query 
  466. should be sent in mail as an attached text file (.TXT) instead of 
  467. appended to the mail. The default association for a .TXT file is Notepad,
  468. but a different association can be specified using File Manager. 
  469. The default for this parameter is False, which means that the results 
  470. set is appended to the message.
  471.  
  472. @no_output
  473. Is an optional parameter that sends the mail but does not return any 
  474. output to the SQL Server client session that sent the mail. The 
  475. default value is False, which means that the SQL 
  476. Server client session receives output.
  477.  
  478. @no_header
  479. Is an optional parameter that sends the query results in mail but does 
  480. not send column header information with the query results. The default 
  481. is False, which means that column header information is sent with the 
  482. query results.
  483.  
  484. @width
  485. Is an optional parameter that sets the line width of the output text 
  486. for an @query message. This parameter is identical to the /w parameter 
  487. in ISQL. For queries that produce long output rows, use @width together 
  488. with @attach_results to send the output without line breaks in the 
  489. middle of output lines. The default width is 80 characters.
  490.  
  491. Remarks:
  492. The SQLMail session must be started prior to executing xp_sendmail. 
  493. Sessions can be started either automatically (using the Auto Start Mail 
  494. Client option in the Set Server Options dialog box of Setup) or with 
  495. xp_startmail. One SQLMail session supports all users on the SQL Server, 
  496. but only one user at a time can send a message. Other users will 
  497. automatically wait their turn until the first user's message is sent.
  498.  
  499. If @query is specified, xp_sendmail logs in to SQL Server as a client
  500. and executes the specified query. SQLMail makes a separate connection 
  501. to SQL Server; it does not share the same connection as the original 
  502. client connection that issued xp_sendmail. Note that the @query can be 
  503. blocked by a lock held by the client connection that issued xp_sendmail.
  504. For example, if you are updating a table within a transaction and you 
  505. create a trigger for that update that attempts to select the updated 
  506. row information as the @query parameter, the SQLMail connection will 
  507. be blocked by the exclusive lock held on that row by the initial client 
  508. connection. 
  509.  
  510. Examples:
  511. A. xp_sendmail 'user1', 'The master database is full.'
  512. This example sends a message to user1 that the master database is full.
  513.  
  514. B. xp_sendmail @recipients = 'user1;user2', @message = 'The master 
  515.     database is full.', @copy_recipients = 'user3;user4', 
  516.     @subject = 'Master Database Status'
  517. This example sends the message to user1 and user2, with copies sent to 
  518. user3 and user4. It also specifies a subject line for the message.
  519.  
  520. C. xp_sendmail 'user1', @query = 'sp_configure'
  521. This example sends the results of the stored procedure sp_configure 
  522. to user1.
  523.  
  524. D. xp_sendmail @recipients = 'user1', @query = 'select * from sysobjects', 
  525.     @subject = 'SQL Server Report', @message = 'The contents of sysobjects:', 
  526.     @attach_results = 'True', @width = 250
  527. This example sends the results of the query 'select * from sysobjects' 
  528. as a text file attachment to user1. It includes a subject line for the 
  529. mail and a message that will appear before the attachment. The @width 
  530. option is used to prevent line breaks in the output lines.
  531.  
  532. E. create table #texttab (c1 text)
  533.     insert #texttab values ('Put your long message here.')
  534.     declare @cmd varchar(56)
  535.     declare @tabname sysname(30)
  536.     select @tabname = name from tempdb.dbo.sysobjects
  537.         where name like '#texttab%' +
  538.         convert (varchar(5), @@spid) + '%'
  539.     select @cmd = 'select c1 from tempdb.dbo.' + @tabname
  540.     exec master.dbo.xp_sendmail
  541.         'user1', @query = @cmd, @no_header= 'True'
  542.     drop table #texttab
  543. This example shows how to send a message longer than 255 characters. 
  544. Because the @message parameter is limited to the length of a VARCHAR 
  545. (as are all stored procedure parameters), this example writes the long 
  546. message into a temporary table consisting of a single text column. The 
  547. contents of this temporary table are then sent in mail using 
  548. the @query parameter. The @query parameter makes a separate connection,
  549. so the name of the temporary table must be retrieved from the 
  550. sysobjects table in tempdb.
  551.  
  552. Messages:
  553. Msg 17914 "An invalid recipient was specified."
  554. One or more of the recipients you specified could not be found.
  555.  
  556. If SQL Server detects an error when executing the @query statement, you 
  557. will receive the full error message at the client, as if you had 
  558. executed the query directly. Possible errors include Msg 229 "SELECT 
  559. permission denied" and Msg 208 "Invalid object name." See the "Microsoft 
  560. SQL Server Transact-SQL Reference" for information on errors pertaining 
  561. to specific query statements.
  562.  
  563. Permission:
  564. Execute permission defaults to the system administrator, who can grant 
  565. permission to others.
  566.  
  567. See Also:
  568. xp_startmail, xp_stopmail
  569.  
  570. ------------------------------------------------------------------------
  571. Microsoft SQL Server Network Support
  572. ------------------------------------------------------------------------
  573.  
  574. *****Banyan(R) VINES(R) Support*****
  575.  
  576. Banyan VINES support for Windows NT-based clients and servers is 
  577. available only for SQL Server on the Intel platform; it is not 
  578. currently available on the MIPS or Alpha AXP platforms.
  579.  
  580. *****SQL Administrator Communication with SQL Monitor*****
  581.  
  582. SQL Administrator must communicate with SQL Monitor to complete tasks 
  583. such as scheduled backups. SQL Administrator uses configuration entries 
  584. to determine how to connect to SQL Monitor. If you use the default 
  585. Net-Library, SQL Administrator will usually be able to connect to 
  586. SQL Monitor using the defaults, and you will not need to adjust these 
  587. configuration entries. If you are connecting to SQL Server using a 
  588. logical server name (set up using the Advanced button of the SQL Client 
  589. Configuration Utility) you will need to configure these entries using a 
  590. text editor in Microsoft Windows(TM) or the Registry Editor in 
  591. Windows NT.
  592.  
  593. For clients running Windows, the SQL Server Setup program puts the 
  594. following default lines in the [SQLMONITOR] section of WIN.INI: 
  595.  
  596.     dbnmp3=?1:\\?1\pipe\winsql\backup
  597.     dbmsspx3=?1:?1_mon
  598.     dbmsvin3=?1@?2:?1_mon?2
  599.     dbmssoc3=?1,?2:?1,1434
  600.  
  601. For clients running Windows NT, the SQL Server Setup program puts the 
  602. following default REG_SZ values in the 
  603. HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SQLServer\Client\Monitor key 
  604. of the Windows NT Registry:
  605.  
  606.     dbnmpntw    ?1:\\?1\pipe\winsql\backup
  607.     dbmsspxn    ?1:?1_mon
  608.     dbmsvinn    ?1@?2:?1_mon?2
  609.     dbmssocn    ?1,?2:?1,1434
  610.  
  611. These entries describe the default rules for each Net-Library that 
  612. SQL Administrator uses to build a SQL Monitor connection string from 
  613. the SQL Server name. You can override these rules by using a 
  614. configuration entry that matches the SQL Server name. If 
  615. SQL Administrator finds an entry that matches the SQL Server name, it 
  616. will use that entry to attempt to connect to SQL Monitor. If no entries 
  617. match the SQL Server name, SQL Monitor will use the default rules.
  618.  
  619. To override the default rules for a specific SQL Server, directly 
  620. specify a SQL Monitor connection string using the following format:
  621.  
  622.     <servername>=<netlib_name>,<monitor_connection_string>
  623.  
  624.     where
  625.  
  626.     <servername>
  627.     Is the SQL Server name.
  628.  
  629.     <netlib_name>
  630.     Is the name of the Net-Library file (not including the .DLL
  631.     extension) used to communicate with SQL Monitor.
  632.  
  633.     <monitor_connection_string>
  634.     Specifies what value SQL Monitor is listening on.
  635.  
  636. For example, to use the default SQL Monitor named pipe when
  637. connecting to a SQL Server named GIZMO from Microsoft SQL 
  638. Administrator:
  639.  
  640.         gizmo=\\gizmo\pipe\winsql\backup
  641.  
  642. You can modify the default rules if they don't fit your environment. To 
  643. specify a rule for building the SQL Monitor connection string given a 
  644. specified SQL Server name, use the following format:
  645.  
  646.     <netlib_name>=<server_source_template>:<monitor_subst_template>
  647.  
  648.     where
  649.  
  650.     <netlib_name>
  651.     Is the name of the default Net-Library file (not including the .DLL
  652.     extension) used by the client.
  653.  
  654.     <server_source_template>
  655.     Is a string template for the SQL Server name. This template can
  656.     contain up to nine tagged expressions. Each tagged expression uses
  657.     the format:
  658.  
  659.         ?<n>[<string>]
  660.  
  661.         where
  662.  
  663.         <n>
  664.         Is a single digit 1 through 9.
  665.  
  666.         <string>
  667.         Is an optional case-sensitive string of zero or more
  668.         characters to be searched for in the SQL Server name. This
  669.         string terminates at the next '?' in the
  670.         <server_source_template> or at the end of the SQL Server name.
  671.  
  672.     The SQL Server name is parsed to build the tagged expressions.
  673.     All characters up to, but not including, <string> are included
  674.     in a tagged expression. Any subsequent portions of the
  675.     SQL Server name include <string>.
  676.  
  677.     For example, given the following <server_source_template>:
  678.  
  679.         ?1xxx?2
  680.  
  681.     If the specified SQL Server name is AAAxxxBBB, then the following
  682.     tags would be built:
  683.  
  684.         ?1 = AAA
  685.         ?2 = xxxBBB
  686.  
  687.     <monitor_subst_template>
  688.     Is the substitution template, used with the above tagged
  689.     expressions, to build the SQL Monitor connection string. This string
  690.     can contain tagged expressions using the format ?<n>.
  691.  
  692.     Each tagged expression is substituted with the corresponding
  693.     tags built from the <server_source_template>. Any characters
  694.     other than ?<n> are used directly to construct the SQL Monitor
  695.     connection string.
  696.  
  697.     Using the example above, and given the following
  698.     <monitor_subst_template>:
  699.  
  700.         ?1_mon@test_?2
  701.  
  702.     the resulting SQL Monitor connection string would be:
  703.  
  704.         AAA_mon@test_xxxBBB
  705.  
  706. *****TCP/IP Windows Sockets Client Support*****
  707.  
  708. For clients running Windows for Workgroups or Windows NT, 
  709. SQL Server supports client communication using standard 
  710. Windows Sockets as the IPC method across the TCP/IP protocol.
  711.  
  712. The following client Net-Library files, supported for connecting 
  713. only to Microsoft SQL Server, are provided with SQL Server:
  714.  
  715. - DBMSSOCN.DLL. Windows NT-based Windows Sockets client. 
  716.   The Windows Sockets Net-Library for Windows NT is supported 
  717.   on Windows NT Server version 3.5, Windows NT Workstation 
  718.   version 3.5, Windows NT Advanced Server version 3.1, and 
  719.   Windows NT version 3.1. 
  720.  
  721. - DBMSSOC3.DLL. Windows-based Windows Sockets client. The 
  722.   Windows Sockets Net-Library for Windows is supported on 
  723.   Windows for Workgroups version 3.11 with Microsoft TCP/IP 
  724.   for Windows for Workgroups version 1.0 and on Windows for 
  725.   Workgroups version 3.11 with the new Microsoft TCP/IP-32 for 
  726.   Windows for Workgroups 3.11.
  727.  
  728.   The Windows Sockets Net-Library for Windows is also supported 
  729.   on the Windows 3.1 environment (WOW) of Windows NT Server 
  730.   version 3.5, Windows NT Workstation version 3.5, Windows NT 
  731.   Advanced Server version 3.1, and Windows NT version 3.1
  732.  
  733.   Note: Windows clients running the new Microsoft TCP/IP-32 for 
  734.   Windows for Workgroups 3.11 stack and attempting socket 
  735.   connections to the server must upgrade to the newest 
  736.   DBMSSOC3.DLL, which is included with SQL Server version 4.21A.
  737.  
  738. - DBMSSOC.EXE. MS-DOS-based Microsoft TCP/IP socket client. The 
  739.   Microsoft TCP/IP socket Net-Library for MS-DOS is supported 
  740.   for MS-DOS-based applications running on Windows for Workgroups 
  741.   3.11 with Microsoft TCP/IP for Windows for Workgroups version 
  742.   1.0. It is not supported for the MS-DOS environment of Windows 
  743.   NT version 3.1, nor with the new Microsoft TCP/IP-32 for Windows 
  744.   for Workgroups 3.11 (because these environments support only the 
  745.   Windows Sockets specification).
  746.  
  747. The Windows Sockets Net-Libraries have been extensively tested on 
  748. the supported platforms for connecting to Microsoft SQL Server. 
  749. Support for other TCP/IP protocols that support Windows 
  750. Sockets is planned for future releases. Using these Net-Libraries 
  751. with other TCP/IP protocols or to connect to other than Microsoft 
  752. SQL Server has not been extensively tested, and 
  753. their use in these ways is not guaranteed. Any feedback you have 
  754. on the Windows Sockets Net-Libraries is welcome on the Microsoft 
  755. SQL Server (GO MSSQL) forum on CompuServe(R).
  756.  
  757. -----------------
  758. New TCP/IP-32 Protocol Stack for Windows for Workgroups Clients
  759.  
  760. A new client protocol stack, Microsoft TCP/IP-32 for Windows 
  761. for Workgroups 3.11, is distributed with Windows NT Server 
  762. version 3.5 (and will also be made available by Microsoft 
  763. from other distribution sources). It allows Windows for 
  764. Workgroups clients to upgrade to the improved 32-bit protected 
  765. mode stack and take advantage of new TCP/IP services provided 
  766. by Windows NT Server version 3.5 (such as the new DHCP and WINS 
  767. services).
  768.  
  769. Note: This protocol stack does not support the real-mode sockets 
  770. as implemented in earlier versions of TCP/IP for Microsoft LAN 
  771. Manager and Windows. All socket support is provided through the 
  772. Windows Sockets specification. Because of this, DBMSSOC.EXE 
  773. (the MS-DOS-based Microsoft TCP/IP socket client Net-Library) is 
  774. not supported in this configuration.
  775.  
  776. Windows clients running the new Microsoft TCP/IP-32 for 
  777. Windows for Workgroups 3.11 stack and attempting socket 
  778. connections to the server must upgrade to the newest 
  779. DBMSSOC3.DLL, which is included with SQL Server version 4.21A.
  780.  
  781. -----------------
  782. Simplified System Administration Using DHCP and WINS
  783.  
  784. Windows NT version 3.5 provides for easy administration 
  785. of large TCP/IP networks by offering the Dynamic Host 
  786. Configuration Protocol (DHCP) service for automatic TCP/IP 
  787. configuration, and the Windows Internet Name Service (WINS) 
  788. for dynamic mapping of network names and addresses. This 
  789. enables users to operate in large scale TCP/IP networking 
  790. environments with little administrative support. (For 
  791. information on configuring clients, see Client 
  792. Configuration, below.)
  793.  
  794. Note that to take advantage of the DHCP and WINS services 
  795. a Windows for Workgroups client must be using the new 
  796. TCP/IP-32 protocol stack and must have these services enabled.
  797.  
  798. -----------------
  799. Client Configuration
  800.  
  801. To configure a client running Windows or Windows NT to use 
  802. the Windows Sockets Net-Library, follow the steps under 
  803. "Setting Up Server Connections" in Chapter 3 of the Microsoft 
  804. SQL Server Configuration Guide (page 94). In the DLL Name box, 
  805. type the appropriate Windows Socket Net-Library name (DBMSSOCN for 
  806. Windows NT, DBMSSOC3 for Windows). The Connection String 
  807. uses the format:
  808.  
  809.    <ip_address>,[<socket_number>]
  810.  
  811. where <ip_address> is the IP address of the computer 
  812. running SQL Server, and <socket_number> is the optional 
  813. socket number that SQL Server is listening on.
  814.  
  815. It is also possible to configure a client running Windows 
  816. or Windows NT to use the Windows Sockets Net-Library by 
  817. default. From the SQL Client Configuration Utility, in 
  818. the Default Network box select TCP/IP Sockets. Using this 
  819. method, connections can be established by using the 
  820. <ip_address>,[<socket_number>] directly as the SQL Server 
  821. name, or by using a server name with the format:
  822.  
  823.    <host_name>,[<socket_number>]
  824.  
  825. where <host_name> is a TCP/IP host name that has been 
  826. defined in the client HOSTS file or on a Domain Name Service 
  827. (DNS), or is the machine name of a Windows NT Server 
  828. running SQL Server if WINS is enabled, and <socket_number> 
  829. is the optional socket number that SQL Server is listening 
  830. on. For a client running Windows for Workgroups, the HOSTS 
  831. file is located in the \WINDOWS directory by default. For 
  832. a client running Windows NT, the HOSTS file is located in 
  833. the \WINDOWS\SYSTEM32\DRIVERS\ETC directory by default. For 
  834. other TCP/IP protocols that support Windows Sockets, see 
  835. your TCP/IP documentation.
  836.  
  837. To configure a client running MS-DOS to use the Microsoft 
  838. TCP/IP sockets Net-Library, you use an environment variable 
  839. before loading the Net-Library TSR (DBMSSOC.EXE). The 
  840. environment variable <server> is a logical server name, 
  841. and is set using this format:
  842.  
  843.    set <server>=<ip_address>,[<socket_number>]
  844.  
  845. In all cases, if the <socket_number> is not specified, the 
  846. Net-Library uses 1433, the official Internet Assigned Number 
  847. Authority (IANA) socket number for Microsoft SQL Server. Because 
  848. this official IANA socket number was not available at the time, 
  849. SQL Server version 4.2 used a temporary TCP/IP 
  850. socket number of 3180 by default.
  851.  
  852. -----------------
  853. Memory Considerations Using TCP/IP for Windows for Workgroups Version 1.0
  854.  
  855. The Microsoft TCP/IP for Windows for Workgroups WINSOCK.DLL 
  856. requires 47K of low memory, 1.6K of low memory per socket 
  857. defined, and 32K of low memory per socket opened. If 
  858. available low memory becomes insufficient or fragmented, 
  859. you might see the error "There is not enough DOS memory 
  860. allocated for DOS buffers for all sockets" when attempting 
  861. to open a socket connection. If this error occurs, try closing 
  862. some applications, configuring your system to make more 
  863. conventional memory available, or reducing the number of 
  864. available sockets. Although Microsoft TCP/IP for Windows 
  865. for Workgroups supports up to 21 sockets, it is recommended 
  866. that you set this value to a realistic number of concurrent 
  867. SQL Server connections.
  868.  
  869. Note that this applies to clients using Microsoft TCP/IP for 
  870. Windows for Workgroups version 1.0. These considerations can 
  871. be avoided by upgrading to the new Microsoft TCP/IP-32 for 
  872. Windows for Workgroups 3.11.
  873.  
  874. *****Windows for Workgroups Clients on Novell NetWare Networks*****
  875.  
  876. Microsoft Windows for Workgroups version 3.11 enhances the network 
  877. integration available with Novell NetWare by offering peer network 
  878. functionality and connectivity to computers running Windows NT. 
  879. SQL Server clients running Windows for Workgroups can be configured 
  880. in several ways using the Network Setup application.
  881.  
  882. If only Windows support for Novell NetWare is installed (and Microsoft 
  883. Windows Network is not installed), then you are using the Novell NetWare 
  884. IPX protocol (IPXODI). This protocol supports SPX as the IPC method for 
  885. connecting to SQL Server. This means that you should use the SQL Client 
  886. Configuration Utility to set the default network to Novell IPX/SPX. 
  887. This configuration will allow Windows for Workgroups to use the IPX/SPX 
  888. Net-Library to connect to SQL Server for Windows NT running NWLink, and 
  889. to connect to SQL Server for OS/2 running the Microsoft Network 
  890. Integration Kit for Novell NetWare Networks.
  891.  
  892. If only the Microsoft Windows Network is installed (and Windows support 
  893. for Novell NetWare is not installed), you can still use IPX to 
  894. connect to SQL Server for Windows NT. Use the Drivers button to ensure 
  895. that the IPX/SPX Compatible Transport With NetBIOS network protocol 
  896. is installed. This IPX protocol is included with Windows for Workgroups 
  897. 3.11 and is similar to Windows NT NWLink. This protocol supports named 
  898. pipes as the IPC method for connecting to SQL Server. This means that you 
  899. should use the SQL Client Configuration Utility to set the default 
  900. network to Named Pipes. This configuration will allow Windows for 
  901. Workgroups to use the named pipes Net-Library to connect to SQL Server 
  902. running NWLink. However, it will not connect to SQL Server 
  903. for OS/2, because Windows for Workgroups named pipes are not designed 
  904. to interoperate with Novell OS/2 Requestor named pipes.
  905.  
  906. If both the Microsoft Windows Network and Windows support for Novell 
  907. NetWare are installed, you can use either the named pipes or IPX/SPX 
  908. Net-Library to connect to SQL Server for Windows NT running NWLink, 
  909. or use the IPX/SPX Net-Library to connect to SQL Server for OS/2 running 
  910. the Network Integration Kit for Novell NetWare Networks.
  911.  
  912. It is recommended that the named pipes Net-Library be used, because 
  913. features such as integrated security and adjustable packet size are 
  914. available only with named pipes.
  915.  
  916. *****Updated Files Required for Windows for Workgroups 3.11-based Clients*****
  917.  
  918. Windows NT Server version 3.5 allows clients running Windows 
  919. for Workgroups version 3.11 to connect to the server via direct 
  920. host IPX.  However, a client running Windows for Workgroups 
  921. version 3.11 cannot establish named pipe connections over 
  922. NWLink to SQL Server on Windows NT Server version 3.5 unless 
  923. that client is provided with some updated Windows for 
  924. Workgroups files. These files include a new version of 
  925. the Windows for Workgroups redirector and other network 
  926. support files that provide improved performance. They are 
  927. distributed on the Windows NT Server version 3.5 CD, in the 
  928. \CLIENTS\WFW\UPDATE directory. The updated files are:
  929.  
  930.    NDIS.386
  931.    NET.EXE
  932.    NETAPI.DLL
  933.    NWNBLINK.386
  934.    VNETSUP.386
  935.    VREDIR.386
  936.  
  937. These files should be used only for Windows for Workgroups 
  938. version 3.11. They will allow named pipe connections to work 
  939. properly to Microsoft SQL Server over direct host IPX. To 
  940. install these new files on a computer running Windows for Workgroups:
  941.  
  942. 1. Copy all the files from the \CLIENTS\WFW\UPDATE directory 
  943.    on the Windows NT Server CD into the local C:\WINDOWS\SYSTEM 
  944.    directory of the Windows for Workgroups 3.11-based client.
  945.  
  946.    Note: Remember to use the Windows NT Server CD. The 
  947.    Microsoft SQL Server CD does not contain these files.
  948.  
  949. 2. On the Windows for Workgroups 3.11-based client, move 
  950.    the NET.EXE file from C:\WINDOWS\SYSTEM to C:\WINDOWS.
  951.    Because these files provide a general maintenance upgrade 
  952.    along with a number of fixes and improvements, copying 
  953.    the updated files is the preferred solution. However, 
  954.    there is an alternative solution. On any Windows for 
  955.    Workgroups 3.11-based client that does not have the 
  956.    updated files, you can edit the SYSTEM.INI file of the 
  957.    client to set:
  958.  
  959.       [network]
  960.       DirectHost=off
  961.  
  962. This allows that Windows for Workgroups 3.11-based client 
  963. to establish named pipe connections over NWLink to SQL Server 
  964. on Windows NT Server version 3.5.
  965.  
  966. *****Novell NetWare And Microsoft Windows 3.1 Software Patches*****
  967.  
  968. If you are experiencing occasional system hangs, black screens, frozen 
  969. mouse pointers, or EMM386 errors on your client workstations while 
  970. using SPX/IPX connections, several patches are available on CompuServe 
  971. to help eliminate or reduce the frequency of these problems.
  972.  
  973. The majority of these types of problems are solved by upgrading the Novell 
  974. client software. DOSUP9.EXE and WINUP9.EXE are distributed by 
  975. Novell in the Novell Software Library (GO NOVLIB).
  976.  
  977. A small percentage of these failures can be caused by a problem in the 
  978. Windows virtual timing device. Microsoft is distributing a patch 
  979. (WW0863.EXE) for this problem in the Microsoft Software Library
  980. (GO MSL).
  981.  
  982. *****OS/2 2.1 Network Client Support*****
  983.  
  984. Installation of Microsoft LAN Manager version 2.2, IBM(R)  LAN Server 
  985. version 2.0 (Entry System), or IBM LAN Server version 3.0 on 
  986. OS/2 2.1-based workstations is required to enable the use of named pipe 
  987. client connections. With these versions, named pipe clients are 
  988. supported in both native OS/2 2.1 and DOS-OS/2 environments.
  989.  
  990. Installation of the Novell NetWare Requester for OS/2 version 2.01
  991. on OS/2 2.1-based workstations is required to enable the use of IPX/SPX 
  992. client connections. With this version, IPX/SPX clients are supported in 
  993. both native OS/2 2.1 and DOS-OS/2 environments.
  994.  
  995. Installation of the Banyan VINES version 5.52(5) client software on 
  996. OS/2 2.1-based workstations is required to enable the use of VINES SPP 
  997. client connections. With this version, VINES SPP clients are supported 
  998. in both native OS/2 2.1 and DOS-OS/2 environments.
  999.  
  1000. It is recommended that you run Windows-based SQL Server client 
  1001. applications in their native environment, on Microsoft Windows 
  1002. version 3.1. However, Windows-based applications that access SQL Server
  1003. using named pipes will run on OS/2 version 2.1 if you are 
  1004. using Microsoft LAN Manager version 2.2 or IBM LAN Server version 3.0.
  1005. Internal testing has found the WIN-OS/2 environment to be unstable 
  1006. with other networking software.
  1007.  
  1008. ------------------------------------------------------------------------
  1009. Microsoft SQL Server Tools Enhancements
  1010. ------------------------------------------------------------------------
  1011.  
  1012. *****SQL Transfer Manager*****
  1013.  
  1014. Microsoft SQL Server version 4.21 includes 
  1015. SQL Transfer Manager. SQL Transfer Manager provides an easy, graphical 
  1016. way to transfer objects and data from a Microsoft-based SQL Server or a 
  1017. SYBASE(R)-based SQL Server to Microsoft SQL Server for Windows NT. (For
  1018. example, transferring data from Microsoft SQL Server running on an 
  1019. Intel-based server to a SQL Server on a different architecture, or 
  1020. transferring data from a SYBASE SQL Server on UNIX(R).) 
  1021.  
  1022. You can also use this tool to transfer data from a server with one sort 
  1023. order to a server with a different sort order. Note, however, that this 
  1024. tool does not convert extended characters, so you cannot use it for 
  1025. conversion from one code page to another. 
  1026.  
  1027. For detailed information about using SQL Transfer Manager, see the 
  1028. online Help provided with the utility.
  1029.  
  1030. *****SQL Administrator Compatibility*****
  1031.  
  1032. Although the version of SQL Administrator that runs against SQL Server 
  1033. for OS/2 4.2/4.2A will also work against SQL Server for Windows NT, 
  1034. it is recommended that you upgrade SQL Server client tools on any 
  1035. Windows 3.1-based clients that you plan to run against SQL Server for 
  1036. Windows NT. This enables you to use additional tools and features 
  1037. available with SQL Server for Windows NT (such as SQL Object Manager, 
  1038. ISQL/w, and the SQL Client Configuration Utility). SQL Server for OS/2 
  1039. version 4.2B contains these tools (version 4.2/4.2A does not). You can 
  1040. upgrade your tools to the very latest version, 4.21A, by using the 
  1041. Windows 3.1 Utilities disk provided with this release of SQL Server for 
  1042. Windows NT. If you use the Utilities disk, you must also upgrade the 
  1043. existing SQL Server for OS/2 installation if it is not version 4.2B 
  1044. (for example, it is  version 4.2 or 4.2A) by running INSTMSTR.SQL, 
  1045. INSTCAT.SQL, ADMIN2.SQL, and OBJECT2.SQL, which are found in the 
  1046. \SQL\INSTALL directory of the SQL Server for Windows NT installation.
  1047.  
  1048. *****SQL Monitor Enhancements*****
  1049.  
  1050. -----------------
  1051. SQL Monitor and Changing the SA Password
  1052.  
  1053. If you change the SA password in SQL Server and want to start 
  1054. SQL Monitor as a service (instead of starting SQL Monitor from the 
  1055. command line), you must change the SA password in SQL Monitor as 
  1056. well. To do this, use the /NEWPASSWORD = parameter in netsql start 
  1057. sqlmonitor. For example:
  1058.  
  1059. netsql start sqlmonitor /NEWPASSWORD=sqlsa
  1060.  
  1061. Note that starting SQL Monitor with the password parameter (/P=) 
  1062. overrides the set SA password.
  1063.  
  1064. -----------------
  1065. SQL Monitor is Now Mail Enabled
  1066.  
  1067. If you have configured SQL Server to be mail enabled, 
  1068. SQL Monitor can send mail messages to specified recipients about 
  1069. scheduled backup events. Use the Scheduled Backup Event Entry dialog 
  1070. box in SQL Administrator to specify a list of recipients. You can 
  1071. specify up to 60 characters; separate names by semicolons(;). After you 
  1072. have specified a list of recipients, those people will be sent mail 
  1073. whenever a backup occurs.
  1074.  
  1075. *****SQL Administrator Scheduled Backups*****
  1076.  
  1077. -----------------
  1078. Transaction Log Backups
  1079.  
  1080. In previous versions of SQL Administrator, when SQL Monitor attempted 
  1081. to perform a scheduled backup for a transaction log and SQL Monitor 
  1082. terminated sometime during the process, SQL Monitor would dump the 
  1083. transaction log again when restarted, regardless of whether the previous 
  1084. backup was successful. This posed a problem because SQL Monitor would 
  1085. overwrite the previous transaction log dump, even though it might have 
  1086. completed, so the chain of transaction log backups would be incorrect. 
  1087. To solve this problem, SQL Monitor now handles failure during a 
  1088. transaction log dump in the following order:
  1089.  
  1090. 1. SQL Monitor records a dump in progress while it is dumping the 
  1091. transaction log.
  1092.  
  1093. 2. If SQL Monitor fails and then starts up again and sees that a dump 
  1094. was in progress, but it does not know whether that dump completed, 
  1095. SQL Monitor records an error to the Event Log and also sends a mail 
  1096. message about the failure to a list of recipients (if SQL Server is mail 
  1097. enabled and SQL Administrator is set up to send messages to a list 
  1098. of recipients).
  1099.  
  1100. 3. Further dumps of the transaction log are suspended. After the user 
  1101. either dumps the full database or determines that the transaction log 
  1102. dump is complete, the user must reactivate the scheduled transaction 
  1103. log dumps. (This is done by selecting Yes under Enable in the Scheduled 
  1104. Backup Event Entry dialog box. )
  1105.  
  1106. Note that if the scheduled backup is a database backup, steps 1 and 2 
  1107. are followed, and the schedule for database backups will continue as is 
  1108. and not be disabled.
  1109.  
  1110. -----------------
  1111. Performing Long Scheduled Backups
  1112.  
  1113. If you are using SQL Administrator to perform scheduled backups of large 
  1114. databases (for example, those greater than 100 megabytes), you will likely 
  1115. need to increase the SQL Monitor /sqltimeout option to a length of time 
  1116. long enough to complete the backup.
  1117.  
  1118. *****SQL Object Manager and BCP*****
  1119.  
  1120. SQL Object Manager version 4.2 used bulk copy files based on the ANSI 
  1121. character set if AutoANSItoOEM was turned on, or based on the character 
  1122. set of the SQL Server if AutoANSItoOEM was turned off. The character 
  1123. mode BCP.EXE versions 4.20 and 4.21 utilities use bulk copy files based 
  1124. on the character set of the SQL Server. With version 4.21, 
  1125. SQL Object Manager now uses the OEM character set. If you used 
  1126. SQL Object Manager version 4.2 with AutoANSItoOEM turned on to bulk 
  1127. copy out character data that contained extended characters (character 
  1128. positions 128-255), the file is based on the ANSI character set; if you 
  1129. bulk copy the files back in using SQL Object Manager version 4.21, 
  1130. these extended characters will be converted incorrectly.
  1131.  
  1132. *****Additional Information About Database Backups*****
  1133.  
  1134. -----------------
  1135. Database Names When Dumping and Loading
  1136.  
  1137. When you dump a database to tape, only the first 17 characters of the 
  1138. database name are stored. If the database name is longer than 17 
  1139. characters and you try to restore the database, you will receive an 
  1140. error message indicating that the names are different. For this reason, 
  1141. it is recommended that you limit database names to 17 characters if you 
  1142. plan to back them up to tape. If you are using SQL Administrator to 
  1143. restore the database, you can choose to continue, even if the names are 
  1144. different, as long as you're sure that the actual databases are the 
  1145. same. If you are using ISQL, however, the restore process will be 
  1146. terminated.
  1147.  
  1148. -----------------
  1149. Performing Multivolume Backups Using a QIC Tape Drive
  1150.  
  1151. If you are using a QIC tape drive to perform multivolume dump or load 
  1152. operations using ISQL, you must have the console program running. 
  1153. Do not use a batch operation to perform multivolume tape operations 
  1154. with this drive.
  1155.  
  1156. *****Additional Information about BCP and ISQL*****
  1157.  
  1158. -----------------
  1159. Default Packet Size in ISQL and BCP
  1160.  
  1161. The documentation for the /a packet_size parameter of ISQL and BCP 
  1162. gives an incorrect value for default packet size. The correct default 
  1163. packet size for ISQL is 512. The correct default packet size for BCP on 
  1164. Windows NT is 4096; on MS-DOS and OS/2, the default packet size is 512.
  1165.  
  1166. -----------------
  1167. BCP Out
  1168.  
  1169. In addition to the BCP support documented in the "Microsoft 
  1170. SQL Server Transact-SQL Reference," the BCP utility now 
  1171. also supports copying data out of a view. This feature 
  1172. allows you to copy specific columns, add a WHERE clause, 
  1173. or perform special formatting such as changing data formats 
  1174. using the CONVERT function.
  1175.  
  1176. ------------------------------------------------------------------------
  1177. Cache Management Improvements
  1178. ------------------------------------------------------------------------
  1179. A new system process, Lazywriter, has been added to 
  1180. Microsoft SQL Server version 4.21. The Lazywriter's 
  1181. main task is to flush out batches of dirty, aged 
  1182. buffers (buffers that contain changes that must be 
  1183. written back to disk before the buffer can be reused 
  1184. for a different page) and make them available to user 
  1185. processes.
  1186.  
  1187. Previously, individual processes would search the data cache for an 
  1188. available buffer. If a clean buffer (a buffer that remained unchanged 
  1189. since the last read from disk) was not found, the user process would 
  1190. select a dirty buffer and be required to flush the contents of the 
  1191. buffer to disk before claiming it. In the case where most buffers in 
  1192. the data cache were dirty (due to extensive update activity), the 
  1193. overhead of searching for free data buffers and having to individually 
  1194. flush dirty buffers to disk caused degradation in performance. One way 
  1195. of avoiding this problem previously was to reduce the recovery interval 
  1196. and have checkpoint flush the buffer cache in batches more often so that
  1197. individual processes wouldn't have to do it one at a time.
  1198.  
  1199. With the introduction of Lazywriter, the need to checkpoint 
  1200. frequently for the purpose of creating available buffers has been 
  1201. eliminated. The batch I/O size used by Lazywriter can be set by the
  1202. max async io parameter of sp_configure. This parameter controls both 
  1203. the checkpoint's and Lazywriter's batch I/O size, and it can be tuned 
  1204. to maximize the I/O throughput for specific hardware platforms and I/O 
  1205. subsystems.
  1206.  
  1207. The Lazywriter process automatically starts flushing buffers when the 
  1208. number of available free buffers falls below a certain threshold, and it 
  1209. stops flushing buffers when this number goes ~5-6% above the threshold.
  1210. This threshold value is specified as a percentage of the total number 
  1211. of buffers in the buffer cache. The default threshold is set to 3% of 
  1212. the buffers in the data cache and should be sufficient in most situations.
  1213. However, if necessary, the Lazywriter threshold can be modified using 
  1214. the BLDMASTR utility with the -y switch, as follows:
  1215.  
  1216. bldmastr -dc:\sql\data\master.dat -yLRUThreshold=<x>
  1217.  
  1218. where x is a percentage of the size of the data cache (values 
  1219. between 1 and 40 are valid).
  1220.  
  1221. ***CAUTION: Be careful to type the command exactly as shown. The 
  1222. command should complete nearly immediately and not prompt for any 
  1223. input whatsoever. If you are prompted for input, you have made a 
  1224. syntactic error. Use CTRL+C to terminate the utility immediately. 
  1225. INCORRECT USE OF THE BLDMASTR UTILITY CAN INADVERTENTLY CHANGE 
  1226. YOUR MASTER DATABASE. The LRUThreshold argument is case-sensitive.
  1227.  
  1228. Because cache management has been enhanced, some meanings of the 
  1229. SQL Server counters in the Performance Monitor have changed. For the 
  1230. most up-to-date definitions of the SQL Server performance counters, 
  1231. see the Explain text in the Performance Monitor.
  1232.  
  1233. ------------------------------------------------------------------------
  1234. Enhanced NOCOUNT option of the SET statement
  1235. ------------------------------------------------------------------------
  1236. Previously, even if the NOCOUNT option of the SET statement was set (so 
  1237. that no messages about the number of rows affected by a SQL statement 
  1238. were displayed in a client session), the messages were still being sent 
  1239. across the network. For this release, the NOCOUNT option has been 
  1240. enhanced so that when it is set, no row count messages are sent across 
  1241. the network at all. This can reduce network traffic when executing a 
  1242. stored procedure containing a large number of SQL statements across a 
  1243. wide area network (WAN) or when using remote access or dial-up networks.
  1244.  
  1245. You can use this option from within a trigger or a stored procedure, or 
  1246. you can set it on a user basis. The system administrator can also set 
  1247. this option server-wide by using the trace flag 3640 when starting 
  1248. SQL Server. Note that when you use this trace flag, even if a client 
  1249. session wants to see the rows affected messages, the messages will 
  1250. not be sent.
  1251.  
  1252. -------------------------------------------------------------------
  1253. Acknowledgments
  1254. -------------------------------------------------------------------
  1255. Information in this document is subject to change 
  1256. without notice. Companies, names, and data used in 
  1257. examples herein are fictitious unless otherwise 
  1258. noted. No part of this document may be reproduced or 
  1259. transmitted in any form or by any means, electronic 
  1260. or mechanical, for any purpose, without the express 
  1261. written permission of Microsoft Corporation.
  1262.  
  1263. ⌐1990-1994 Microsoft Corporation. All rights reserved.
  1264.  
  1265. Microsoft, MS, Windows, Windows NT and Win32 are 
  1266. either registered trademarks or trademarks of Microsoft 
  1267. Corporation in the United 
  1268. States and/or other countries. 
  1269.  
  1270. Alpha AXP is a trademark of Digital Equipment Corporation.
  1271. Apple is a registered service mark of Apple Computer, Inc.
  1272. AppleTalk is a registered trademark of Apple Computer, Inc.
  1273. Banyan is a registered trademark of Banyan Systems, Inc.
  1274. DECnet is a trademark of Digital Equipment Corporation.
  1275. IBM is a registered trademark of International Business 
  1276. Machines Corporation.
  1277. Intel is a registered trademark of Intel Corporation.
  1278. Macintosh is a registered trademark of Apple Computer, Inc.
  1279. MIPS is a registered trademark of MIPS Computer Systems, Inc.
  1280. NetWare is a registered trademark of Novell, Inc.
  1281. Novell is a registered trademark of Novell, Inc.
  1282. SQL Server is a trademark of Microsoft Corporation. 
  1283. SYBASE is a registered trademark of Sybase, Inc.
  1284. VINES is a registered trademark of Banyan Systems, Inc.
  1285. VMS is a trademark of Digital Equipment Corporation.
  1286. UNIX is a registered trademark of UNIX Systems Laboratories.
  1287.  
  1288.