.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

SMO Backup failed using Sql Server 2008 R2

Posted By:      Posted Date: May 22, 2011    Points: 0   Category :


To do database backup with C# I am using the following code:

 Server myServer = new Server(new Microsoft.SqlServer.Management.Common.ServerConnection(lServer, lUserID, lPassword));
                Microsoft.SqlServer.Management.Smo.Backup oBackup = new Microsoft.SqlServer.Management.Smo.Backup();
                oBackup.Action = BackupActionType.Database;
                oBackup.Database = lDatabase;
                oBackup.Devices.Add(new BackupDeviceItem(mBackupFileName, DeviceType.File));
                oBackup.Initialize = true;
                oBackup.Checksum = true;
                oBackup.ContinueAfterError = true;
                oBackup.Incremental = false;
                oBackup.LogTruncation = BackupTruncateLogType.Truncate;

View Complete Post

More Related Resource Links

VS Studio WorkFlow Failed on Start in MOSS 2007 ON Windows Server 2008 64 Bit


I have created a sequential sharepoint workflow in WSP Builder in my Sharepoint Server and Deployed it.

But the workflows says Failed on start and retrying ans stops there forever says couldn't start the workflow.

I repaired .NET Framework 3.5sp1 installed

 tried this

 1. I tried again, in C Prompt:  Lodctr "c:\Windows\Microsoft.Net\Framework\v3.0\Windows Workflow Foundation\perfcounters.ini"  it says initiation file cannot be found

2   i again tried this C prompt Lodctr /R "c:\Windows\Microsoft.Net\Framework\v3.0\Windows Workflow Foundation\perfcounters.ini"

it says reloaded  from the system restored

i am still getting the same error.

When i manually go to my  C:\Windows\Microsoft.NET\Framework\v3.0\Windows Workflow Foundation i can see a folder for SQL that's it nothing more than that..

I dont know what is happening i am trying it from 2 days and still no solution.

any ideas would be real great help for me.

My system is 64 bit , Window server 2008, MOSS SP2, Visual Studio 2008 Version 9.0.30729.

.Net Framework 3.5 sp1

and WSP builder the one from Codeplex for 64 bit machines

Server 2008 R2 -> Failed to decrypt using provider 'RsaProtectedConfigurationProvider'. Error mess


So I am using the aspnet_regiis.exe tool to encrypt sections of the web.config in my asp.net applications and services.  I have done this for years successfully on Windows Server 2003 (IIS 6).  However I just moved some apps over to Windows Server 2008 R2 (with IIS 7.5) and I am now receiving the following error at runtime:

"Server was unable to process request. ---> Failed to decrypt using provider 'RsaProtectedConfigurationProvider'. Error message from the provider: Bad Data."

Now I am quite familiar with this process and am stumped at what I have missed this time around.  I have done ALL of the following which typically suffices for the process on the server. PLEASE READ ALL AND DO NOT PROVIDE RESPONSES OR LINKS FOR THINGS I HAVE ALREADY DONE Thanks!!  Wink

  1. Imported the keys to the server using aspnet_regiis -pi  Result: Success
  2. Given FULL permission (using -full switch) using aspnet_regiis -pa to ALL of the following accounts  Result: Success
    1. SQL Server Express 2008 Setup fails. Support Rule "Restart Computer" Failed

      Hi, I have been trying to install SQL Server Express for most of the day now without any luck.  Whatever I do setup fails at the stage of Setup Support Rules, Rule "Restart Computer" - Failed.  Needles to say I have restarted (several times!) and I have tried downloading  and installing the "Advanced", "Tools" and "Basic" versions, all give the same error.  Trying a repair does the same.  I have been searching the net for an answer without success, any help would be MUCH appreciated. Further info: I am trying to install a stand-alone installation on to a single PC running under XP SP 3 with .NET 3.5 SP1 installed.  The PC did have some earler versions of SQL server installed but I (?hopefully?) removed all of these through Control Panel.  Before trying the first SQL install I installed Windows installer 4.5 and PowerShell 1.0 as per the Microsoft Instructions. Running SQL Server Configuration Manager results in an error (MMC could not create the snap-in. The snap in might not have been installed correctly).  A directory structure for SQL server exists in "Program Files".  Services MSC shows SQL Server (SQLEXPRESS) as Automatic Statup (not running).  Trying to start this manually gives error 14001: "application configuration incorrect - re-install to fix" .......... Which is precisely what I'm trying to do.........:(

