.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

Restore SharePoint_config

Posted By:      Posted Date: October 08, 2010    Points: 0   Category :Sql Server


I am trying to load the backup files of a project server 2007 environment to a new SQL server in the same server.

I had to reinstall the SQL server, and in the new SQl server I am trying to restore all the data bases via this command:

RESTORE DATABASE "SharePoint_Config" FROM DISK = 'E:\SQL full backup\SharePoint_Config_backup_2010_09_27_085648_0662997.bak' WITH RECOVERY


Only on this particular data base I get error message. Here is the message:



View Complete Post

More Related Resource Links

Restore SharePoint_config from .bak file


I can restore all the data base to new SQL except SharePoint_config.

Currently I am getting this error on restoring SharePoint_Config:

Msg 3159, Level 16, State 1, Line 2

The tail of the log for the database "SharePoint_Config" has not been backed up. Use BACKUP LOG WITH NORECOVERY to backup the log if it contains work you do not want to lose. Use the WITH REPLACE or WITH STOPAT clause of the RESTORE statement to just overwrite the contents of the log.

Msg 3013, Level 16, State 1, Line 2

RESTORE DATABASE is terminating abnormally.



I cannot delete the data base from that SharePoint_config and I get:

SQL Server Backup and Restore (video)

Restore your full backup, then run a few queries before you keep restoring transaction logs. Brent shows how to use the Standby option for restores.

In this five minute video, Brent demonstrates how to do it by creating a database, populating data, and then showing what disaster recovery is like by doing RESTORE WITH STANDBY.

Restore - Cube Analysis Services 2005

Hi, I'm from Brazil. Sorry for my English. I made a backup for my cube that has more than 2 GB, but de backup is created with only 50 mb. The backup don't showed erro message. I restored this backup without erro, but when I tryed query the cube, i receive this message: The query could not be processed: o File system error: The following file is corrupted: Physical file: \\?\C:\SQL Server\MSSQL.2\OLAP\Data\teste.59.db\"Nome_Servidor" - "Nome_Database".190.cub\Fato Inadimplencia Safra Contrato.190.det\Fato Inadimplencia Safra Contrato.167.prt\172.fact.data. Logical file . Someone can help? I realy need make this backup.Fabrício França Lima | MCP, MCTS, MCITP | Visite meu site: http://fabriciodba.spaces.live.com/ | Dicas de artigos SQL: Siga-me no twitter @fabriciodba.

SMO Backup and Restore Help

Hello Friends, I am new to SMO, Till now I have only worked with Selct,Insert/update Queries.. Now I want to Implement some backup and restore feature for my application. I looked at some documents of SMO and found it is possible using SMO. First of all I will explain my situation. My application wants to store data belongs to different companies(which is maintained with in application) in to single database server, Sql server 2008. I am planning to use Partition Scheme function and create filegroup for each company. Advantage here is, taking backup of each company will be easy. I am generating primary key for each table without taking into consideration of companies. In other words Particular table's ID 1,2 belongs to Company A, 3 Belongs to Company B and 5 belongs to Company A... But these data will be split in to Different filegroups using Company ID.(horizontal partitioning) Ok... Now the Problem.. My backup for a particular company was taken successfully. Now I want Restore function. When I am trying to restore this backup to somewhere else. Target database may or may not contain Companies installed. When Restoring Will there be any Primary key Violation? I know one solution is to generate primary key by taking into consideration Company Id. But this will cause a complete rewriting of code, as it contains lot of edit/delete queries.  I want to know, whether the

attempting to restore to a new DB and it keeps trying to save the mdf file as the original mdf file

This is using SQL Server 2005. I've had several problems and this is where I've ended up. 1. Despite the claim that this will create a new DB it doesn't.  I was getting errors about the new DB not having the specified logical file name (despite the new DB not existing).  At the time I was specifying the logical file name as it appeared in the backup. 2. if I manually create the DB I still get the error as above unless I manually change the logical file name via sql management studio.  This is meant to be an automated solution so that is not accceptable. 3. I am now giving it the logical file name of the DB that I want to restore onto (if it doesn't exist I create it), but now it's trying to save the file with the old physical file name, which is absolutely *not* what I want. My instincts tell me I need to change the logical file name in the database I'm wanting to restore onto, but I don't know how to do this via SMO.  All of the explanations I've seen are through the SQL Management Studio and that is not acceptable as this needs to be an automated solution. I have copy/pasted the code from the msdn examples verbatim changing only the dbName and the .bak file location and it has consistently failed. Here is the code in it's current incarnation. var serverName = @"myServer"; var dbName = "MIQDesignTest3"; var backupFileN

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!

