?
Solved

Backup SQL Database using SMO - Can't find Backup

Posted on 2012-12-30
3
Medium Priority
?
637 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 2000 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
 

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

762 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