1. You'll need to enumerate the following key in the registry (assuming
you are running SQL Server 8.0):
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL
Server\InstalledInstances
2. If there are no shares on the target machine there is no native way
to put a file on that server. However, most servers come with default
adminstration shares for each hard drive (\\ServerName\C$ for C:\).
So, provided you have administrator access to the server and the shares
exist you can copy your file to \\servername\c$\test\
Hope this helps,
Reinout Hillmann
SQL Server Product Unit
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Michael C wrote:
1. Is there any way to retrieve the name of the locally running SQL Server?
The reason I ask is that I'd like to retrieve the name of the default SQL
Server and all named instances, but only on the local machine.
2. Is it possible to copy a file to a specified directory on a remote
machine without using shares? For instance, I might have a file like
"MYDATA.TXT" on my local machine, but I'd like to copy it to the "C:\TEST"
directory on a specific server; there are no shares set up on the server.
Thanks,
Michael C.