Showing posts with label exe. Show all posts
Showing posts with label exe. Show all posts

Thursday, March 29, 2012

Credentials and extended stored procedures

I have a database script that uses the extended stored procedures sp_OACreate and sp_OCMethod to execute an .exe file. The .exe file is located on the same machine as the SQL Server. At this time it does nothing but log the name of the user calling it.

When I execute the script from Management Studio (logged in as myself) the user being logged as the caller of the .exe is still NT AUTHORITY\SYSTEM. I don't know why NT AUTHORITY\SYSTEM is the caller, cause the SQL Server service runs under another domain account.

I have tried playing around with EXECUTE AS USER but no matter what, the caller of the .exe is always logged as NT AUTHORITY\SYSTEM.

Are there any way I can pass my credentials to the executable that I am calling from the T-SQL script?

Have you given the NT AUTHORITY/SYSTEM privileges on SQL Server?|||

No, not intentionally. It is a default SQL server installation.

I switched the user that runs the SQL service to a domain user (it was local system account before), and that is basically all that has been changed, apart from giving some domain users access to some databases on the server.

Tuesday, February 14, 2012

Creating datasource on server from *.rds file

Hello
I would like to create a datasource (using the rs.exe utility and the actual
*.rds file) in the same way reports (*.rdl) can be created, as described in
this link
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rsprog/htm/rsp_ref_soapapi_service_ak_9n79.asp. I
know you can create a datasource using CreateDataSource method, though I
want to be able to have the report files (*.rdl) in one folder and the
associated datasources (*.rds) in another and have the script automatically
pick up these files (GetFiles() etc.) and create them on the report server.
This will prevent the script from needing changing again...
I have also tried CreateResource, though that merely creates an rds file on
the server.
Does anyone know whether this is possible?
Thanks,
MarkYes, this is totally possible with the script host and the scripting
utility. You will have to set your reference to the shared data source for
your report after you upload the rdl files.
--
Bryan Keller
Developer Documentation
SQL Server Reporting Services
A friendly reminder that this posting is provided "AS IS" with no
warranties, and confers no rights.
"MCC" <cmc_za@.hotmail.com> wrote in message
news:uVGMNPUeEHA.2532@.TK2MSFTNGP09.phx.gbl...
> Hello
> I would like to create a datasource (using the rs.exe utility and the
actual
> *.rds file) in the same way reports (*.rdl) can be created, as described
in
> this link
>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rsprog/htm/rsp_ref_soapapi_service_ak_9n79.asp. I
> know you can create a datasource using CreateDataSource method, though I
> want to be able to have the report files (*.rdl) in one folder and the
> associated datasources (*.rds) in another and have the script
automatically
> pick up these files (GetFiles() etc.) and create them on the report
server.
> This will prevent the script from needing changing again...
> I have also tried CreateResource, though that merely creates an rds file
on
> the server.
> Does anyone know whether this is possible?
> Thanks,
> Mark
>
>