.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

SQL Server 2008 Database Restore(Database Mirroring)

Posted By:      Posted Date: September 14, 2010    Points: 0   Category :Sql Server
HI,I tried to impliment Database mirrorin in SQL Server 2008.I have 3 Sqlserver 2008 Eneterprise Edition in 3 diiferent computers with same domain.Pricnicipal server =TCP://SPHDev.sphinet.com.sg:5022.Mirror=TCP://SPHPrimary.sphinet.com.sg:5022 and witness =TCP://wsc211.sphinet.com.sg:5022.But when i click start mirroring button i got an error TITLE: Database Properties------------------------------ An error occurred while starting mirroring. ------------------------------ADDITIONAL INFORMATION: Alter failed for Database 'SPH_MSCRM'.  (Microsoft.SqlServer.Smo) ------------------------------ An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo) ------------------------------ The server network address "TCP://SPHPRIMARY.sphinet.com.sg:5022" can not be reached or does not exist. Check the network address name and that the ports for the local and remote endpoints are operational. (Microsoft SQL Server, Error: 1418).This is the error message i got from Error Log"2009-06-03 17:01:08.89 spid27s     Database mirroring connection error 2 'DNS lookup failed with error: '11001(No such host is known.)'.' for 'TCP://SPHPRIMARY.sphinet.com.sg:5022"I restored Principal server DB  by using RESTORE WITH NORECOVERY and now this  database in mirror server is now look like as DBName(Restoring....).How i can identify

View Complete Post

More Related Resource Links

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,

restore SQL server 2005 database on new SQL server 2008 not working

please any one advice me ,i have Great Plain database on SQL server 2005 when i tried to install new SQL server 2008 and restore my Database the GreatPlain not working well as well the Data Base

sql server 2008 adventureworks database


dear Friends

For my MCTS 70 -433 examination, I recently installed sql server 2008 and installed the sample databases too. but my issue is, in that book they have mentioned a database called "AdventureWorks2008" and the nice thing is I don't have a such a database with me in my sql server 2008. 

And the query is 

-- MERGE Statement
USE AdventureWorks2008
MERGE INTO	Sales.SalesOrderDetailHistory AS SODH
USING Sales.SalesOrderDetail AS SOD
ON SODH.SalesOrderID = SOD.SalesOrderID
AND SODH.SalesOrderDetailID = SOD.SalesOrderDetailID
INSERT (LineTotal, SalesOrderID, SalesOrderDetailID, CarrierTrackingNumber, OrderQty
, ProductID, SpecialOfferID, UnitPrice, UnitPriceDiscount
, rowguid, ModifiedDate, Cancelled)
VALUES(LineTotal, SalesOrderID, SalesOrderDetailID, CarrierTrackingNumber, OrderQty
, ProductID, SpecialOfferID, UnitPrice, UnitPriceDiscount
, rowguid, ModifiedDate, DEFAULT)
UPDATE SET SOHD.Cancelled = 'True'
OUTPUT $action , inserted.* ;	

Please help me to overcome this issue and let me know where can I download that database too.

Thanking you

happy Coding

Cannot Create Database Diagrams - SQL Server 2008 Management Studio

I cannot create a database diagram with my client-side SQL Server Management Studio.  I can do this if I am on the actual db server itself.  Please help.

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)  

Can SSAS 2005 run with Sql Server 2008 database engine?

Are there any known issues of running SSAS 2005 with SQL Server 2008 database engine?

Restore 2005 database on 2008 R2 Trial

I've downloaded SQL Server 2008 R2 Trial and installed it on Windows Server 2008 trial running under Virtual PC on XP. I've made backups of databases on my SQL Server 2005 and tried to restore them using a) the wizard - results in a messagebox saying "Specified cast is not valid" and no backup sets are available in the Restore Database window. b) using T-SQL - results in Msg 3183, Level 16, State 2, Line 1 RESTORE detected an error on page (0:0) in database "dp" as read from the backup set. Msg 3013, Level 16, State 1, Line 1 RESTORE DATABASE is terminating abnormally. Using the wizard and RESTORE on 2005 for the same database backup works fine. c) Detach on 2005 and Attach on 2008 results in: SQL Server detected a logical consistency-based I/O error: incorrect pageid... Detach and Attach worked fine on 2005 and DBCC CHECKDB revealed no errors. Thanks for any info...

