November 15, 2004 at 9:08 am
Has anyone encountered this yet? I wanted to try the new SMO (SQL Management Objects) from Yukon Beta 2 using Visual Studio .NET 2003. I followed the directions in the BOL to add a referrence to the SMO dlls and I get the following error message: This is not a valid assembly or COM component.
Does SMO only work with VS .NET 2005?
November 15, 2004 at 10:48 am
Probably. Only because VS .NET 2K3 was released prior to 2K5 and all of the different functionality would not be ready for release yet
Good Hunting!
AJ Ahrens
webmaster@kritter.net
December 6, 2004 at 6:11 am
Just an FYI to anyoine out there...I installed VS .NET 2005 beta and the SQL SMO namespace worked fine.
Jeff
February 17, 2005 at 6:14 am
SMO is replacing SQL WMI if I read this correctly.
Will the actual sql 2k wmi ( x86\other\wmi\setup ) still work on this new release ?
Meaning will existing scripts still work or will you only be able to administer through a vs.net 2005 created program ?
Or is an option availabe to use these namspaces from script as in this example
' MyDB is the target DB
objRoleName = "My_role_MyDB_r" ' Role defined in MyDB
ObjUserName = "NewUser" ' User defined in MyDB
cmdobj = "sp_addrolemember " ' in case I need looping with variables later on
Set objLocator = CreateObject("wbemscripting.swbemlocator")
' Connect to correct NS
Set ObjServices = ObjLocator.ConnectServer(".", "root\microsoftsqlserver")
' Integrated security version
ObjServices.security_.impersonationlevel = 3
' What DB was that again
set objService2 = objServices.Get("MSSQL_Database.SQLServerName='(LOCAL)',Name='MyDB'")
' Make the cmd usefull
cmdobj = cmdobj & "'" & objRoleName & "', '" & ObjUserName & "'"
' Let us not wait anylonger do it
objService2.executeimmediate(cmdobj)
Thx
Marc
February 17, 2005 at 6:20 am
I don't think your assumption is correct...SMO is a replacement for the old DMO COM objects from SQL Server 2000. WMI still exists in whatever form it is. I'm not that familiar with WMI so I can't answer your specific questions. I believe there is a .NET version of the WMI objects.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply