|
Frequently Asked Questions:Table of content: FAQ: xp_cmdshell does not work with XCOPY Applies to SQL Server 7.0 and 2000 PRB: XP_CMDSHELL Does Not Work with XCOPY (Q152134) (Although not explicitly notes, this article/problem also applies to SQL Server 7.0 and 2000.) Using XCOPY.EXE with xp_cmdshell does not work by default, since XCOPY.EXE expects input from the user, which is normally provided at the command prompt through a return after the command. This behavior can be mimicked by adding "< NUL:" after the command text, which will effectively signal the XCOPY input stream. So the following will make XCOPY work with xp_cmdshell: exec master.dbo.xp_cmdshell N'xcopy c:\test1 c:\test2 < NUL:' FAQ: xp_enum_oledb_providers does not list all installed OLE-DB providers Applies to SQL Server 7.0 and 2000 xp_enum_oledb_providers does not list all installed OLE-DB providers on the system. If there are known providers that do not work in combination with SQL Server Linked Servers, these are excluded from the list. The following providers are excluded:
These providers are excluded because they do not work in combination with Linked Servers or in case of the Microsoft.Jet.OLEDB.3.51 provider because a later version is installed and should be used instead. FAQ: How can I force the use of a network protocol without changing the Client Network settings? If you know how Data Access API's like ODBC construct there connections for specific protocols, you can leverage this knowledge to force the usage of a certain Net Library protocol, without having to change any client side network settings or the creations of an client alias. (See Client Network Utility for more details in Books Online.) The key to this information can be found in the Registry. In the LastConnect key in the Registry the Data Access API's store the last used connection. For example: The name identifies the name of the server as you would normally enter this, the data part made of 3 or more parts. Part 1: is some sort of (hash value) key (369229832 in the example above) So part 2 and 3 are the interesting pieces. Forcing named pipes to a named instance: osql -S np:\\.\pipe\mssql$dev\sql\query -E -Q "select net_library from sysprocesses where spid = @@spid" Forcing TCP sockets using port 1460: osql -S tcp:gertd00,1460 -E -Q "select net_library from sysprocesses where spid = @@spid" This technique even allows ISQL to SQL Server 2000 named instances! Using named pipes: isql -S np:\\.\pipe\mssql$dev\sql\query -E -Q "select net_library from sysprocesses where spid = @@spid" Using shared memory (LPC) isql -S lpc:GERTD00\DEV -E -Q "select net_library from sysprocesses where spid = @@spid" What are the protocol identifiers allowed:
Where can I find this information? In the Registry, specified in: *** |
Questions or problems regarding this web site should be directed to Web Master. |