![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | SQL Server 2005 MSDB Access On my SQL Server, I have a stored proc called 'sp_exec_job' that simply starts a job: EXEC [msdb].[dbo].sp_start.job @JOB_NAME When I run this from Management Studio, it works fine. Yea. But, when I try to execute sp_exec_job from my .NET (C#) code (on the same server as the SQL DB), I get the following error: System.Data.SqlClient.SqlException: Could not find server 'msdb' in sysservers. Execute sp_addlinkedserver to add the server to sysservers. 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) Any ideas? |
My System Specs![]() |
| | #2 (permalink) |
| | Re: SQL Server 2005 MSDB Access Sorry, the above message is not correct (I pasted the wrong message). This is the error I am getting... System.Data.SqlClient.SqlException: EXECUTE permission denied on object 'sp_start_job', database 'msdb', schema 'dbo'. 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) |
My System Specs![]() |
| | #3 (permalink) |
| | Re: SQL Server 2005 MSDB Access On Apr 15, 10:20*am, cap...@xxxxxx wrote: Quote: > Sorry, the above message is not correct (I pasted the wrong message). > This is the error I am getting... > > System.Data.SqlClient.SqlException: EXECUTE permission denied on > object 'sp_start_job', database 'msdb', schema 'dbo'. > 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(TdsParserStateObje*ct > stateObj) > at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, > SqlCommand cmdHandler, SqlDataReader dataStream, > BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject > stateObj) database. Duh. Sorry to waste anyone's time. |
My System Specs![]() |
| | #4 (permalink) |
| | Re: SQL Server 2005 MSDB Access Also, do not name your own stored procedure like "sp_xxxxxxx", which is used for system stored procedures. <cappjr@xxxxxx> wrote in message news:ae94a163-9b99-4c51-af40-68ecc63c9b31@xxxxxx On Apr 15, 10:20 am, cap...@xxxxxx wrote: Quote: > Sorry, the above message is not correct (I pasted the wrong message). > This is the error I am getting... > > System.Data.SqlClient.SqlException: EXECUTE permission denied on > object 'sp_start_job', database 'msdb', schema 'dbo'. > 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(TdsParserStateObje*ct > stateObj) > at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, > SqlCommand cmdHandler, SqlDataReader dataStream, > BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject > stateObj) database. Duh. Sorry to waste anyone's time. |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Windows Server 2008 hosted on Virtual Server 2005 R2 very slow | Virtual Server | |||
| Virtual Server 2005 r2 - moving VPC server to server - blue screen | Virtual Server | |||
| Virtual Server 2005 w/ 2008 Server | Virtual Server | |||
| Windows 2000 Server From Virtual Server 2005 to Hyper-V | Virtual Server | |||
| Installing Visual Studio 2005 Std Ed, SQL Server 2005 Expr./Compac | Vista installation & setup | |||