Showing posts with label syntax. Show all posts
Showing posts with label syntax. Show all posts

Monday, March 12, 2012

List remote server and directory

Hi
Trying to work on a script which is able to list files on a remote server
and its drive but unsure of the syntax. Can anyone advise as below doesnt
work.
xp_cmdshell 'dir "\\server::d:\"
Thanks
Hi,
The remote server needs to have a share exposed that you can use to get a
directory listing. The syntax would be:
exec master.dbo.xp_cmdshell 'dir \\myserver\d$'
If the path contains blanks then you need to quote the parameter with
double-quotes:
exec master.dbo.xp_cmdshell 'dir "\\myserver\c$\Program Files"'
RLF
"guest5" <guest5@.discussions.microsoft.com> wrote in message
news:C2CC72B2-F903-423A-A499-36E639532789@.microsoft.com...
> Hi
> Trying to work on a script which is able to list files on a remote server
> and its drive but unsure of the syntax. Can anyone advise as below doesnt
> work.
> xp_cmdshell 'dir "\\server::d:\"
>
> Thanks

List remote server and directory

Hi
Trying to work on a script which is able to list files on a remote server
and its drive but unsure of the syntax. Can anyone advise as below doesnt
work.
xp_cmdshell 'dir "\\server::d:\"
ThanksHi,
The remote server needs to have a share exposed that you can use to get a
directory listing. The syntax would be:
exec master.dbo.xp_cmdshell 'dir \\myserver\d$'
If the path contains blanks then you need to quote the parameter with
double-quotes:
exec master.dbo.xp_cmdshell 'dir "\\myserver\c$\Program Files"'
RLF
"guest5" <guest5@.discussions.microsoft.com> wrote in message
news:C2CC72B2-F903-423A-A499-36E639532789@.microsoft.com...
> Hi
> Trying to work on a script which is able to list files on a remote server
> and its drive but unsure of the syntax. Can anyone advise as below doesnt
> work.
> xp_cmdshell 'dir "\\server::d:\"
>
> Thanks

List remote server and directory

Hi
Trying to work on a script which is able to list files on a remote server
and its drive but unsure of the syntax. Can anyone advise as below doesnt
work.
xp_cmdshell 'dir "\\server::d:\"
ThanksHi,
The remote server needs to have a share exposed that you can use to get a
directory listing. The syntax would be:
exec master.dbo.xp_cmdshell 'dir \\myserver\d$'
If the path contains blanks then you need to quote the parameter with
double-quotes:
exec master.dbo.xp_cmdshell 'dir "\\myserver\c$\Program Files"'
RLF
"guest5" <guest5@.discussions.microsoft.com> wrote in message
news:C2CC72B2-F903-423A-A499-36E639532789@.microsoft.com...
> Hi
> Trying to work on a script which is able to list files on a remote server
> and its drive but unsure of the syntax. Can anyone advise as below doesnt
> work.
> xp_cmdshell 'dir "\\server::d:\"
>
> Thanks

List registered assemblies

Hi,

It's possible to register an assembly in SqlServer 2005 using the

CREATE ASSEMBLY

syntax.

How can I get a list of assemblies that have been registered?

Thanks

Herbj?rn

Select * from sys.assemblies ?

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de