please help me to create database in sql server 2008

hi,    i am new to asp.net. i like to learn asp.net and c#. when i try to connect to sql server, it asks server name. i don't know server name and it asks database name also. how to create database and where can i access like phpmyadmin. in phpmyadmin i can create database and tables. i am new to this. please help me.thanks.  

Error connecting to Remote report server database in SQL Server 2008 R2 DataCenter Edition

I am trying to configure my report server installed on Server A to point to a reporting services DB on Server B. I am able provide the name and test the connection. However, when i click next on the configuration wizard after providing the Server A name I am receiving the below error: The feature: "Remote access to report data sources and/or the report server database" is not supported in this edition of Reporting Services I have SQL Server 2008 R2 DataCenter Edition on both the servers.    

how to restore msdb database on sql 2008 from sql 2005 backup?

Currently, I am unable to do it. It gives me the error than I cannot be restored because it was created by a different version of the server. What is the work-around? I hate scripting all my maintenance plans and alerts, there are tonns of themJulieShop

No Servers listed under Database Engine in SQL Server 2008 on Windows Server 2008 R2.

Where to begin. It's late so I hope I can be clear. I have installed SQL Server 2008. I am running Windows Server 2008 R2. I have installed SQL Server four times and I continue to have issues connecting to the Database Engine. Installation has gone without a problem at least to my knowledge I have not been presented with any errors. I have also created a local administrator account called "spadmin" to use to connect to the SQL Server database and to use with SharePoint 2010. Which brings me to the reason why I want to run SQL Server - I want to evaluate the latest SharePoint Server 2010 and WSS. Unfortunately, I have not been able to go beyond installing SQL Server and connecting to the database, because there is no database instance showing under the Database Engine, except under Integration Services. I have the following services installed: SQL Acitivey Directory Helper Service SQL Full-text-Filder Daemon Launcher SQL Server SQL Server Agent SQL Server Analysis Service SQL Server Browser SQL Server Integration Services 10.0 SQL Server Reporting Services SQL Server VSS Writer Am I missing something? I have been following several online instructions on how to install SQL Server 2008 and I can't seem to find where I may have gone wrong. After I install SQL Server 2008 am I supposed to see the default instance (MSSQLSERVER) listed under the Database Eng

SQL Server database restore with multiple logicalfiles by using t-sql

Hi,   I have set of database backups created in the production sql server 2005. I need restore these backups into another sql server 2005 by using t-sql script(stored procedure). Each database will have different number of logical files in it. The physical location of the target server may be different for these logical files. I know that i should use WITH MOVE 'YourMDFLogicalName' TO 'D:DataYourMDFFile.mdf' clause. Now i want to know how would i put it in a t-script stored procedure such a way that it automatically identifies all the logical files and create a physical file on the target server. User will supply source of bakup file and target folder for mdf,ldf, etc files. Do i need to populate the sql query as string by looping through all the logical files? If so how would i execute the populated sql query as string ?  Mr Genius

Problems with SSRS 2008 Install when configuring a back-end database on a SQL Server 2008 R2 environ

We are tyring to configure SQL Server Reporting Services (SSRS 2008) not the R2 version with a SQL Server 2008 R2 version of database. We are facing error when the configuration manager within SSRS tries to execute its scripts against the database. Do you think that SSRS 2008 may have trouble using a SQL Server 2008 R2 version as the back-end? Also, what kind of permissions does the ID installing SSRS needs to have on the SQL Server database ?  Not much is available in the documenation or online.

