.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

database restore remains blocked with no error messages

Posted By:      Posted Date: September 28, 2010    Points: 0   Category :Sql Server

I'm trying to restore an olap database exported from a remote machine, with an AS instance  with this version:

Microsoft SQL Server Management Studio                        10.0.2531.0
Microsoft Analysis Services Client Tools                        10.0.1600.22
Microsoft Data Access Components (MDAC)                        6.0.6002.18005
Microsoft MSXML                        3.0 6.0
Microsoft Internet Explorer                        8.0.6001.18882
Microsoft .NET Framework                        2.0.50727.4200
Operating System                        6.0.6002


on my machine (Windows Vista Business SP2 32 bit), where I have this version of AS:

Microsoft SQL Server Management Studio &n

View Complete Post

More Related Resource Links

Stuck during restore process, no error messages

I need to restore a solution (a webpart) from a Sharepoint 2010 backup to another Sharepoint 2010 installation on another server. In CA and exactly in the page _admin/BackupStatus.aspx I see that: A backup or restore is currently in progress. There are no current or recent backup or restore processes to show. If you recently started a backup or restore process, you may need to refresh this page after several minutes for it to appear. Hours have passed since I started the restore process In _admin/ServiceRunningJobs.aspx there is no backup/restore job running. The question is: What can I do to try again a restore if I cannot stop the restore that is "running"? Please Help.  

Error when running an SQL script to restore a database on SQL Server 2008 R2 Express

Hi, At work, I use SQL Server 2008 Express running on Windows XP Professional Service Pack 3. At home, I also use SQL Server 2008 Express running on Windows XP Professional Service Pack 3. Whenever I do work on the database at work, I usually restore the database at home (or vice versa) I have been using the following SQL scripts to back up the database and to restore the same database (at work or at home). BackupRealEstate.sql USE Master BACKUP DATABASE [RealEstate] TO DISK = N'F:\My Documents\My Database\RealEstate.bak' WITH NOFORMAT, INIT, NAME = N'RealEstate-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10 GO RestoreRealEstate.sql USE Master RESTORE DATABASE [RealEstate] FROM DISK = N'F:\My Documents\My Database\RealEstate.bak' WITH  FILE = 1, NOUNLOAD, REPLACE, STATS = 10 GO Everything worked fine until I replaced my 8yo home computer with a newer and faster one. My new home computer is running Windows 7 Home Premium and I use the latest SQL Server 2008 R2 Express. When I tried to run the above restore SQL script, I got the following error message: Msg 3101, Level 16, State 1, Line 2 Exclusive access could not be obtained because the database is in use. Msg 3013, Level 16, State 1, Line 2 RESTORE DATABASE is terminating abnormally. There was no other application/process using this database. Can someone please help me? Regards,

Error during database restore

Hi,I'm trying to restore a database backup but I get this error.  What does it mean exactly?Thanks!TITLE: Microsoft SQL Server Management Studio------------------------------ Restore failed for Server 'WHIDBEY1'.  (Microsoft.SqlServer.Smo) For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.1314.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Restore+Server&LinkId=20476 ------------------------------ADDITIONAL INFORMATION: An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo) ------------------------------ The media set has 2 media families but only 1 are provided. All members must be provided.RESTORE DATABASE is terminating abnormally. (Microsoft SQL Server, Error: 3132) For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.1314&EvtSrc=MSSQLServer&EvtID=3132&LinkId=20476 ------------------------------BUTTONS: OK------------------------------

SQL2008 error on restore databse (database is in use) error 3010


We have to do a lot of restore from backups for a development on a production sql 2008 server.

This daily job or by request job will have 3 steps.

Step 1 kill the user that was using such @dbname

declare killprocess_cursor cursor for
select a.spid from sysprocesses a join
sysdatabases b on a.dbid=b.dbid where b.name=@dbname


Step 2 Restore database, from a fixed path using a T-Sql

RESTORE DATABASE db_abc FROM DISK = 'H:\RestoreDB\db_abc_FullBK.bak' with replace

Step 3 restore users


Sometimes the daily job will fail at 2. The by request job will fail at 1.

I am concern with daily job failure now. Error message:

Executed as user: myDomain\myISAgentAcct. Exclusive access could not be obtained because the database is in use. [SQLSTATE 42000] (Error 3101)  RESTORE DATABASE is terminating abnormally. [SQLSTATE 42000] (Error 3013).  The step failed.


When I use sp_who2, there is none using the db and rerun result with the same error. I have to take it offline, detach, attach again and rerun the job to finish it without error.


What bugs me... the job will run for in most days and fail in other. I already has a kill user step and no one works at the schedule night time.

My last suspicion... either Report service has a hold on

restore 2005 database into 2008 error 3154


