Showing posts with label options. Show all posts
Showing posts with label options. Show all posts

Thursday, 7 May 2015

@schedule_uid is not a parameter for procedure sp_add_jobschedule - Error when creating a schedule job from script for SQL Server 2005 by serverku

A few days back when I was working with server migration, it was needed to migrate scheduled jobs also. What I did wrong? What’s the solution?

I had to move all scheduled jobs for SQL server 2005 where the source SQL server version and destination SQL server version is same. I generated a script of all jobs from another instance of SQL server 2008 or higher version in different server by connecting said source SQL server 2005 instance. After it gave an error while applying that script for jobs at the destination which is following,
Msg 8145, Level 16, State 1, Procedure sp_add_jobschedule, Line 0
@schedule_uid is not a parameter for procedure sp_add_jobschedule.
It will work fine if generates a script from SQL server 2005 instance. With 2008 or higher version, it adds parameter in script “@schedule_uid” and it creates an issue. To apply the script at destination either you have to remove @schedule_uid and its value from script or apply setting forScript for server version’ from options.
Go to Tools –> Options –> SQL Server Object Explorer  and change value to required version of Script for server version’.


I applied above settings and succeed for me. Please share your ideas and comments for such issue.
Have a nice day. Stay tuned for more!

Friday, 1 May 2015

How to increase the number of characters retrieved from the server for XML data - SQL Server by serverku

You might work with xml and you may aware of title mentioned in this post. Today when I was working to collect information from one table which having xml column, I was trying to open xml data result set from query analyzer with new query window. For some of the xml data result set it to raise an error below while opening with new window,

Unable to show XML. The following error happened:  There is an unclosed literal string. 


This is just an error I faced for some xml data which are lengthy in size. But error is showing solution too “One solution is to increase the number of characters retrieved from the server for XML data. To change this setting, on the Tools menu, click Options”. Let follow toward it and go ahead the step suggested, please see below snapshot which is showing the option where we can change the suggested setting,

Tools –> Options

Nothing to say other than the screen shot above. I know this is common post, but I shared it with you because I never faced this issue earlier and also did not aware about this setting. Let us share here if have this in your mind earlier.