Top "Smo" questions

SQL Server Management Objects (SMO) are .NET objects for management of Microsoft SQL Server.

How to list available instances of SQL Servers using SMO in C#?

Can anybody explain me what I wrong I am doing in the following piece of code: DataTable dt=SmoApplication.EnumAvailableSqlServer(…

c# .net sql-server smo
smo restore database

I use SQL Server SMO to restore a .bak to a new database, but failed to work. sql server is 2012 …

c# sql-server sql-server-2012 smo
How to set CommandTimeout

I am using Microsoft.SqlServer.Management.Smo. My Code: Server server = new Server(new ServerConnection( new SqlConnection(ConnectionString)); server.ConnectionContext.…

c# smo sqlcommand command-timeout
Sql SMO: How to get path of database physical file name?

I am trying to return the physical file path of a database's mdf/ldf files. I have tried using the …

sql-server smo
Microsoft.SqlServer.Management.Smo Namespace - what do I need to install to resolve it?

I'm picking up a support call on a legacy piece of software. It has the following imports: using Microsoft.SqlServer.…

c# sql-server visual-studio smo
Drop all active database connections failed for Server when executing KillAllProcesses

I need to perform a database restore from my application. Before doing this, I want to kill all processes as …

sql-server smo
How to automate script generation using SMO in SQL Server?

I would like to automate script generation (in SSMS --> Tasks --> Generate Scripts) in SSMS 2008. I have …

sql-server sql-server-2008 powershell automation smo
How to generate sql scripts using SMO scripter

My database has tables, views and all. And I need a way to generate SQL script for all the DDL …

sql-server powershell smo
C# SMO backup of remote database to local machine

I have an application which performs backups and restores of SQL databases, this works fine on the local machine, however …

c# sql smo
Error restoring database backup to new database with smo and powershell

Taking a database backup from another server I'm trying to restore to sqlexpress on the localhost. This restore will work …

sql sql-server powershell restore smo