Showing posts with label jobs. Show all posts
Showing posts with label jobs. Show all posts

Friday, March 9, 2012

open a web page through SQL SQL job

Hi all,

now, i create a job to open a page on timely basis. The job's Vb script is like that:

Dim WshShell
Set WshShell =CreateObject("WScript.Shell")
WshShell.Run ("http://www.google.com")
Set WsShell = Nothing


when i run that job, i got that error:

The job succeeded. The Job was invoked by User host\username. The last step to run was step 1 (Step 1).


how can i solve it? i still don't know whether that script will open a webpage or not

The following script opens a webpage in a VBS Script:

Dim WshShell
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run "iexplore.exe http://www.google.com"
Set WsShell = Nothing

|||

I think that one will work in web page. But, now i m trying in SQL job. I have tried with that code. But, nothing happen.

regards,

|||It seems to be impossible to open a website through SQL Server, neither using SQL Agent Job (ActiveX script task), nor using xp_cmdshell. I tried both, and the IEXPLORER process can be started (you can check in Task Manager) and then hung, waiting for some response. I guess this is becausexp_cmdshell operates synchronously. Control is not returned until the command shell command completes. And the SQL Server can't proceed with reponse from IEXPLORER process so both IEXPLORER and SQL Server hangs.|||so, how abt calling a bat file. And then, through bat file, call the web page. is it the possible way?

Wednesday, March 7, 2012

Only One SSIS Job Runs...

Hi,

Currently I have two SSIS jobs on my machine. The problem I'm having is, only one of the jobs executes succesfully, the other one fails for incorrect user login. Both jobs use the same configuration database and all the packages on both jobs have the protection level set to "DontSaveSensitive". Both jobs have been deployed in the exact same manner, yet only one succeceeds and the other fails.

Can anybody tell me why this is going on?

J.Suazo wrote:

Hi,

Currently I have two SSIS jobs on my machine. The problem I'm having is, only one of the jobs executes succesfully, the other one fails for incorrect user login. Both jobs use the same configuration database and all the packages on both jobs have the protection level set to "DontSaveSensitive". Both jobs have been deployed in the exact same manner, yet only one succeceeds and the other fails.

Can anybody tell me why this is going on?

I would suggest to double check....take close look wehre the error is happening. Are the 2 jobs calling the same package?

|||

Hi Rafael,

Thanks for your reply.

1. The packages fail when acquiring my sql server connection. The error I'm getting says that the connection is not configured correctly or I may not have the right permissions. That is bogus, the packages on my other job have the same connections and the same permissions and they don't fail.

2. Both jobs call completely different packages.

Saturday, February 25, 2012

Only members of sysadmin role are allowed to update or delete jobs owned by a different login

Question to those who may have had this same error- it seems that I am not able to delete some of the reports that I have created. This just started happening recently and according to our system admin nothing has changed as far as permissions are concernced. We installed SP2 the other day and I was wondering if this could have anything to do with the error message below

by the way I am a member of the sysadmin group

thanks in advance

km

System.Web.Services.Protocols.SoapException: Server was unable to process request. > System.Data.SqlClient.SqlException: Only members of sysadmin role are allowed to update or delete jobs owned by a different login. Only members of sysadmin role are allowed to update or delete jobs owned by a different login. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at Microsoft.ReportingServices.Library.InstrumentedSqlCommand.ExecuteNonQuery() at Microsoft.ReportingServices.Library.DBInterface.DeleteObject(String objectName) at Microsoft.ReportingServices.Library.RSService._DeleteItem(String item) at Microsoft.ReportingServices.Library.RSService.ExecuteBatch(Guid batchId) at Microsoft.ReportingServices.WebServer.ReportingService2005.ExecuteBatch() End of inner exception stack trace

my bad

I need to move this over to SSRS

km

|||

Moved to RS as requested.

The error though is more general than RS, in fact it is a standard SQL Server Agent message. Unless there is a bug, I'd say you really are not a member of sysadmins, or at least not in the context of the RS WS call that is doing the work on yoru behalf. That may be the issue, the security context used by the WS itself. Perhaps run a profiler trace and see what login is being used, and also what job it is trying to delete. You can then verify the job owner. There should not be a problem as you are managing a RS created job, so RS should be able to delete its own jobs... maybe it is a RS thing?

|||Thanks
your info did the trick-- the account used was not a member of sysadmin-- my bad
thanks again
kam
|||

hi kam,

how did you solved the issue? i've added myself as the sysadmin on the server, but i'm still getting the same error. is there any other sysadmin than the sqladmin? thanks.

DK

|||actually, i've found the answer. whatever account used on the app pool need to have sysadmin, as this is the account that is updating/deleting the report. thanks.

Only members of sysadmin role are allowed to update or delete jobs owned by a different login

Question to those who may have had this same error- it seems that I am not able to delete some of the reports that I have created. This just started happening recently and according to our system admin nothing has changed as far as permissions are concernced. We installed SP2 the other day and I was wondering if this could have anything to do with the error message below

by the way I am a member of the sysadmin group

thanks in advance

km

System.Web.Services.Protocols.SoapException: Server was unable to process request. > System.Data.SqlClient.SqlException: Only members of sysadmin role are allowed to update or delete jobs owned by a different login. Only members of sysadmin role are allowed to update or delete jobs owned by a different login. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at Microsoft.ReportingServices.Library.InstrumentedSqlCommand.ExecuteNonQuery() at Microsoft.ReportingServices.Library.DBInterface.DeleteObject(String objectName) at Microsoft.ReportingServices.Library.RSService._DeleteItem(String item) at Microsoft.ReportingServices.Library.RSService.ExecuteBatch(Guid batchId) at Microsoft.ReportingServices.WebServer.ReportingService2005.ExecuteBatch() End of inner exception stack trace

my bad

I need to move this over to SSRS

km

|||

Moved to RS as requested.

The error though is more general than RS, in fact it is a standard SQL Server Agent message. Unless there is a bug, I'd say you really are not a member of sysadmins, or at least not in the context of the RS WS call that is doing the work on yoru behalf. That may be the issue, the security context used by the WS itself. Perhaps run a profiler trace and see what login is being used, and also what job it is trying to delete. You can then verify the job owner. There should not be a problem as you are managing a RS created job, so RS should be able to delete its own jobs... maybe it is a RS thing?

|||Thanks
your info did the trick-- the account used was not a member of sysadmin-- my bad
thanks again
kam|||

hi kam,

how did you solved the issue? i've added myself as the sysadmin on the server, but i'm still getting the same error. is there any other sysadmin than the sqladmin? thanks.

DK

|||actually, i've found the answer. whatever account used on the app pool need to have sysadmin, as this is the account that is updating/deleting the report. thanks.