I am trying to restore a 2005 database to a 2008 database.  This is the code that was generated by Management studio:




restore 2005 database into 2008 error 3154


I am trying to restore a 2005 database to a 2008 database.  This is the code that was generated by Management studio:




ERROR [HY000] [Informix .NET provider][Informix]Database locale information mismatch


Hi, there is an upgrade to my infimacs server and my web application encounter this error after the infimacs is upgraded.

Below is the information on the server before/after the upgrade.

Before            After

---------       -----------  

Solaris 8      Solaris 10

IDS 9.40     IDS 11.50

The web server where the web application hosted is running IBM Informix Connect 2.81. There is no such error before the upgrade is done.

As a developer, i have IBM Informix Client-SDK 2.90 installed on my local pc and debug the page where the read is needed from infimacs but no such error found.

The error come out only when it is hosted on the web server where IBM Informix Connect 2.81 is installed.

I have gone through many articles and it suggest me to set the environement  variable in the server :  DB_LOCALE=en_us.819.

I haven't try this solution but i think that this might not be the best solution.

Is it possible to to to have this settin

Activation error occured while trying to get instance of type Database, key "DBName"


Im using Enterprise library 5.0
I have a scenario, where I have to access two different databases in my application.

Basically this application is a webservice,delployed on my local for testing purpose.
I'm trying to access this web method from diffent windows application, default connection works fine but the other database throw's exception.

Problem is only my defaultDatabase is works fine, if I change defaultDatabase="MYCON1" with "MYCON2" it works fine, if I try to access the other database which is not default, throws exception.

<dataConfiguration defaultDatabase="MYCON1" />
<add name="MYCON1" connectionString="Data Source=server1;Initial Catalog=dbName1;User Id=Username1;Password=password1;"

" />
<add name="MYCON2" connectionString="Data Source=Server2;Initial Catalog=dbName2;User Id=Username2;Password=password2;"
providerName="System.Data.SqlClient" />

Database myDB=EnterpriseLibraryContainer.Current.GetInstance<Database>(); --> works fine for the default database (MYCON1)

Database myDB=EnterpriseLibraryCo

Quick Error messages with Global.asax

The article Quick Error messages with Global.asax was added by lykasd on Wednesday, August 11, 2010.

