Answered by:
Management Studio - Specified cast is not valid

Question
-
ok on my sql box using sql management studio I can't add a maintenance plan or modify a maintenance plan. I get the error: "Specified cast is not valid."
I can though connect to the SQL server from a different box running the same version of the tools and do this without any problems. What is wrong with my management studio install?
Most of the issues I have found regarding this is with query commands.
Tuesday, July 10, 2012 5:21 PM
Answers
-
No one has provided a successful solution I'm closing this before someone marks an answer that is incorrect.
- Marked as answer by kokopelli2305 Thursday, September 13, 2012 6:51 PM
Thursday, September 13, 2012 6:51 PM
All replies
-
Are you sure that you are not running SQL 2008 tools on one client and 2008R2 on the other?
Chuck Pedretti | Magenic – North Region | magenic.com
Tuesday, July 10, 2012 5:30 PM -
sql 2005 running sql 2005 tools.Tuesday, July 10, 2012 8:30 PM
-
Please verify the version of the client tools - and the version of the server in each instance. This kind of error is triggered when you are using a lower version of the client tools against a higher version of the server.
Since this is 2005 - most likely your client tools are SP1 or lower where one instance is also SP1 or lower and the other instance is SP2 or greater.
Jeff Williams
- Proposed as answer by Shulei Chen Tuesday, July 24, 2012 5:37 AM
- Marked as answer by amber zhang Tuesday, July 24, 2012 6:39 AM
- Unmarked as answer by kokopelli2305 Thursday, July 26, 2012 3:39 PM
Saturday, July 14, 2012 1:51 PM -
Please confirm the compatibility level of the Master, MSDB, or user database context. If it is a Query execution error, than maybe the syntax or the cast was not appropriate in an older compatibility level.
Mohit K. Gupta --- MCTS, MCITP, MCC2011
My Blog OpsVault My MSDN Blog Twitter @SQLCAN- Marked as answer by amber zhang Tuesday, July 24, 2012 6:39 AM
- Unmarked as answer by kokopelli2305 Thursday, July 26, 2012 3:39 PM
Saturday, July 14, 2012 4:44 PM -
How is someone marking an answer to my post? That is just crazy how the heck do they know what the solution is!
This is not a query execution issue. so I'm unmarking Mohi K Gupta's answer!
SQL server and management studio are both at version 9.0.5000
so I'm unmarking jeffw8713 answer!
Yes I still have this problem.- Edited by kokopelli2305 Thursday, July 26, 2012 3:39 PM
Thursday, July 26, 2012 3:39 PM -
Most likely, they were marked as answered because it appeared you had abandoned the thread. Your last post was on July 10...
The next thing I would check is the version of Visual Studio - which needs to be upgraded to SP1. If that is okay, then it may just be the one of the DTS dll's is not registered.
Jeff Williams
Sunday, July 29, 2012 2:14 PM -
Abandoned or not it is misleading to others looking for answers to have someone else say this is the answer to a post when they have no clue. Just my two cents. I now know I can't trust actual answers in this forum.
We have not installed visual studio on this box. It has sql 2005 and management tools only. If SQL installs some visual studio I'm not aware of it but it has been awhile since I have done a sql install.
Is there an easy way to check for dll's?? I know in the past I have got "no such interface supported" and to fix this had to run:
C:\>regsvr32 msxml3.dll
C:\>regsvr32 msxml6.dllMonday, July 30, 2012 12:58 PM -
running a tasklist /M on a machine with a working sql management studio and the one not.
The only difference I can find between the two machines process SqlWb.exe.
Is the working machine has this:
wbemprox.dll,
Microsoft.SqlServer.MaintenancePlanTasksUI.ni.dll,
dtsmsg.rll,
msdds.dll,
MSDDSUI.DLL,
msddsf.dll,
msddslm.dll,
Microsoft.DatNot 100% as it is a very large compare but best I could tell using winmerge is that is the difference.
- Edited by kokopelli2305 Monday, July 30, 2012 5:51 PM
- Proposed as answer by Shulei Chen Tuesday, July 31, 2012 3:44 AM
- Unproposed as answer by Shulei Chen Tuesday, July 31, 2012 3:44 AM
Monday, July 30, 2012 5:26 PM -
Hi kokopelli2305,
Thanks for update.
Base on your description, it seems that there is something wrong with your Management Studio. Could you please try to reinstall it? You can reinstall SQL Server client components from setup, or from the tools folder under setup directory execute SqlRun_Tools.msi to start installing client components.
Best Regards,
Ray Chen
Tuesday, July 31, 2012 3:44 AM -
How do you reinstall a component at SP4 level when the msi is at no Service Pack?
Do I have to install the tools then reinstall SP4? requiring a reboot for the entire sql box.
Tuesday, July 31, 2012 2:54 PM -
Do you have the SQL Server client tools installed on your desktop? That is the ideal place from which you should be working. Working directly on the SQL Server console is to be discouraged and is rarely necessary. It is not necessary for setting up Maintenance Plans.
If you are running the client tools, e.g. SQL Server Management Studio, on a desktop and are having a problem then reinstall the tools on that desktop and reapply SP 4. (Naturally this would not require a server to reboot.)
However, if I understand your first post, you are running the SQL Server tools directly on the server, instead of from your desktop computer. You mention that it works fine from another computer. Is that other computer also a SQL Server server?
It that case it looks like the tools on your server are incompletely installed in some fashion. If you do a reinstall of the client tools on the Server and reapply SP4, you should plan for a reboot.
Recommendations: #1 - Do all possible administrative work from your desktop, not directly on the server. #2 - If the server installation has problems, scheduled the needed downtime to fix them.
RLF
Tuesday, July 31, 2012 6:20 PM -
Abandoned or not it is misleading to others looking for answers to have someone else say this is the answer to a post when they have no clue. Just my two cents. I now know I can't trust actual answers in this forum.
We have not installed visual studio on this box. It has sql 2005 and management tools only. If SQL installs some visual studio I'm not aware of it but it has been awhile since I have done a sql install.
Is there an easy way to check for dll's?? I know in the past I have got "no such interface supported" and to fix this had to run:
C:\>regsvr32 msxml3.dll
C:\>regsvr32 msxml6.dll
When you installed the SQL Server client tools - you installed a version of Visual Studio. I have seen errors like you are having when either the SQL Server client tools, or Visual Studio were not updated.Jeff Williams
Wednesday, August 1, 2012 12:28 AM -
I had to uninstall the management tools and then reinstalled them. This did not fix the error.
Friday, August 3, 2012 8:40 PM -
Jeff where can I find the version of visual studio? I don't see it in add/remove programs.
The only thing listed remotely close is visual C++ 2008 redistributable 9.0.30729.4148.
No visual studio on any of my sql management setups.
Friday, August 3, 2012 8:46 PM -
Open up BIDS - you can see the version there.
Jeff Williams
Sunday, August 5, 2012 2:56 PM -
What is BIDS?
--------------------
Business Intelligence Development Studio
I found this installed on one of my sql servers. It maybe a tool option we have never installed because it is not required to use SQL. The tools on this server have been working for like 4 years and all of a sudden now I'm getting this error. So I don't believe Visual Studio is the issue as it is something we never installed.
- Edited by kokopelli2305 Monday, August 13, 2012 1:47 PM
Monday, August 13, 2012 1:31 PM -
BIDS = Business Intelligence Development Studio
http://msdn.microsoft.com/en-us/library/ms173767(v=sql.105).aspx
RLF
Monday, August 13, 2012 1:43 PM -
No one has provided a successful solution I'm closing this before someone marks an answer that is incorrect.
- Marked as answer by kokopelli2305 Thursday, September 13, 2012 6:51 PM
Thursday, September 13, 2012 6:51 PM