Solved

Backup SQL Database using SMO - Can't find Backup

Posted on 2012-12-30
3
604 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free eBook: Backup on AWS

Everything you need to know about backup and disaster recovery with AWS, for FREE!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

738 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