显示标签为“http”的博文。显示所有博文
显示标签为“http”的博文。显示所有博文

2012年2月12日星期日

batch (.bat) file from sql server?

Is that possible to run batch file (.bat) from sql server?
Thanks.
*** Sent via Developersdex http://www.examnotes.net ***DECLARE @.v_cmd VARCHAR(2000)
SET @.v_cmd = 'CALL "d:\myfolder\mybatch.bat"'
EXEC master..xp_cmdshell @.v_cmd ,NO_OUTPUT
-- OR
-- EXEC master..xp_cmdshell @.v_cmd|||I guess what I am asking is to call the bat file from a stored proc?
*** Sent via Developersdex http://www.examnotes.net ***|||Thanks.
*** Sent via Developersdex http://www.examnotes.net ***|||Test Test (farooqhs_2000@.yahoo.com) writes:
> I guess what I am asking is to call the bat file from a stored proc?
You can invoke a bat file with help of xp_cmdshell. Note that xp_cmdshell
is fairly dangerous feature, if opened to unprivileged users, since
it permits you run commands on Windows level on the SQL Server machine.
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx

2012年2月9日星期四

Basic Report & Report is being generated

I followed the tutorial http://msdn2.microsoft.com/en-us/library/ms167305.aspx with no problem but when I tried to preview the report the green circle just kept spinning and spinning.

I'm able to execute the command under the data tab with no problems. I'm able to view built in reports for SQL Server 2005. I've tried restarting Visual Studio and the entire PC but the report will still no generate.

Thoughts or ideas about what my problem is?

SQL Server 2005 SP1

Thanks,
MikeTurns out if I move the solution to a location on my local machine as opposed to a UNC, the report generated just fine. I'm pretty sure it would eventually generate on the UNC it would just take forever!

Mike|||I have this same issue and I'm not writing to a UNC path, could there be any other reasons?