Error pages without any effort void Application_Error(object sender, EventArgs e) { Server.Transfer("/error.aspx"); //Displays the error page } In error.aspx add this to the content area. p>We&#39;re sorry, but the %=Server.GetLastError

How to fix error in MVC movie database tutorial from Asp.net?


I followed the tutorial at http://www.asp.net/mvc/videos/creating-a-movie-database-application-in-15-minutes-with-aspnet-mvc At 12:04 in the video, the author,  Stephen Walther. inclues the line

            return View(_entities.MovieSet.ToList());
When I tried to compile this I get an error: 
Error 1 'MovieApp.Controllers.MoviesDbEntities' does not contain a definition for 'MovieSet' and no extension method 'MovieSet' accepting a first argument of type 'MovieApp.Controllers.MoviesDbEntities' could be found (are you missing a using directive or an assembly reference?) P:\experiment\MovieApp\MovieApp\Controllers\HomeController.cs 18 35 MovieApp

If I just enter return View(_entities. then Intellisense  offers Equals, GetHashCode, GetType, and TosString.

Does this suggest that _entities is not being i

SQLCMD: Changed Database Context messages

Is there a way to suppress the "Changed Database Context to " messages in SQLCMD?  For example, I get the following: 1> use master2> goChanged database context to 'master'.1>I am trying to migrate some legacy batch files that called isql and used the output files.  These extra "Changed Database Context to " messages are causing our scripts to break, and I was hoping to avoid having to write something extra to handle these messages.Thanks.

DATABASE/ADO ERROR need help asap please!

  We are running SQL server 2005 under WS 2003.  This error is showing up in our log every time there is a select.  I  have looked everywhere for a solution and cannot find one that works.       DATABASE/ADO ERROR  Error Number: -2147467259 Error Description: [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionWrite (send()). Error Source: Microsoft OLE DB Provider for ODBC Drivers  

SQL2008 - Cannot Restore a new database from a full backup of a different one, database in use

I am trying to restore a brand new database from a copy of another one and am encountering an error message stating: System.Data.SqlClient.SqlError: The file <Backup source database file location> cannot be overwritten.  It is being used by database <Backup Source Database>. (Microsoft.SqlServer.Smo) I am running the Restore procedure with the REPLACE option and am wondering why it is stating that the source database is the database in use when I am trying to restore and overwrite a completely different database. This issue happens when running the replace both in C# using SMO and when manually restoring with SqlServer Management Studio Interesting note is, the original source database is created / deployed using a database project within VisualStudios 2010 and then deployed to SqlServer through VisualStudios. Any thoughts on why this is happening? Thanks in advance for any help!

MDW Disk Usage for Database Report Error - A data source has not been supplied for the data source D

Hello, On the MDW Disk Usage Collection Set report, I get the following error when I click on a database hyperlink. A data source has not been supplied for the data source DS_TraceEvents SQL profiler shows the following SQL statements are executed (I've replaced the database name with databaseX) 1. exec sp_executesql N'SELECT dtb.name AS [Name] FROM master.sys.databases AS dtb WHERE (dtb.name=@_msparam_0)',N'@_msparam_0 nvarchar(4000)',@_msparam_0=N'databaseX' this returns zero rows as databaseX does not exist on my MDW central server, but is a database on a target server (i.e. one that is being monitored and uploaded into the MDW central server). 2. USE [datatbaseX] this produces the following error: Msg 911, Level 16, State 1, Line 1 Database 'databaseX' does not exist. Make sure that the name is entered correctly. why is the report looking for the database on my server? thanks Jag Environment: MDW (Management Data Warehouse) on SQL 2008 R2  

Error in RESTORE in LOG FILE. Anyway to exclude it?

I'm trying to install a database (on a SQL Server 2008 machine) with test data sent by a partner company in the form of a .BAK file. (Version of SQL Server they are using unknown). I'm using this script: Use Master RESTORE DATABASE XEMS FROM DISK = 'C:\temp\xemstest6-29.bak' WITH REPLACE, MOVE 'XEMS' TO 'E:\XEMS DATABASE\XEMS.MDF', MOVE 'XEMS_Log' TO 'E:\XEMS DATABASE\XEMS_Log.LDF' The Restore process churns for a while, then I get: Processed 2576 pages for database 'XEMS', file 'XEMS' on file 1. Processed 5 pages for database 'XEMS', file 'XEMS_log' on file 1. Msg 3283, Level 16, State 1, Line 2 The file "XEMS_log" failed to initialize correctly. Examine the error logs for more details. Msg 3013, Level 16, State 1, Line 2 RESTORE DATABASE is terminating abnormally. At this point the database is unusable - trying to do anything with it produces an error indicating the database is still in a Restore state. There is some problem with the LOG portion of the backup, which I really don't need anyway. I'd like to just NOT restore the log. Came across this article which seemed to refer to the exact problem I'm having...  http://support.microsoft.com/kb/915385/en-us They offered this suggestion: "Use the WITH NO_LOG clause during the restore process." However - in checking the RESTORE syntax.... http://msdn.microsoft.com/en-us/libr

Single-page restore/recover in an online database

I am working with SQL Server 2008 64-bit (10.0.2531) on Windows Server Datacenter 2008 SP2 (64-bit). The problems I am having almost certainly stem from my lack of understanding of how SQL Server's transaction log is handled during recoveries. I am using this document as a rough guide. Here' what I am doing: 1. I intentionally corrupt a single data page in a normal table, so that I can practice single-page recovery. 2. I attempt to read the corrupt block in SQL. As expected I receive an error. 1> select top 10 firstname from ds2.dbo.customers 2> go Msg 824, Level 24, State 2, Server IP-0AF647E0, Line 1 SQL Server detected a logical consistency-based I/O error: incorrect pageid (expected 4:896; actual 3:0). It occurred during a read of page (4:896) in database ID 5 at offset 0x00000000700000 in file 'C:\sql\dbfiles\cust1.ndf'. Additional messages in the SQL Server error log or system event log may provide more detail. 3. I take a log tail backup before I do anything to try to fix the corruption: 1> backup log ds2 to disk = 'c:\sqlbackup\ds2.bak' with norecovery 2> go Processed 5 pages for database 'ds2', file 'ds_log' on file 1. BACKUP LOG successfully processed 5 pages in 0.041 seconds (0.857 MB/sec). 4. I  restore the corrupt page from backup: 1> restore database ds2 page='4:896' 2> from disk='c:\sqlbackup\ds2.bak' 3> with norecovery 4&

Windows 7 CREATE DATABASE permission denied in database 'master'. (Microsoft SQL Server, Error: 26

Hi I have migrated to a new computer using Windows 7, 6 gig memory, I7 chip (old machine had xp) and have installed Visual Studio 2008 and  SQL Server 2008 R2.  I get CREATE DATABASE permission denied in database 'master'. (Microsoft SQL Server, Error: 262) when I try to create a new database.  Other posts (example:http://social.msdn.microsoft.com/forums/en-US/sqltools/thread/28fee0ed-c7e2-40df-8f79-f513c9848f09/) work for Vista but I cannot find how to grant permissions.  Run as administrator (vista fix) does not work. I have admin privaleges on my machine.  There are no other accounts.    What do I need to do to update privaleges? Thanks and have a nice day.    
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