SQL SMO Object | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

SQL SMO Object

hi all, i’am engaged in migrating the database of one application which is developed in VB6.0 and SQL Server2000 to SQL server2005. Here the client is using the SQL DMO objects of SQL2000 to perform many database data manipulations for the end user, my problem is when i’am connecting the application to SQL2005 that session is ending up with an error. From the compatibility documentations i come to know that we need to use SQL SMO objects instead of SQL DMO , when i checked in msdn online i could only find code to connect to vb.net, can any one provide me information how to use SQL SMO object in VB 6.0….. thanks in advance Mat
You can still use SQL Server 2005 with SQL-DMO, but SQL-DMO will not be updated to manage features that are specific to SQL Server 2005. http://www.microsoft.com/sql/prodinfo/overview/whats-new-in-sqlserver2005.mspx What error are you getting? Did you enable ADHOC REMOTE QUERIES and OLE AUTOMATION options in SAC for sql 2005.
Mohammed U.
hi Mohammed i was testing the scenario and i found that the client which is installed with SQL2005 management studio for development is working with DMO reference as you said and as per as the MS documentation, but in a machine where SQL2000 client or nothing is installed the application is showing the following error… "run-time error ‘55555’; to connect to this server you must use SQL Server management Studio or SQL Server management objects(SMO)." the portion of the DMO code fails is while connecting to the server Private servobj As SQLDMO.SQLServer servobj.Connect sservername, UserName, Password i hope now the scenario is clear , is there any dll with SQL2005 that can be deployed along with the application to make SQL DMO work???? i don’t know much about ADHOC REMOTE QUERIES and OLE AUTOMATION options in SAC for sql 2005 will it solve my problem Mat

See thishttp://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=88&SiteID=1 is any help.
Also please note
quote:
The Distributed Management Objects feature is installed by Microsoft SQL Server 2005 as a legacy component. To install the Legacy Components feature, click Advanced on the Components to Install page during SQL Server Setup. Expand the Client Components feature and then select Legacy Components.

Satya SKJ
Microsoft SQL Server MVP
Contributing Editor & Forums Moderator
http://www.SQL-Server-Performance.Com
This posting is provided AS IS with no rights for the sake of knowledge sharing.
I am not sure enabling ADHOC REMOTE QUERIES and OLE AUTOMATION options in SAC for sql 2005 will solve your problem or not… you can try it… Based on your info install Backward Compatibility Components as Satya mentioned…
You download them from the following.. Microsoft SQL Server 2005 Backward Compatibility Components
http://www.microsoft.com/downloads/…60-a13c-4479-9b91-9e8b9d835cdc&displaylang=en
Mohammed U.
Hi i downloaded the Backward Compatibility Components MSI file from the given link but when i tried to install that in W2k Proffessional SP4 its asking for windows installer latest version, i downloaded WindowsInstaller-KB893803-v2-x86.exe and installed that too but it seems that msi file is not executing and its asking some documents.exe to locate it.
did anyone face this kind of problem…… Mat

I have installed dts addins but on windows 2003 server and did not get into any issues… try installing on xp.. Mohammed U.
Check with Windows Installer version 3.0 in this case, have you tried from a XP related machine. Satya SKJ
Microsoft SQL Server MVP
Contributing Editor & Forums Moderator
http://www.SQL-Server-Performance.Com
This posting is provided AS IS with no rights for the sake of knowledge sharing.
yes its working on win2003 but i can’t try it on win2003 or XP as my all clints are installed with Windows2000 Proffessional service pack4….
meanwhile i tried another thing i replaced the sqldmo.dll from my SQL2005 installed machine to the win2k clients and it seems the functionality of DMO is back in the application but i’am not sure any side effects can cause by this act, thats why i’am trying the stright method by trying with Backward compatibility components. Mat
That seems to be sensible in this case, as due to the nature of DMO native in SQL 2005 and extensive usage of SMO. Satya SKJ
Microsoft SQL Server MVP
Contributing Editor & Forums Moderator
http://www.SQL-Server-Performance.Com
This posting is provided AS IS with no rights for the sake of knowledge sharing.
]]>