SQL Server 2008 Windows Authentication Mode fails for Database Engine, error 18456

I installed SQL Server 2008 Developer Edition (10.0.1600.22.080709-1414) on a Windows Vista 32-bit development machine with Windows Authentication Mode only (no SQL Server Authentication).   Since this is a development machine, I saw no need for Mixed Mode when I did the install.  The SQL Server Management Studio allows me to login to Analysis Services, Integration Services, Reporting Services, BUT NOT the Database Engine!Windows Authentication for the Database Engine gives the following error: EventID: 18456Login failed for user MYDOMAIN\MYLOGIN'. Reason: Token-based server access validation failed with an infrastructure error. Check for previous errors. [CLIENT: <local machine>]The 'fix' I have found online is to login as SA in SQL Server Authentication mode & add MYDOMAIN\MYLOGIN as a administrator for the Database Engine.  Unfortunately, I can't since I didn't install SQL Server Authentication mode (only Windows Authentication Mode).  It appears my only recourse is to uninstall, then reinstall in Mixed mode, then to login as SA in SQL Server Authentication mode & add MYDOMAIN\MYLOGIN as a administrator for the Database Engine. Before I do so, does anyone know of a better approach?Scott D Duncan

SQL Server 2008 R2 rebuild master database fails with error -2068643838

I want to change the server collation setting for SQL 2008 R2.  I'm using the command: Setup /QUIET /ACTION=REBUILDDATABASE /INSTANCENAME=MyServerName /SQLSYSADMINACCOUNTS="MyDomain\Special Account Group" "NT AUTHORITY\SYSTEM" "NT SERVICE\MSSQLSERVER" "NT SERVICE\SQLSERVICEAGENT" sa /SQLCOLLATION=Latin1_General_CI_AI The setup program starts, runs a while, then exits with a return code: Error result: -2068643838 Result facility code: 1203 Result error code: 2 The final lines of the Detail.txt file in the ...\Setup Bookstrap\Log\<specific timestamp>\ directory are: 2010-07-12 14:54:58 Slp: Running Action: ProduceStatusLogsBeforeFinishPage 2010-07-12 14:54:59 Slp: Completed Action: ProduceStatusLogsBeforeFinishPage, returned True 2010-07-12 14:55:00 Slp: Received request to add the following file to Watson reporting: C:\Users\<MyLoginName>\AppData\Local\Temp\2\tmpDAAF.tmp 2010-07-12 14:55:00 Slp: The following is an exception stack listing the exceptions in outermost to innermost order 2010-07-12 14:55:00 Slp: Inner exceptions are being indented 2010-07-12 14:55:00 Slp: 2010-07-12 14:55:00 Slp: Exception type: Microsoft.SqlServer.Setup.Chainer.Workflow.NoopWorkflowException 2010-07-12 14:55:00 Slp:     Message: 2010-07-12 14:55:00 Slp:         The state of your

SQL Server 2008: When creating database with filestream group pc hangs


I am facing this STRANGE problem with sql server 2008. When I try to create a new database with filestream group my system hangs. When I restart pc by direct power off and then on, I cannot see the new database but at the given location I could see that database files and filestream group has been created. 

Solutions Tried.
Uninstall, download new version then reinstall but to no use.
Set maximum permissions to current user (according to my knowledge).
Using Mix mode authentication.

PC configuraion:
XP Home Edition SP2,
Intel Dual Core 2.0 GHZ Processor
4GB Ram,
SQL Server express SP1 installed on NTFS Partition
Plenty of Disk Space
Comodo Firewall pro, Avast Antivirus ( Already tried to stop firewall and antivirus still no use)

Any help would be appreciated.

Restoring Database taking long time in SQL Server 2008 R2 -- some how urgent


Hi all

I have Database size 12GB in SQL Server 2005 and It is backed up.

Now I tring to restore Database in SQL Server 2008 R2(wizard)....it is not at complted after 2hours...still running.


any idea..or help 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