Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
SQL
ce
clients
clustering
connect
datamining
datawarehouse
dts
fulltext
jdbcdriver
msde
mseq
newusers
notificationsvcs
odbc
olap
programming
replication
reportingsvcs
security
securitytools
server
setup
sqlxml.viewmapper
tools
xml
  
 
date: Sat, 5 Jul 2008 17:35:27 +0200,    group: microsoft.public.sqlserver.newusers        back       


xp_cmdshell delete file/copy   
DECLARE @statement NVARCHAR(128)
SET @statement = 'EXEC xp_cmdshell ''copy C:\Temp\SQLTesting\Cycles.xls ' +
'C:\Temp\ ' + ''''
EXEC sp_executesql @statement

Why this scripts don't work on SQLExpress 2005,on result i have ACCESS 
DENIED,why???
Thanks advance.
date: Sat, 5 Jul 2008 17:35:27 +0200   author:   Dr.Acrobat

Re: xp_cmdshell delete file/copy   
Are you connecting with a Login which is a member of sysadmin server fixed 
role?

Is you SQL Server service account has enough rights to access to that path?

What is your OS, Vista? If so, is UAC enabled?

-- 
Ekrem Önsoy



"Dr.Acrobat"  wrote in message 
news:ehO9$Sr3IHA.1436@TK2MSFTNGP05.phx.gbl...
> DECLARE @statement NVARCHAR(128)
> SET @statement = 'EXEC xp_cmdshell ''copy C:\Temp\SQLTesting\Cycles.xls ' 
> +
> 'C:\Temp\ ' + ''''
> EXEC sp_executesql @statement
>
> Why this scripts don't work on SQLExpress 2005,on result i have ACCESS 
> DENIED,why???
> Thanks advance.
date: Sun, 6 Jul 2008 01:30:23 +0300   author:   Ekrem Önsoy

Re: xp_cmdshell delete file/copy   
I solve that problem i create excel file without EVERYONE permission.
Thanks.

"Ekrem Önsoy"  wrote in message 
news:7EA74F4F-54FE-4959-9033-305BA392DE15@microsoft.com...
> Are you connecting with a Login which is a member of sysadmin server fixed 
> role?
>
> Is you SQL Server service account has enough rights to access to that 
> path?
>
> What is your OS, Vista? If so, is UAC enabled?
>
> -- 
> Ekrem Önsoy
>
>
>
> "Dr.Acrobat"  wrote in message 
> news:ehO9$Sr3IHA.1436@TK2MSFTNGP05.phx.gbl...
>> DECLARE @statement NVARCHAR(128)
>> SET @statement = 'EXEC xp_cmdshell ''copy C:\Temp\SQLTesting\Cycles.xls ' 
>> +
>> 'C:\Temp\ ' + ''''
>> EXEC sp_executesql @statement
>>
>> Why this scripts don't work on SQLExpress 2005,on result i have ACCESS 
>> DENIED,why???
>> Thanks advance.
>
date: Mon, 7 Jul 2008 09:53:25 +0200   author:   Dr.Acrobat

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us