Questions tagged [smo]

SQL Server Management Objects (SMO) are .NET objects for management of Microsoft SQL Server. The namespace is "Microsoft.SqlServer.Management.Smo".

The Microsoft.SqlServer.Management.Smo namespace contains classes that represent the core SQL Server Database Engine objects. These include instances, databases, tables, stored procedures, and views.

The Microsoft.SqlServer.Management.Smo namespace contains the instance object classes that represent SQL Server Database Engine objects and some utility classes that represent specific tasks, such as scripting. When a connection to the instance of the SQL Server Database Engine has been established by using a Server object variable, objects on the instance can be accessed by using the SMO instance objects. For example, you can use the Database object to access databases on the connected instance of SQL Server Database Engine. All the instance classes are related to the Server class in the object hierarchy. Utility classes exist outside of the Server class object hierarchy and represent specific tasks, such as backup or scripting.

Most of the classes Microsoft.SqlServer.Management.Smo namespace resides in the Microsoft.SqlServer.Smo.dll and Microsoft.SqlServer.SmoExtended.dll files. Additionally, some of the enumeration classes are in the Microsoft.SqlServer.SqlEnum.dll and Microsoft.SqlServer.SmoEnum.dll assembly files. You will have to import all four files to access all of the classes in the Microsoft.SqlServer.Management.Smo namespace.

src=http://msdn.microsoft.com/en-us/library/microsoft.sqlserver.management.smo.aspx

810 questions
0
votes
2 answers

How to achieve Multiclass classification in weka SMO classifier?

I am using weka for classification. In weka i am using SMO to classify the documents.In some situation SMO return wrong category. For example take 2 category Computer and Cricket.First i trained and created model for these 2 category.Then i am going…
SANN3
  • 9,459
  • 6
  • 61
  • 97
0
votes
1 answer

ConnectionFailureException thrown in XP when using SMO with Windows Authentication

I'm trying to use SMO in a ASP.NET web project to get a list of the server's Databases. The method I'm using seems to work fine on a Windows 7 machine, but the second I install it on an XP machine, I get a ConnectionFailureException. The code I'm…
Devo
  • 301
  • 2
  • 12
0
votes
1 answer

Back failed for Server

http://www.daniweb.com/software-development/csharp/threads/202843/take-backup-of-sql-server-database-using-c Error : Back failed for Server I am using smo code from this thread , but it cant backup... My Code : Server s = new…
greatmajestics
  • 1,083
  • 4
  • 19
  • 41
0
votes
1 answer

Using SMO from multiple threads

I am using the SQL Server Managment Objects in my application. Most operations on the SMO objects in the application are directly triggered from the UI. E.g. a user manipulating an object which results in reading or writing properties from an SMO…
aKzenT
  • 7,775
  • 2
  • 36
  • 65
0
votes
1 answer

Is it possible to create backup jobs on SQL Server 2008 R2 Express with SMO

In our software because the users are using SQL Server 2008 R2 Express, I would want to create backup jobs for them programmatically using the SMO API. Is it possible? If possible point me to any articles written on this light of this topic.
Soham Dasgupta
  • 5,061
  • 24
  • 79
  • 125
0
votes
1 answer

Microsoft.SqlServer.Management.SqlParser nedded in clickonce

I want to make a click once via ftp, after deploying the project and excute I have Microsoft.SqlServer.Management.SqlParser V 10.0 needed . I have installed 1033\x64\SharedManagementObjects.msi Version 10.50.2500.0 but I can't found this file in…
Akrem
  • 5,033
  • 8
  • 37
  • 64
0
votes
1 answer

How to create database using SMO with everyone having permission?

I am trying to create a SQL Server Express database using SMO like so: Database db = new Database(server, dataSource); ... db.Create(); I am able to use the database fine. But, if someone else tries to copy the database, they get file permission…
bsh152s
  • 3,178
  • 6
  • 51
  • 77
0
votes
2 answers

Transfer Database from SQL-Server 2005 to SQL-Server 2008

I have an existing application that transfers a Database from a source server to a target server via SMO "Transfer". We transfer only the data. Both SQL-Servers are 2005. Now we upgrade the target server to SQL-Server 2008. Will the transfer via SMO…
Mathias F
  • 15,906
  • 22
  • 89
  • 159
0
votes
2 answers

SmoApplication.EnumAvailableSqlServers() does not list default instance if sqlexpress is in same machine where SQLSERVER2008 installed

I am using SMO to find available sqlservers of a network.But in one machine where i running application it doesnot give Default instance name but for all other machines it gives the named and default instance wil be showing. Observe my…
Cute
  • 13,643
  • 36
  • 96
  • 112
0
votes
1 answer

SMO Stored Procedure Discovery

I'm trying to figure out the inputs and the outputs of any SQL Server 2008 stored procedure. I'm using SMO to connect to a database instance, then I'm grabbing all of the databases and each of the databases stored procedures. Currently, I can take…
Tyler Wright
  • 795
  • 1
  • 9
  • 28
0
votes
2 answers

Executing SQL scripts with GO statements without SMO

One thing I’m having problems with, is deploying app to machine not having SMO installed on it. I want to execute scripts having GOstatements, but also would like to avoid the need for installing SMO package on a target machine or parsing SQL script…
dragan.stepanovic
  • 2,955
  • 8
  • 37
  • 66
0
votes
1 answer

bug in a table creation using smo

I am trying to create a simple table testtable using SQL Server Management Objects (SMO) in a winforms application. Database db = srv.Databases["model"]; Table t = new Table(db,"testtable"); DataType dt = new DataType(SqlDataType.Int); Column c =…
user1386919
0
votes
1 answer

Is there a way to find a dll reference in Visual Studio?

I have a ClickOnce-deployed project. Last release, I found ClickOnce added a Microsoft.SqlServer.Diagnostics.Starace.dll as prerequiste. I'm not sure why it was added. It seems if I pen the project on a pc that doesn't have this file in the GAC,…
L.T.
  • 673
  • 7
  • 16
0
votes
1 answer

WEKA: Classifying an ARFF data with a given SMO model

I'm new with weka and this is my problem: I've a unlabeled arff data and a given SMO model; I need classify this data with that model. I searched examples, but all of them use a testing set to build classifier and I've not testing sets. I need get…
antonioc
  • 49
  • 7
0
votes
1 answer

How to Get Corresponding datafile path if i pass datafile name

How to get enumfiles method in DMO in SMO means if i pass the master datafil;es to a method then it wil return the corresponding datafile path and logfile path. is there is any such method in SMO ?? for ex:in DMo Enumfiles(master) then it wil return…
Cute
  • 13,643
  • 36
  • 96
  • 112
1 2 3
53
54