Questions tagged [sqldmo]

SQL Distributed Management Objects (SQL-DMO) is a collection of COM objects that are designed for programming all aspects of managing Microsoft SQL Server.

SQL Distributed Management Objects (SQL-DMO) is a collection of COM objects that are designed for programming all aspects of managing Microsoft SQL Server.

This feature will be removed in a future version of Microsoft SQL Server. Avoid using this feature in new development work, and plan to modify applications that currently use this feature.

27 questions
4
votes
3 answers

Is it possible to use a trusted connection (SSPI) with the SQLDMO API?

I am using the DMO API via .NET to provide an alternative interface to job scheduling functionality on SQL Server 2000 Agent. The working code looks something like this: using SQLDMO; internal class TestDmo { public void StartJob() { …
Paul Sasik
  • 79,492
  • 20
  • 149
  • 189
3
votes
2 answers

Programmatically retrieve database table creation script in .NET

I need to be able to retrieve a CREATE TABLE script to recreate a specific table in a SQL Server (2000) database, programmatically (I'm using C#). Obviously you can do this with Enterprise Manager but I would like to automate it. I've been playing…
Jivlain
3
votes
3 answers

Application cannot find Microsoft.SQLServer.SMO on SQL 2008 machine

I have code that uses Microsoft.SqlServer.Management.Smo. (Built in Visual Studio 2005 SP1) It works fine on SQL 2000 & SQL 2005 machine. But when it is run on SQL 2008 machine it throws an exception: System.IO.FileNotFoundException: Could not load…
Ganesh R.
  • 4,337
  • 3
  • 30
  • 46
2
votes
2 answers

How to list SQL 2005 Express instances

I would like to list what instances of SQL 2005 Server (Express Editon) are installed on local or remote machine (my app is in Native C++). I found that i can make it by SQLDMO, however it seems that SQLDMO does not see SQL 2005 Express Edition and…
Marcin
2
votes
3 answers

SQL Server 2008 alternative for SQL-DMO

I previously was using SQL-DMO to automatically generate scripts from the database. Now I upgraded to SQL Server 2008 and I don’t want to use this feature anymore since Microsoft will be dropping this feature off. Is there any other alternative I…
user345929
  • 23
  • 1
  • 4
2
votes
1 answer

SQL SMO - checking if a user is a server admin

I want to check if the connected user is a SQL Server admin (in the sysadmin role) and wondering if this is this is the best way to do it? private static bool IsUserAdmin(Server server) { Login login =…
noonand
  • 2,763
  • 4
  • 26
  • 51
2
votes
1 answer

Problem using SQLDMO/Vb6 against SQL Server 2008

I have a client, that uses SQLDMO for a portion of a custom application that was written against SQL Server 2000, and they recently upgraded to SQL Server 2008. The majority of the app still runs fine (doesn't use SQLDMO), but the admin functions…
E.J. Brennan
  • 45,870
  • 7
  • 88
  • 116
2
votes
1 answer

Connecting SQL server through SQLDMO

I was able to connect to remote SQL server through SQLDMO residing my hosting server. There was no issue. Now as I've Just switched to the new hosting provider, I can connect to the database server through SQL server management studio but SQLDMO I…
developer
  • 521
  • 1
  • 5
  • 21
1
vote
1 answer

SQL Server and DMO using ADODB

I'm maintaining a legacy server app that generate DMO files from SQL Server views. Sometimes the server crashes because SQL Server consumes all cpu resources. Using the SQL Server monitor I see that the problem is in SQLDMO connections that are…
user1151835
1
vote
1 answer

SQL DMO based code generator

I already have a code generator based on SQL DMO, that writes the a C# function for any stored procedure in by SQL Server 2008 database. Currenly however the code generator can only handle stored procedures that have input and output parameters. For…
klork
  • 572
  • 1
  • 8
  • 15
1
vote
0 answers

SQLDMO.SQLServer: "A dynamic link library (DLL) initialization routine failed."

I'm having a bit of trouble getting the following piece of code running and am at a loss as to why it isn't working: VBS Script: On Error Resume Next WScript.StdOut.WriteLine("Start") Dim oServer Set oServer =…
TomSelleck
  • 6,706
  • 22
  • 82
  • 151
1
vote
4 answers

VB6 support for SQL SMO and .Net 2.0

We are trying to move from using SQL DMO to SMO in our COM+ based application, as we are dropping support for SQL Server 2000 and adding support for SQL Server 2008 in addition to SQL Server 2005. I have been reading around on this, and found this…
Mostlyharmless
  • 2,285
  • 19
  • 28
0
votes
1 answer

VS2010 - what is the current library of choice for performing various sql admin tasks from C#

I've been tasked with writing a C# Winforms application to simplify some of our common SQL admin tasks. In the past I've worked with various SQL libraries which have simplified many aspects of the task such as interrogating and amending the schema,…
mattpm
  • 1,310
  • 2
  • 19
  • 26
0
votes
1 answer

System.Web.Services.Protocols.SoapException: Server was unable to process request

i am using .net webservice for restoring the database in sqlserver. i am using SQLDMO.dll, to restoring database, when i run the app, i getting the following Error. System.Web.Services.Protocols.SoapException: Server was unable to process request.…
Senthil
  • 13
  • 2
  • 7
0
votes
1 answer

What could cause database restore from a network share to fail?

I'm using SQL-DMO to restore a database backup that is located on a network share into a instance of SQL Server running on the local machine. The code works fine on my machine. But on a test VM it only works if I put the backup in a local path. If I…
R. Martinho Fernandes
  • 228,013
  • 71
  • 433
  • 510
1
2