Compatibility problem: an "sql server 2008 R2" db backup cannot be restored to an "sql server 2008"

To verify if the "2008 R2" version can be restored back to a "2008" dbserver I make an experiment:  construct a database on R2 version ( version : 10.50.xxx )  and backup it; then I try to restore the db backup to a "sql server 2008" db-server ( version : 10.0.xxx ) but get failed. Error message is as shown: The database was backed up on a server running version 10.50.1600. That version is incompatible with this server, which is running version 10.00.2531. Either restore the database on a server that supports the backup, or use a backup that is compatible with this server.   Originally I want to upgrade a "2008" server to "2008 r2" , but this problem withdraws me: if I do so , I am afraid all the existing clientuser's dbs cannot be backed up to themselves if they don't have "2008 r2" locally:   if a database is backed up under "2008 r2" environment whereas client user only has "2008" db server, does it mean he cannot restore it anymore?   So I wonder if there is an approach that helps me to create a "backward-compatible" database; when creating database on wizard there is an option to choose "compatibility level" but I don't think it meets my requirement..    Anyone can help me on this ??    

Backup SQL Server 2008 R2 Restore on SQL 2008

I have a SQL Server 2008 R2 instance that I need to backup and restore onto a SQL 2008 instance. When I attempt to restore the back up (.bak) database from the R2 SQL server onto the SQL 2008 server I get the following message: The database was backed up on a server running version 10.50.1600. That version is incompatible with this server, which is running version 10.00.2531. Either restore the database on a server that supports the backup, or use a backup that is compatible with this server. (Microsoft.SqlServer.Smo) How can i backup the SQL 2008 R2 database to be compatible with SQL 2008?Ian Ceicys

Failed to generate a user instance of SQL Server 2008 Express with Advance Services in Visual Studio

I used SQL Server 2008 Express with Advanced Services (not SQL Server 2008 Express) in Visual Studio 2010 because it is the fast and easy way to developed and managed data-driven applications with powerful built-in reporting and full-text search functionality. I received Sql Server 2008 Service Pack 1 with Windows Update. It's ok if I connect to instance of SQL Server 2008 Express with Advance Services (with SP1) through SQL Server Management, but if I try to attach a database in Server Explorer (Visual Studio 2010), I get the following error: "Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance. The connection will be closed." I'm stuck at this point. Is there a fix or a workaround? I've already tried deleting the 'C:\Users\Administrtor\AppData\Local\Microsoft\Microsoft SQL Server Data\SQLEXPRESS' directory as mentioned in other posts, with no luck. The error.log at 'C:\Users\Administrator\AppData\Local\Microsoft\Microsoft SQL Server Data\SQLEXPRESS\error.log' has the following relevant entries: 2010-09-01 14:44:10.47 Server      Error: 17156, Severity: 16, State: 1. 2010-09-01 14:44:10.47 Server      initeventlog: Could not initiate the EventLog Service for the key '3677F6D3-17C7-4F', last error code is 2. 2010-09-01 14:44:10.47 Server &

SQL Server 2008 R2 installation failed on Windows 7

ERROR LOG CONTENTS BELOW:   Overall summary:   Final result:                  SQL Server installation failed. To continue, investigate the reason for the failure, correct the problem, uninstall SQL Server, and then rerun SQL Server Setup.   Exit code (Decimal):           -2061893608   Exit facility code:            1306   Exit error code:               24   Exit message:                  SQL Server installation failed. To continue, investigate the reason for the failure, correct the problem, uninstall SQL Server, and then rerun SQL Server Setup.   Start time:                    2010-08-16 14:52:16   End time:                      2010-08-16 15:24:53   Requested action:              Install   Log with failure:   &n

SQL server 2008 compact editioin + Entity Framework: Can we backup the SQL server compact edition da

our application uses the SQL server 2008 compact edition and entity framework. The application will control the instrument. It may run for several days before it stops. In order to protect the database crash (database failure), we plan to backup SQL compact database during running. Can we backup or duplicate the ~.sdf when application is running? Is there any SQL server command we can call inside the application to achive the backup? Or we only can backup the database when application is not running. thx!  