What happened to the backup and restore classes in namespace Microsoft.SqlServer.Management.Smo vers

I do not see these two classes in version 10 of this namespace and I am not finding any documentation explaining what happened to them.

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&

SQL 2008 Restore on a 2008 R2 Cluster

I've built a 2008 R2 Cluster running sql 2008 as a clustered application.  We do full backups with arcserve.  I'm trying to come up with a process to get the cluster back online for disaster recovery.  I can get the Windows cluster back online but when it comes to sql I get stuck.  Would I basically get the cluster back online than use the command - setup /action=rebuilddatabase /instancename=MSSQLServer /sqlsysadminaccounts=domain\username?  Than start the database in single user mode, install the arcserve sql agent and restore all the db's? When I try this I get the error element does not exist error.  Right, now I'm starting from scratch to see if I get the same result.  I just want to make sure I'm on the right track and not spinning my wheels trying something that won't work in a clustered application.   Thanks,   Matt

Backup and Restore

Hi. I am creating a vb 2010 application and I am using sql server express as my database. I need to create a backup and restore feature for the user so that the user can backup or restore the database while using the program. I have nop clue where to start. Does anyone have some code for or any suggestions?Thanks in advance.

Upgrading platform - Report Services DBs backup /restore

We are upgrading the platform for our production SQL 2005 server.  Of course, I have done this task numerous times....however this is the first time I will be dealing with Reporting Services.  I am concerned that it may not be a simple backup databases and then restore on new server, because of the encryption keys. What do I need to do ? Thanks!

How to restore a database to the d drive

I have a 2008 database I need to restore, but my C drive is almost full.  How do I telll it to restore my database to the D drive?  

SharePoint Version 2.0 (WSS 2.0 SP3) Content Database restore to new farm

Is it possible to use an SQL backup from a sharepoint Version 2 SP3 database to restore the content on a new server farm and attach to a new web applicaiton. NOTE: This is WSS 2.0. In WSS 3.0 this is a very simple task, but it is not the same in WSS 2.0 (the add content database option CANNOT be used to attach to an existing content database like it does in WSS 3.0). The options I have found appear to say you need the configuration database from the old server then it can be done. I am migrating from an outsourced deployment, so I do not have access to that. Plan B is to do a sharepoint STSADM backup. THis seems to be a more likey way to do it.

Can't restore database backup file in my database ? using sql server 2005. please help

VERY IMPORTANT i am trying to restore database.bak in sql server 2005 (i know the database.bak was also generated in sql 2005 server) i am trying to restore back up database .bak into the new database i just created in sql server 2005 i have saved my database .bak into c drive and when i select database .bak "From Device", it doesn't get populated in the list below and i see nothing and it keeps on prompting a message "You must select a restore source" Here's the screen shot:   PLEASE HELP..it's really important (i tried restoring database in sql server 2008 and it was sucessful but i am facing this problem in sql server 2005 only)  

How to restore database from .bak file /

I have a .bak database file and i want to restore it to a new database so that i can get the data inside the .bak fileI am using SSMS 2008 Expresswhat i did :I created a database with the same name as of my .bak file (in my case "RM")now after creating a new database > righclick  on database > tasks > restoreSelected FROM : RM ( empty database that i just created)Selected TO : RM.bak (my backup file)when i press "Ok"i get this error:

Restore MDF file only from bak file

Hello Friends i want to know that whether there is any provision in SQL Server 2008 to restore MDF file only from the bak file excluding the log file. i just want to know because, the bak file which i have is close to 4-5 GB, but after specifying the details while restoring the database, then it is consuming close to 80 GB as 30GB for the MDF file or 50 GB for log file. But say for once, the total hard disk is 80 GB. all the given figures are approximate except for Hard Disk size. in that case, i only want to extract the MDF file while excluding the LOG file for the database to attach. Looking for favorable replies.
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