Solved

Backup SQL Database using SMO - Can't find Backup

Posted on 2012-12-30
3
557 Views
Last Modified: 2013-01-02
ok, I am having some problems with SMO.

1. I have followed the instructions here to add the references (connectionInfo, Management.Sdk.Sfc, Smo, SqlEnum)  

2. I have added to my form the following
using Microsoft.SqlServer.Management.Smo;
using Microsoft.SqlServer.Management.Common;

My code is as follows

Server srv = new Server("servername\\databasename");

Backup bkpDBFull = new Backup(); //Namespace name 'Backup' could not be found error. 

Open in new window


The error is : The type or namespace name 'Backup' could not be found (are you missing a using directive or an assembly reference?)      

Why is it not locating Backup? I am using VS2010 and SQL Server 2008 R2

I was following this code
0
Comment
Question by:elmbrook
3 Comments
 
LVL 35

Accepted Solution

by:
Robert Schutt earned 500 total points
ID: 38732112
Add a reference from the same folder as the others: SmoExtended.dll

Info found on: http://msdn.microsoft.com/en-us/library/microsoft.sqlserver.management.smo.backup.aspx
0
 
LVL 21

Expert Comment

by:Alpesh Patel
ID: 38734062
0
 

Author Closing Comment

by:elmbrook
ID: 38737749
The articles I found did not relate to this .dll file at all.
Thanks for the help
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

SQL Server engine let you use a Windows account or a SQL Server account to connect to a SQL Server instance. This can be configured immediatly during the SQL Server installation or after in the Server Authentication section in the Server properties …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now