Installing SharePoint 2010 with SQL Server 2008 - SQL Exception - Login Failed

Hello I've been trying to install SharePoint 2010 with SQL Server 2008 in my Windows Server 2008 R2 box. I've got the same error all the times. System Specifications Windows Server 2008 R2 SQL Server 2008 with SP1 SharePoint 2010 Enterprise 6GB RAM, 320GB HDD Installation Steps I followed Installed Windows Server 2008 R2 and joined it to our domain Logged in as domain administrator Installed SQL Server 2008 Selected the Local Service account for all the SQL Server 2008 services during installation Selected Mixed mode authentication Selected 'Add Current User' in all the other installation screens Installed SQL Server 2008 SP1 Installed SharePoint 2010 Selected Farm option Selected Complete Installation Tried to run the configuration wizard and got sqlexception error - login failed But i checked that the current user (domain admin) is having all the permissions. Also added the domain admin as Security Admin and DB Creator in SQL Server instance. Any ideas?  Regards NLV Visit SharePoint User group - India

sql server 2008 version upgrade failed access to path is denied

upgrading from 2008 r2 eval to 2008 r2 enterprise. Use the maintenance option from setup. Get pretty far along in the process.  But then the following error. ( an additional note. setup warns that I am running sql server on a domain controller server. ) The link the error message points to has nothing to say. Why would my sql server upgrade fail? If I have to reinstall, will I lose my database data? thanks,   TITLE: Microsoft SQL Server 2008 R2 Setup ------------------------------ The following error has occurred: Access to the path 'C:\Program Files\Microsoft SQL Server\100\License Terms\SQLServer2008R2_License_ENT_1033.rtf' is denied. Click 'Retry' to retry the failed action, or click 'Cancel' to cancel this action and continue setup. For help, click: http://go.microsoft.com/fwlink?LinkID=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=10.50.1600.1&EvtType=0x60797DC7%25400xBB814387  

SQL Server 2008 Installation / Uninstall failed: Error 1603

Hello! I've been trying to install the SQL Server 2008 CTP 5.0 on a Windows Server 2008. The installation failed and left the shared components installed but the database engine was missing. So I tried to roll back the installation and stumbled upon the problem again. Now I can't install or uninstall any SQL Server (I tried 2005 as well) without these results. This is the file *Sql_Cpu32_1_ComponentUpdateSetup.log === Verbose logging started: 01.01.2001  20:30:03  Build type: SHIP UNICODE 4.00.6001.00  Calling process: C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\setup100.exe ===MSI (c) (30:CC) [20:30:03:671]: Resetting cached policy valuesMSI (c) (30:CC) [20:30:03:671]: Machine policy value 'Debug' is 0MSI (c) (30:CC) [20:30:03:671]: ******* RunEngine:           ******* Product: {8151C56C-5426-481C-96AF-F221FE1A10F2}           ******* Action:            ******* CommandLine: **********MSI (c) (30:CC) [20:30:03:687]: Client-side and UI is none or basic: Running entire install on the server.MSI (c) (30:CC) [20:30:03:687]: Grabbed execution mutex.MSI (c) (30:CC) [20:30:04:062]: Cloaking enabled.MSI (c) (30:CC) [20:30:04:062]: Attempting to enable all disabled privileges before calling Install on ServerMSI (c) (30:CC) [20:30:04:125]: Incrementing counter to disable shutdown. Counter after increment: 0MSI (s) (DC:28) [20:30:04:218]: Grabbed execution mutex.MSI (s) (

SQL Server Reporting Service 2008 R2 - The request failed with HTTP status 401: Unauthorized.

I got the error "The request failed with HTTP status 401: Unauthorized." when I call the Reporting Service Web Service.

The code is very simple:

// Initialise the reporting service Web Service

this.RSWebService = new ReportingService2010();

// Pass windos authentication credentials to Web Service

this.RSWebService.Credentials = System.Net.CredentialCache.DefaultCredentials;

// List children

List<CatalogItem> reports = this.RSWebService.ListChildren(folder, false).ToList();

The SQL Server is installed on a different machine (say server A) from the Web server (say server B). We are using Windows Server 2003.

The code work fine for all the scenario below:

i) Run locally (XP) to call the web service on the sql server

