Toad World® Forums

BUG: "Specified cast is not valid" , when trying to see the code of a SQL Agent Job

Hi,

When I try to see the generated code of one of my SQL Agent Jobs, that simply runs a SSIS package, I get the text "Specified cast is not valid" displayed in the main area.

and sometimes the following error message is displayed:

1300.job_sql_problem.jpeg

The script generation works fine on SSMS, so I've made some quick investigation and found that Toad fails to generate the T-SQL code for jobs that use some proxy account. I've attached a simplified version of my job. To reproduce the bug just run the code twice: with and without the proxy clause

--,@proxy_name = N'ssis_user_proxy'

and try to generate the job T-SQL script.

*Note: You may need to create some new & valid proxy to your db server.

The problem affects Toad for SQL Server 6.6, as well as the latest beta 6.7.0.194 .
job_sql_problem.sql (2.26 KB)

I second this post. I too have been getting the same error since Toad 6.1, but ignored it by closing Toad and restarting again, with new connections to our databases. However it is annoying to say the least, and it’s definitely a bug in Toad and not in SQL Server (2005).

Thank you for reporting.

I log this as TSS-1146.

And we will try to fix it.

Best Regards,

Kelly

Hi,

TSS-1146 has been fixed and will included in next Beta.

Kelly