ii) Provide the Network Credentials with the username, password, and domain when calling the web service

iii) If the web server and sql server is using same server (i.e. not distributed)

I'm using windows authentication and impersonation. Any idea?

SQL Server 2008 Feature Upgrade Failed



I have an installation of SQL Server 2005 Express, and I'm trying to upgrade it to SQL Server 2008 Express.  During the installation, when it gets to the "Upgrade Rules" part, everything passes except for "SQL Server 2008 Feature Upgrade."  It says the specified edition upgrade is not supported, but according to the upgrade matrix it should be.  We plan on purchasing licenses for the Enterprise edition, but I would like to figure this out in the meantime.



SQL Server 2008 Installation on SBS 2003 - Rule "Operating system supported for edition" failed


I'm trying to install SQL Server 2008 for Small Business, on a Windows Server 2003 SBS, which is a Domain Controller on a less than 50 users ' domain. I'm logged in with the Administrator account, wich belongs to the 'Doman admins' group also. Setup failed with this error:

2010-09-25 11:55:34 Slp: EditionRequirementCheck Rule Check : The edition is not allowed on this OS.
2010-09-25 11:55:34 Slp: Evaluating rule        : EditionRequirementCheck
2010-09-25 11:55:34 Slp: Rule running on machine: DELL1
2010-09-25 11:55:34 Slp: Rule evaluation done   : Failed
2010-09-25 11:55:34 Slp: Rule evaluation message: This SQL Server edition is not supported on this operating system. See SQL Server Books Online for information about supported operating systems for SQL Small Business Server edition.

According to this link, this version is supported on Windows Server 2003 SBS: http://msdn.microsoft.com/en-us/library/ms143506%28SQL.100%29.aspx#SE32

I've tried to diagnose the error, after reading this link: http://blogs.technet.com/b/sbs/archive/2010/07/21/how-to-diagnose-quot-operating-system-supported-for-edition-quot-pre-requisite-errors-while-installing-sql-2008-standard-edition-for-small-business.aspx

After a new

How to take backup of single table in SQL server 2008 and SQL Server Management Studio Environment



I know how to take total database backup in SQL server 2008 and SQL Server Management Studio Environment but i failed to take single table backup in database.

It is possible to take single table backup in Oracle using PL/SQL Developer IDE.

Thanks in Advance..... 

Failed to install .Net Framework 3.5 SP1 on windows server 2008 SP1(x64)

I followed instruction http://social.msdn.microsoft.com/Forums/en/netfxsetup/thread/6c8d4d98-b6cd-4702-bc90-d048ca31a7b2 to install the collect the log files. I checked other posts for similar problem, but seems none of them are exactly the same.

I uploaded the log files and winver to http://cid-a74010283a9fb544.skydrive.live.com/browse.aspx/.Public?uc=2

dd_dotnetfx35error has the following content.

[03/07/10,14:57:53] Microsoft .NET Framework 3.0SP1 (x64) (CBS): [2] Error: Installation failed for component Microsoft .NET Framework 3.0SP1 (x64) (CBS). MSI returned error code 1603
[03/07/10,14:58:23] WapUI: [2] DepCheck indicates Microsoft .NET Framework 3.0SP1 (x64) (CBS) is not installed.
[03/07/10,21:35:26] Microsoft .NET Framework 3.0SP1 (x64) (CBS): [2] Error: Installation failed for component Microsoft .NET Framework 3.0SP1 (x64) (CBS). MSI returned error code 1603
[03/07/10,21:35:55] WapUI: [2] DepCheck indicates Microsoft .NET Framework 3.0SP1 (x64) (CBS) is not installed.
[03/10/10,22:50:26] Microsoft .NET Framework 3.0SP1 (x64) (CBS): [2] Error: Installation failed for component Microsoft .NET Framework 3.0SP1 (x64) (CBS).

SQL server 2008 cluster install error - The resource failed to come online due to the failure of o


Hi ,

I ran into the following error when trying to install sql server 2008 cluster (node 1) on windows 2008

The resource failed to come online due to the failure of one or more provider resources. (Exception from HRESULT: 0x80071736)

Any insight on this issue is greatly appreciated





ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend