Mirror Database shows Recovery state in Database mirroring in sql 2012

Hi I am working on DBmirroring and have encountered problem of mirror database showing recovery state.
I tried to resolve issue by removing database mirroring from principal ,removing endpoints from both the nodes and
finally firing alter database db1 set partner off statement also.But when reconfigure dbmirroring on principal it does not allow
start dbmirroring and mirror database db1 comes in to recovery state from restoring stage.
srm_2010

ok in that case why it is not allowing me to configure db mirroring when I am trying from SSMS.It gives an error.tell me????
srm_2010
And what is the error ? If while configuring mirroring it fails for some reason you have to make sure the mirror database which has gone in recovery state needs to be brought in restoring state.
Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it
My Technet Wiki Article
MVP

Similar Messages

  • Wait on the Database Engine recovery handle failed. Check the SQL server error log for potential causes in SQL Server 2012 Developer Edition

    I m using SQL Server 2012 Developer Edition. Even I tried 2012 express and enterprise edition but all
    gave same error. I browsed msdn blog. But nothing help me out.
    Below is the error log details--
    Overall summary:
      Final result:                  Failed: see details below
      Exit code (Decimal):           -2061893606
      Start time:                    2013-10-21 12:58:05
      End time:                      2013-10-21 13:52:30
      Requested action:              Install
    Setup completed with required actions for features.
    Troubleshooting information for those features:
      Next step for RS:              Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
      Next step for SQLEngine:       Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
      Next step for DQ:              Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
      Next step for FullText:        Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
      Next step for Replication:     Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
    Machine Properties:
      Machine name:                  CROY-TOSH
      Machine processor count:       4
      OS version:                    Windows 7
      OS service pack:               Service Pack 1
      OS region:                     United States
      OS language:                   English (United States)
      OS architecture:               x64
      Process architecture:          64 Bit
      OS clustered:                  No
    Product features discovered:
      Product              Instance             Instance ID                    Feature                
                     Language             Edition              Version         Clustered 
    Package properties:
      Description:                   Microsoft SQL Server 2012 Service Pack 1
      ProductName:                   SQL Server 2012
      Type:                          RTM
      Version:                       11
      SPLevel:                       0
      Installation location:         C:\Users\CRoy\Downloads\SQL Server 2012 Developer Edition (x86 and x64) - DVD (English)\x64\setup\
      Installation edition:          Developer
    Product Update Status:
      None discovered.
    User Input Settings:
      ACTION:                        Install
      ADDCURRENTUSERASSQLADMIN:      false
      AGTSVCACCOUNT:                 NT Service\SQLSERVERAGENT
      AGTSVCPASSWORD:                *****
      AGTSVCSTARTUPTYPE:             Manual
      ASBACKUPDIR:                   C:\Program Files\Microsoft SQL Server\MSAS11.MSSQLSERVER\OLAP\Backup
      ASCOLLATION:                   Latin1_General_CI_AI
      ASCONFIGDIR:                   C:\Program Files\Microsoft SQL Server\MSAS11.MSSQLSERVER\OLAP\Config
      ASDATADIR:                     C:\Program Files\Microsoft SQL Server\MSAS11.MSSQLSERVER\OLAP\Data
      ASLOGDIR:                      C:\Program Files\Microsoft SQL Server\MSAS11.MSSQLSERVER\OLAP\Log
      ASPROVIDERMSOLAP:              1
      ASSERVERMODE:                  MULTIDIMENSIONAL
      ASSVCACCOUNT:                  NT Service\MSSQLServerOLAPService
      ASSVCPASSWORD:                 <empty>
      ASSVCSTARTUPTYPE:              Automatic
      ASSYSADMINACCOUNTS:            CRoy-TOSH\CRoy
      ASTEMPDIR:                     C:\Program Files\Microsoft SQL Server\MSAS11.MSSQLSERVER\OLAP\Temp
      BROWSERSVCSTARTUPTYPE:         Disabled
      CLTCTLRNAME:                   ROY
      CLTRESULTDIR:                  C:\Program Files (x86)\Microsoft SQL Server\DReplayClient\ResultDir\
      CLTSTARTUPTYPE:                Manual
      CLTSVCACCOUNT:                 NT Service\SQL Server Distributed Replay Client
      CLTSVCPASSWORD:                <empty>
      CLTWORKINGDIR:                 C:\Program Files (x86)\Microsoft SQL Server\DReplayClient\WorkingDir\
      COMMFABRICENCRYPTION:          0
      COMMFABRICNETWORKLEVEL:        0
      COMMFABRICPORT:                0
      CONFIGURATIONFILE:             C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\Log\20131021_125116\ConfigurationFile.ini
      CTLRSTARTUPTYPE:               Manual
      CTLRSVCACCOUNT:                NT Service\SQL Server Distributed Replay Controller
      CTLRSVCPASSWORD:               <empty>
      CTLRUSERS:                     CRoy-TOSH\CRoy
      ENABLERANU:                    false
      ENU:                           true
      ERRORREPORTING:                true
      FEATURES:                      SQLENGINE, REPLICATION, FULLTEXT, DQ, AS, RS, RS_SHP, RS_SHPWFE, DQC, BIDS, CONN, IS, BC, SDK, BOL, SSMS, ADV_SSMS, DREPLAY_CTLR, DREPLAY_CLT, SNAC_SDK, MDS
      FILESTREAMLEVEL:               2
      FILESTREAMSHARENAME:           MSSQLSERVER
      FTSVCACCOUNT:                  NT Service\MSSQLFDLauncher
      FTSVCPASSWORD:                 <empty>
      HELP:                          false
      IACCEPTSQLSERVERLICENSETERMS:  false
      INDICATEPROGRESS:              false
      INSTALLSHAREDDIR:              C:\Program Files\Microsoft SQL Server\
      INSTALLSHAREDWOWDIR:           C:\Program Files (x86)\Microsoft SQL Server\
      INSTALLSQLDATADIR:             <empty>
      INSTANCEDIR:                   C:\Program Files\Microsoft SQL Server\
      INSTANCEID:                    MSSQLSERVER
      INSTANCENAME:                  MSSQLSERVER
      ISSVCACCOUNT:                  NT Service\MsDtsServer110
      ISSVCPASSWORD:                 <empty>
      ISSVCSTARTUPTYPE:              Automatic
      MATRIXCMBRICKCOMMPORT:         0
      MATRIXCMSERVERNAME:            <empty>
      MATRIXNAME:                    <empty>
      NPENABLED:                     0
      PID:                           *****
      QUIET:                         false
      QUIETSIMPLE:                   false
      ROLE:                          <empty>
      RSINSTALLMODE:                 DefaultNativeMode
      RSSHPINSTALLMODE:              SharePointFilesOnlyMode
      RSSVCACCOUNT:                  NT Service\ReportServer
      RSSVCPASSWORD:                 <empty>
      RSSVCSTARTUPTYPE:              Automatic
      SAPWD:                         *****
      SECURITYMODE:                  SQL
      SQLBACKUPDIR:                  <empty>
      SQLCOLLATION:                  Latin1_General_CI_AI
      SQLSVCACCOUNT:                 NT Service\MSSQLSERVER
      SQLSVCPASSWORD:                *****
      SQLSVCSTARTUPTYPE:             Automatic
      SQLSYSADMINACCOUNTS:           CRoy-TOSH\CRoy
      SQLTEMPDBDIR:                  <empty>
      SQLTEMPDBLOGDIR:               <empty>
      SQLUSERDBDIR:                  <empty>
      SQLUSERDBLOGDIR:               <empty>
      SQMREPORTING:                  false
      TCPENABLED:                    0
      UIMODE:                        Normal
      UpdateEnabled:                 true
      UpdateSource:                  MU
      X86:                           false
      Configuration file:            C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\Log\20131021_125116\ConfigurationFile.ini
    Detailed results:
      Feature:                       Management Tools - Complete
      Status:                        Passed
      Feature:                       Client Tools Connectivity
      Status:                        Passed
      Feature:                       Client Tools SDK
      Status:                        Passed
      Feature:                       Client Tools Backwards Compatibility
      Status:                        Passed
      Feature:                       Management Tools - Basic
      Status:                        Passed
      Feature:                       SQL Server Data Tools
      Status:                        Passed
      Feature:                       Reporting Services - Native
      Status:                        Failed: see logs for details
      Reason for failure:            An error occurred for a dependency of the feature causing the setup process for the feature to fail.
      Next Step:                     Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
      Component name:                SQL Server Database Engine Services Instance Features
      Component error code:          0x851A001A
      Error description:             Wait on the Database Engine recovery handle failed. Check the SQL Server error log for potential causes.
      Error help link:               http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=11.0.3128.0&EvtType=0xD15B4EB2%400x4BDAF9BA%401306%4026&EvtType=0xD15B4EB2%400x4BDAF9BA%401306%4026
      Feature:                       Database Engine Services
      Status:                        Failed: see logs for details
      Reason for failure:            An error occurred during the setup process of the feature.
      Next Step:                     Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
      Component name:                SQL Server Database Engine Services Instance Features
      Component error code:          0x851A001A
      Error description:             Wait on the Database Engine recovery handle failed. Check the SQL Server error log for potential causes.
      Error help link:               http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=11.0.3128.0&EvtType=0xD15B4EB2%400x4BDAF9BA%401306%4026&EvtType=0xD15B4EB2%400x4BDAF9BA%401306%4026
      Feature:                       Data Quality Services
      Status:                        Failed: see logs for details
      Reason for failure:            An error occurred for a dependency of the feature causing the setup process for the feature to fail.
      Next Step:                     Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
      Component name:                SQL Server Database Engine Services Instance Features
      Component error code:          0x851A001A
      Error description:             Wait on the Database Engine recovery handle failed. Check the SQL Server error log for potential causes.
      Error help link:               http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=11.0.3128.0&EvtType=0xD15B4EB2%400x4BDAF9BA%401306%4026&EvtType=0xD15B4EB2%400x4BDAF9BA%401306%4026
      Feature:                       Full-Text and Semantic Extractions for Search
      Status:                        Failed: see logs for details
      Reason for failure:            An error occurred for a dependency of the feature causing the setup process for the feature to fail.
      Next Step:                     Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
      Component name:                SQL Server Database Engine Services Instance Features
      Component error code:          0x851A001A
      Error description:             Wait on the Database Engine recovery handle failed. Check the SQL Server error log for potential causes.
      Error help link:               http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=11.0.3128.0&EvtType=0xD15B4EB2%400x4BDAF9BA%401306%4026&EvtType=0xD15B4EB2%400x4BDAF9BA%401306%4026
      Feature:                       SQL Server Replication
      Status:                        Failed: see logs for details
      Reason for failure:            An error occurred for a dependency of the feature causing the setup process for the feature to fail.
      Next Step:                     Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
      Component name:                SQL Server Database Engine Services Instance Features
      Component error code:          0x851A001A
      Error description:             Wait on the Database Engine recovery handle failed. Check the SQL Server error log for potential causes.
      Error help link:               http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=11.0.3128.0&EvtType=0xD15B4EB2%400x4BDAF9BA%401306%4026&EvtType=0xD15B4EB2%400x4BDAF9BA%401306%4026
      Feature:                       Master Data Services
      Status:                        Passed
      Feature:                       Distributed Replay Client
      Status:                        Passed
      Feature:                       Distributed Replay Controller
      Status:                        Passed
      Feature:                       Integration Services
      Status:                        Passed
      Feature:                       Data Quality Client
      Status:                        Passed
      Feature:                       Analysis Services
      Status:                        Passed
      Feature:                       Reporting Services - SharePoint
      Status:                        Passed
      Feature:                       Reporting Services Add-in for SharePoint Products
      Status:                        Passed
      Feature:                       SQL Browser
      Status:                        Passed
      Feature:                       Documentation Components
      Status:                        Passed
      Feature:                       SQL Writer
      Status:                        Passed
      Feature:                       SQL Client Connectivity
      Status:                        Passed
      Feature:                       SQL Client Connectivity SDK
      Status:                        Passed
    Rules with failures:
    Global rules:
    Scenario specific rules:
    Rules report file:               C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\Log\20131021_125116\SystemConfigurationCheck_Report.htm

    Hi,
    This 3rd time I followed this link. But nothing new, same error.
    Can you please tell me how to do follow, I cannt do the 1st step, how to change the local system to windows level account, vice-versa. It is shown mine as
    Server Configuration Manager(Local) 
    From here I folllowed the steps ---[I cannt insert link/image :-(]
    SQL 2008/R2 setup fails with "Wait on the database engine recovery handle failed" 
    If I right clicked on SQL Server Service, there is no option to change the account. 
    Hello,
    Thanks for your patience,did you tried stesp mentioned in below article
    http://blogs.msdn.com/b/sqljourney/archive/2012/03/16/sql-2008-r2-setup-fails-with-quot-wait-on-the-database-engine-recovery-handle-failed-quot.aspx
    To resolve it, follow these steps:-
    When the installation throws this error, click on OK and allow it to proceed. It will fail for Database Engine, but the SQL Server service should have
    been created. Check the Services console.
    If the service is present, perform the following steps:-
    1. Go to SQL Server Configuration manager, right click on the SQL Server service, and change the service account (if it is local system, give
    it a windows level account, and vice-versa). It might throw a WMI error but you will see the account getting updated anyway. If not, then use the Services console. Change the account for SQL Agent as well.
    Use this link to change sql server service account
    http://technet.microsoft.com/en-us/library/ms345578.aspx
    2. Next, try to start the service. It should come online.
    3. However, you will not be able to log in to the SQL Server
    4. Now stop the service and start it from the command prompt using -m -c -T3608 parameters.
    5. Now try logging in to the server using admin connection from sqlcmd (sqlcmd admin:<server name>\<instance name> ...)
    6. Once logged in, use the sp_addsrvrolemember '<domain\username>','sysadmin'.
    Also add the builtin/administrators to the sysadmin role
    7. Now stop the service from the command prompt and start it from SQL Server configuration manager
    You should be able to log in to the server now.
    Hope this helps someone.
    Please revert if it helps or even if it does not
    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers

  • ISSUE Sharepoint 2013 databases for reporting services on the second server SQL 2012

    Hello,
    I have server A: Operating system windows 2012 standard, SQL server 2012 standard
    instance: Sharepoint contains data for sharepint
    instance: Reporting should be contain databases for reporting
    Server B:
    Windows server 2012 standard contains installation Sharepoint 2013
    Sharepoint works (without reporting services), it is OK - databases are located on server A:
    My issue is:
    When I have installed reporting services on server B, I have already installed SQL server 2012 on server B, it works.
    I am able to create report in report builder adn place it in to sharepoint.
    But I would like to use only one full SQL machine on server A:
    When I reconfigure repoting settings on server A in central administration - manage service aplications,
    On the SQL server A in instance reporting , there is automatically created databases. It is no problem.
    But the first difference is, when I want to manage service aplication for reporting  in
    Provision Subscriptions and Alerts, there is information
    SQL Server Agent state cannot be determined
    When I want to create report in report builder, I have issue:
    server A-7380mw016\reporting it means server A with full SQL server:
    The Test of connection was successful
    Then I have clicked test connection
    I have recieved this screen with fail: Logon faild for user NT Authority\anonymous logon
    My account belongs to SQL admin on server A (A-7380mw016\reporting) I do not know it is not possible to create report, when it is possible to test connection in the first step and in the second step, there is problem...
    Please, can somebody help me?

    Hi,
    Since you are getting an Anonymous Logon error, it appears there may be a problem passing your credentials to the SQL Server Agent Service. This would indicate a Kerberos issue. See this thread for details:
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/46b7c773-6a77-435d-b471-cb9a6ec41c43/has-anyone-else-upgraded-reporting-services-to-denali-2012
    Microsoft Virtual Academy: Breakthrough Insights using SQL Server 2012 : Analysis Services and Credible, Consistent data (Module 2) - Configuring and Securing Complex BI Applications in a SharePoint 2010 Environment with Microsoft SQL Server 2012
    http://technet.microsoft.com/en-us/video/Video/hh858469
    Tips from the video:
    We are connecting to Reporting services using Kerberos when using Reporting Services in SharePoint integrated mode
    For the account using reporting services, we just need a dummy SPN. We go to Attribute editor tab in AD for RS account. And then we will be enabled with Delegation tab.
    In Delegation tab. I we are using claims to windows token, we need to use "Trust this user for delegation to specified services only"
    There you have 2 options: "Use Kerberos only": It means I only want to delegate in the situation where the service that is doing the delegation actually has the Kerberos ticket to start with
    "Use any authentication protocol" When we need protocol transition (like from NTLM to claims for intra farm communication)
    We need to delegate this to SQL server.
    Please check out these articles as well:
    How to configure SQL Reporting Services in SharePoint Server for Kerberos authentication
    http://support.microsoft.com/kb/2723587
    Configure Kerberos authentication (Office SharePoint Server)
    http://blogs.technet.com/b/mbiswas/archive/2009/07/10/configure-kerberos-authentication-office-sharepoint-server.aspx
    Thanks.
    Tracy Cai
    TechNet Community Support

  • Database in "Restoring" state --- HELP

    Ok.  I have spent hours on this already.
    We were restoring a database from tape.  The tape drive failed in the middle of the restore.  So now we CANNOT restore from tape to try again.
    Before I started the restore, I detached and made a copy of the database files.
    The database is in "Restoring" state.  All I want to do is DELETE the "restoring" database and attach the copy.
    How do I get rid of this thing?????  In 2000 it was an update of the sys.databases.  In 2005, you cannot do that anymore.
    SQL 2005 (9.0.2153)

    I had a situation where my database showed restoring state and I couldn't run any queries and couldn't connect with our software.
    What I did to get out of this situation is:
    1. Stop all SQL related services from windows services.
    2. I opened the DATA folder where the Ldf and Mdf files resides in the SQL directory, normally its like :
    "C:\Program Files\***********\MSSQL\DATA
    3. Then I copied both the Ldf and Mdf files of the database:
          [db name].mdf         and        [db name]_log.ldf
    I copied both of these files to another folder.
    4. Then I started all the SQL related services (in step 1) again from windows services.
    5. Started my MS SQL Management studio with normal login.
    6. Right click on the culprit database and hit DELETE (to delete the database at all).
    7. All the LDF and MDF files related to this database have gone from DATA folder (mentioned in step 2).
    8. Created a new database with the same name (same name of the one I deleted in step 6 - the culprit database).
    9. Then [database name]->right click -> tasks -> Take Offline.
    10. I then Copied both the files (from step 3) back to the DATA folder (step 2).
    11. [database name]->right click -> tasks -> Bring Online.
    12. AlhamduLLilah , its all done.

  • ORA-16005 : database requires recovery

    Following error occurred while trying to open oracle datababse in read only mode
    $ sqlplus /nolog
    SQL> connect /as sysdba
    connected
    SQL>
    SQL> startup nomount
    ORACLE instance started
    Total System Global Area 612368384 bytes
    Fixed Size 1281504 bytes
    Variable Size 163578400 bytes
    Database Buffers 415236096 bytes
    Redo Buffes 32272348 bytes
    SQL>
    SQL> alter database mount ;
    Database altered
    SQL> alter database open ready only ;
    alter database open ready only
    ERROR at line 1:
    ORA-16005: database requires recovery
    SQL>
    Since database is in No Archive mode why it is giving ORA-16005 error while starting a databse in ready only mode ????

    ORA-16005 database requires recovery
    Cause: The database requires recovery, and therefore cannot be opened for read-only access by this instance.
    Action: Perform the necessary recovery and re-open for read-only access.
    Oracle says as above. Please perform the recovery and then open the database in read only mode. We are unaware about what happened before.

  • Mirrored database in Disconnected/In Recovery state

    I am running Microsoft SQL 2008 R2 database server I have a mirrored database that shows in the following state 'databasename (Principal, Disconnected/In Recovery)'. When I look at the mirror server is shows in the same state 'databasename (mirror, Disconnected/In
    Recovery)'. I am not able to do anything with either DB, I cannot break the mirror, I can't take it offline, I cannot delete it. This is a Dev Database so if need be I could destroy it and re-create. But I would like to figure out what the issue is and get
    it working again in case I was to have this problem in production.
    Thanks for any Help!

    Hi wstclair,
    I’m writing to follow up with you on this post. Was the problem resolved after performing our action plan steps? If you are satisfied with our solution, I’d like to mark this issue as "Answered". Please also feel free to unmark the issue, with any new findings
    or concerns you may have.
    Thanks,
    Sofiya Li
    Sofiya Li
    TechNet Community Support

  • I need email whenever database state change in mirroring.

    Hi,
    I  am using SQL server 2005 SP1 in Windows server 2003.
    I need email whenever database state change in mirroring. As per below link I cannot enable Service Broker setting for user database while its enable for msdb.
    http://www.mssqltips.com/sqlservertip/1564/database-mirroring-automating-failover-for-multiple-sql-server-databases/
    Thanks

    http://www.mssqltips.com/sqlservertip/1859/monitoring-sql-server-database-mirroring-with-email-alerts/
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • SqlServer 2008 Database Status Showing(Recovery pending)..How to get this database in online?

    SqlServer 2008 Database Status Showing(Recovery pending)
    How to get this database in online?
    This is SharePoint Content database.
    Badri

    SqlServer 2008 Database Status Showing(Recovery pending)
    How to get this database in online?
    This is SharePoint Content database.
    Badri
    Hi,
    Please try running below in master database
    restore database db_name with recovery
    Chances are that this command would not succeed because I guess there was corruption in database and you restarted SQL Server service. Or can you please tell how your database went into recovery pending state.
    Please check SQL Server errorlog you would find information regarding this change. Please post relevant log information here. Please check event viewer as well
    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it.
    My TechNet Wiki Articles

  • Databases in Recovery Pending state

    Dear all,
    Need your expertise to understand bit more. 
    Yesterday i came across databases in "Recovery Pending" state problem.
    Followed too many recommendations form Google but to no avail.
    e.g. http://dbamohsin.wordpress.com/2012/01/23/cannot-detach-a-suspect-or-recovery-pending-database/
    Plucked some leafs from Paul Randal's articles as well http://www.sqlskills.com/blogs/paul/post/Search-Engine-QA-4-Using-EMERGENCY-mode-to-access-a-RECOVERY-PENDING-or-SUSPECT-database.aspx
    But none of them could fixed my problem. 
    What i did:
    I installed 2008 r2 on a machine (DEV) which already had 2008; yea instance name was different.
    Had to restart the server so i did (yea, i gave all developers enough time but due to some reasons databases were in recovery pending mode).
    After restart, some databases (not all) were in recovery pending state. Above links provided enough stuff to recover them but didnt work. For instance after setting database in Emergency mode, it stayed there for ages telling something like "Database is
    being recovered, wait until recovery is finished".
    How i fixed it:
    I attached them onto the newly created 2008 r2 instance. Made them offline (on old instance) in case there is any access conflict. Didnt get any error, like files are in use or something,  while attaching them (which raised an eyebrow).
    Couple of things i noticed after new instance's installation:
    While trying to reattach database on same old instance, I wasn't able to see the .mdf and .ldf files form there respective drives. But i was able to see from the new instance.
    WHY?
    Both sql server services (old and new) were using same service account. When i gave service account enough ntfs permissions on the drive i was able to see all .mdf and .ldf files.
    Questions are:
    1) Why it wasnt the case before? Important to note here: service accounts were local admins on the server.
    (I think i am answering myself here...would love to get more insight on it).
    2) Is it normal that i just have 2008r2 tools in Start>>Program. e.g. there is just 2008 r2 management studio not 2008 one etc.
    Dont want to let this happen in production environment (i will have backups though), so is there any approach you guys are using to avoid it.
    I hope i made myself clear here, or let me know.
    Thanks in advance for any help.
    Dinkar Chalotra

    If you dont need your log file, you can:
    Detach your database
    Move the log file to other place
    Attach back the database and from the file list, remove the ldf
    SQL server will create a new log file and the database will be online again.
    Escarcha

  • SQL 2012 Database Mirroring Issue is stalling

    hi All, 
    I have a SQL 2012 Enterprise Primary and DR SQL Clusters. 
    I have a 500 GB TDE Enabled Using HSM SQL DB which I have mirrored across to DR. 
    I am noticing that my Logs are shipping to DR, but the Unrestored Log size is huge and My restore rate is about 0 - 80KB/Sec. This is Causing the unrestored
    Log to grow on the DR side. 
    I also notice at times my Unsent Log is also getting big after any DB Maintenance activities (such as rebuild of indexes). 
    I have a dedicated connection between my datacenters and the traffic thruput is quite reasonable and I am able to copy out a 2GB File across within a few
    minutes. I see no packet drops within my links. 
    How do I ensure that my unsent logs are copied out and also increase my restore rate in DR side. 
    Any help / Suggestions will be much appreciated.   
    Regards 
    Aravin. 

    You need to limit the amount of reindexing you do on your primary/principal as it generates a lot of logs which slows down mirroring and log shipping.
    looking for a book on SQL Server 2008 Administration?
    http://www.amazon.com/Microsoft-Server-2008-Management-Administration/dp/067233044X looking for a book on SQL Server 2008 Full-Text Search?
    http://www.amazon.com/Pro-Full-Text-Search-Server-2008/dp/1430215941

  • SQL 2012 database stuck in Recovery Pending status

    Hey all.  Thanks in advance to anybody that can please help me.  I have a SQL cluster which ran out of disk the other day.  I threw plenty more disk at the SAN.  However, 1 of the databases came back with Recovery Pending and has been
    over 24 hours.  I have tried to backup the database with no success.  I don't have a clean backup from the day it occured so would have a good amount of work missing.
    Running a dbcc check returns the following:
    Msg 945, Level 14, State 2, Line 1
    Database 'sqldb' cannot be opened due to inaccessible files or insufficient memory or disk space.  See the SQL Server errorlog for details.
    I have not tried a dbcc check with REPAIR_ALLOW_DATA_LOSS as there seems to be a high risk of losing whatever was going on.  Does anybody have an idea of how I can get the db back online?

    Just a note... the database is not in Suspect mode, it is in Recovery mode.  If there is a transaction in process, attaching and reattaching may or may not trigger the transaction to complete.    The answer would be different if the database
    were in suspect mode.  The fact that it is now in CHECKPOINT shows that there is an incomplete transaction.  Once back online, a backup can occur and the CHECKPOINT can resolve.
    http://support.microsoft.com/kb/110139?wa=wsignin1.0
    Seems to me this is more like a case where the database is in log ship mode.  In that case, the solution is relatively simple (this is not what needs to happen... it simulates what has happened):
    RESTORE DATABASE MyDB WITH RECOVERY
    USE master
    ALTER DATABASE MyDB SET OFFLINE WITH ROLLBACK IMMEDIATE
    ALTER DATABASE MyDB SET ONLINE
    RESTORE DATABASE MyDB WITH RECOVERY
    I don't believe you want to rollback anything though.  As you state above, the big trick is to bring it online.
    I think you can get it into Single User Mode and then from there, restore the diffs and the logs after backing up the tail, then restore the tail and put it back into multi-user mode.  Given the difference in opinion here, I am feeling a little gunshy.
    RESTORE DATABASE [MyDB]
    FROM DISK = 'c:\MyDB.BAK'
    WITH MOVE 'MyDB_Data' TO 'c:\data\MyDB.mdf',
    MOVE 'MyDB_Log' TO 'c:\data\MyDB_log.ldf' 
    R, J

  • MANAGED RECOVERY AT STANDBY DATABASE REQURING OLD ARCHIVELOGS ORA-00308

    Oracle 9.2.0.4
    HP-UX 11.11i
    The database in Archivelog mode, single standby database in managed recovery
    mode.
    keeping standby in sync with manual applying the ARCHIVELOG from primary to
    standby database.
    primary database was 3 REDO log members of 100 MB with 1 member each.
    what i did, 1 drop and re-create the INACTIVE REDO group for all three, and
    make them
    5 REDO logs of 200 MB with 1 member each,
    then in order to keep fresh copy of primary database onto standby database, i
    send the cold backup after 15 days (last week) with standby controlfile.
    now, with that standby controlfile and the database, i can mount the database
    but while to open the database, receives messages as , it requiring the
    ARCHIVELOGS generated log time ago.
    changes the REDO groups from 3 to 5 and size 100 to 200 MB at INACTIVE state
    ### Workarounds Used ###
    SQL> alter database mount standby database;
    Database altered.
    SQL> alter database open read only;
    alter database open read only
    ERROR at line 1:
    ORA-16004: backup database requires recovery
    ORA-01152: file 1 was not restored from a sufficiently old backup
    ORA-01110: data file 1: '/user01/oracle9i/oradata/iobasprd/system01.dbf'
    SQL> alter database recover automatic standby database;
    alter database recover automatic standby database
    ERROR at line 1:
    ORA-00279: change 1655989696 generated at 08/12/2005 12:46:25 needed for thread
    1
    ORA-00289: suggestion :
    /user02/oracle9i/oradata/iobasprd/archive/archive_16849.dbf
    ORA-00280: change 1655989696 for thread 1 is in sequence #16849
    ORA-00278: log file
    '/user02/oracle9i/oradata/iobasprd/archive/archive_16849.dbf' no longer needed
    for this recovery
    ORA-00308: cannot open archived log
    '/user02/oracle9i/oradata/iobasprd/archive/archive_16849.dbf'
    ORA-27037: unable to obtain file status
    HP-UX Error: 2: No such file or directory
    Additional information: 3
    SQL> archive log list
    Database log mode Archive Mode
    Automatic archival Enabled
    Archive destination /user02/oracle9i/oradata/iobasprd/archive
    Oldest online log sequence 53052
    Next log sequence to archive 53056
    Current log sequence
    53056
    -----------------------AlertIOBASPRD.log----------------------------
    alter database mount standby database
    Mon Oct 24 12:05:05 2005
    Successful mount of redo thread 1, with mount id 3283884781.
    Mon Oct 24 12:05:05 2005
    Standby Database mounted.
    Completed: alter database mount standby database
    Mon Oct 24 12:05:12 2005
    alter database open read only
    ORA-16004 signalled during: alter database open read only...
    Mon Oct 24 12:05:23 2005
    alter database recover automatic standby database
    Mon Oct 24 12:05:23 2005
    Media Recovery Start
    Starting datafile 1 recovery in thread 1 sequence 52617
    Datafile 1: '/user01/oracle9i/oradata/iobasprd/system01.dbf'
    Starting datafile 2 recovery in thread 1 sequence 52617
    Datafile 2: '/user01/oracle9i/oradata/iobasprd/TBMS_TS_005.dbf'
    Starting datafile 3 recovery in thread 1 sequence 52617
    Datafile 3: '/user01/oracle9i/oradata/iobasprd/drsys01.dbf'
    Starting datafile 4 recovery in thread 1 sequence 52617
    Datafile 132: '/user01/oracle9i/oradata/iobasprd/TBMS_TS_002.dbf'
    Starting datafile 133 recovery in thread 1 sequence 52617
    Datafile 133: '/user01/oracle9i/oradata/iobasprd/TBMS_TS_003.dbf'
    Starting datafile 134 recovery in thread 1 sequence 52617
    Datafile 134: '/user01/oracle9i/oradata/iobasprd/TBMS_TS_004.dbf'
    Media Recovery Log
    Media Recovery Log /user02/oracle9i/oradata/iobasprd/archive/archive_16849.dbf
    Errors with log /user02/oracle9i/oradata/iobasprd/archive/archive_16849.dbf.
    ORA-279 signalled during: alter database recover automatic standby database...
    Mon Oct 24 12:06:01 2005
    Restarting dead background process QMN0
    QMN0 started with pid=9
    The snap of alertIOBASPRD.log can understand me that it requiring the
    ARCHIVELOG 52617 only
    and its lying in LOG_ARCHIVE_DET location also as
    $ pwd
    /user02/oracle9i/oradata/iobasprd/archive
    $ ls archive_5261*.dbf
    archive_52610.dbf archive_52613.dbf archive_52616.dbf archive_52619.dbf
    archive_52611.dbf archive_52614.dbf archive_52617.dbf
    archive_52612.dbf archive_52615.dbf archive_52618.dbf
    $
    now, even the files are lying , why ORACLE requing the old archive logs ?????

    You haven't given any usefuly information on your problem.
    show parameter log_archive_dest
    show parameter fal
    show parameter dg
    What errors are in your alert logs ?
    What command are you using to recover ?
    Check the contents of v$archived_log
    # run on primary to detect failures :-
    select destination, status, fail_date, valid_now
    from v$archive_dest
    where status != 'VALID' or VALID_NOW != 'YES';
    # run on standby to get exact position of rollforward :-
    select thread#, to_char(snapshot_time,'dd-mon-yyyy:hh24:mi'),
    to_char(applied_time,'dd-mon-yyyy:hh24:mi'),
    to_char(newest_time,'dd-mon-yyyy:hh24:mi') from V$STANDBY_APPLY_SNAPSHOT;
    Are you using dataguard broker ?

  • Show results from the database to html tables?

    Hi,
    I am a PHP programmer and did a successful CMS program for a company. Now I have another project which is a web based system.
    I basically know how to do it and finish it in PHP.. but I am trying to do it using J2EE.. I am trying to learn J2EE now since I have been programming
    on J2SE for quite sometime..
    I am trying to show the results from a MySQL database on a table on J2EE but I am having hard time doing that. I am trying to research online and reading books but with no luck I can't find any resources on how to do that..If you guys can lead me into a resource where I can read how to do it? or just give any ideas on how to do it correctly I'll try to read and learn I will very much appreciate it.. here's my coding please look at it. Thank you very much
    I want to make it like this in a html table:
    userid username activated task
    1 alvin y delete(this will be a link to delete the user)
    Right now this is what I was able to do so far:
    Userid username activated task
    1
    alvin
    y
    Here are my codes... I am not even sure if I am doing it in the correct way...
    User.java
    mport java.sql.Connection;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Statement;
    import java.util.ArrayList;
    import java.util.List;
    public class Users {
    public List getUsers(){
    List names = new ArrayList();
    try{
    Connection con = DBConnect.getConnection();
    Statement stmt = con.createStatement();
    String sql = "select * from users";
    ResultSet rs = stmt.executeQuery(sql);
    while(rs.next())
    String userid = rs.getString("user_id");
    String usernames = rs.getString("user_name");
    String password= rs.getString("password");
    String activated= rs.getString("activated");
    names.add(userid);
    names.add(usernames);
    names.add(password);
    names.add(activated);
    catch(SQLException e)
    System.out.print(e);
    catch(Exception e)
    System.out.print(e);
    return names;
    UserServlet.java
    import java.io.IOException;
    import java.util.List;
    import javax.servlet.RequestDispatcher;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    public class UsersServ extends HttpServlet {
    private static final long serialVersionUID = 1L;
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    Users be =new Users();
    List result = be.getUsers();
    request.setAttribute("user_results", result);
    RequestDispatcher view = request.getRequestDispatcher("manage_users1.jsp");
    view.forward(request, response);
    manage_users1.jsp
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <%@page import = "java.util.*" %>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>Insert title here</title>
    </head>
    <body>
    <%
    List results = (List)request.getAttribute("user_results");
    Iterator it = results.iterator();
    out.print("<table border = 1>");
    out.print("<th>");
    out.print("userid");
    out.print("</th>");
    out.print("<th>");
    out.print("username");;
    out.print("</th>");
    while(it.hasNext()){
    out.print("<tr><td> " + it.next()+"</td></tr>");
    out.print("</table>");
    %>
    </body>
    </html>

    I suggest:
    1: you use this:
    e.printStackTrace()
    instead of this:
    System.out.print(e);
    so it will tell you what line it crashed on.
    2: In the code below,here is how you mix coding html tags and java scriptlets
    (you should never have to use out.print()):. In a later project, you can learn how to use JSTL
    instead of java scriplets (I suggest using java scriptlets for now until you have more JSP experience).
    FROM:
    <html>
    <%
    //some java code goes here
    out.print("<th>");
    //some more java code goes here
    out.print("<tr>");
    %>
    TO:
    <html>
    <% //some java code goes here%>
    <th>
    <%//some more java code goes here%>
    <tr>
    3: Put a lot of System.println() statements in your *.java classes to verify what its doing (you can learn how to use a debugger later).
    4: I highly recommend reading a book on JSP/servlets cover to cover.
    Here's a simple MVC design approach I previously posted:
    http://forums.sun.com/thread.jspa?messageID=10786901

  • Restore a database in recovery mode sql server 2005

    Please i need some help. My database has been marked in recovery in sql 2005 management studio and i can't connect to it how do i bring it back to normal

    if your database is marked in recovery this means that SQL Server is recoverying the database typically after a sql server restart.
    If the database is marked restoring, do this restore database databasename with recovery
    Otherwise, you need to check the status of the recovery -   Check this query: SELECT state_desc FROM sys.databases WHERE name = 'ProblemDatabaseName'; If this returns recovery_pending you have to wait. Check the SQL Server log for messages about the
    state of the recovery.
    looking for a book on SQL Server 2008 Administration?
    http://www.amazon.com/Microsoft-Server-2008-Management-Administration/dp/067233044X looking for a book on SQL Server 2008 Full-Text Search?
    http://www.amazon.com/Pro-Full-Text-Search-Server-2008/dp/1430215941

  • SearchCatalogAvailabilityMonitor showing unhealthy for all database on DAG member mailbox server

    Hi All
    Help me to resolve server (all database) search catalogue availability monitor.
    I am facing a search catalogue "Unknown" issue for newly created copy database and also on same mailbox server
    "SearchCatalogAvailabilityMonitor" showing unhealthy for all database.
    For the newly created copy database I tried to reseed / update search index catalogue by using below PowerShell command but it stopped with below mentioned error.
    [PS] C:\Windows\system32>Update-MailboxDatabaseCopy -Identity DBTest\MBX1 -CatalogOnly
     Confirm
    Are you sure you want to perform this action?
    Seeding database copy "DBTest\MBX1".
    [Y] Yes  [A] Yes to All  [N] No  [L] No to All  [?] Help (default is "Y"): y
    Confirm
    The mailbox database copy 'DBTest\MBX1' has failed to update from server . Do you want to clean up that update
    request now? Seeding cannot be requested for the same database copy until the failed request has been cleaned up by the
    server, which should automatically happen within 15 minutes.
    [Y] Yes  [A] Yes to All  [N] No  [L] No to All  [?] Help (default is "Y"): y
    WARNING: Seeding of content index catalog for database 'DBTest' failed. Please verify that the Microsoft Search
    (Exchange) and the Host Controller service for Exchange services are running and try the operation again. Error: There
    was no endpoint listening at
    net.tcp://localhost:3863/Management/SeedingAgent-64310690-DEA4-47E1-9860-E8B2AC4E292A12/Single that could accept the
    message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more
    details..
    [PS] C:\Windows\system32>Get-MailboxDatabaseCopyStatus -Identity DBTest
    Name                                         
    Status          CopyQueue ReplayQueue LastInspectedLogTime   ContentIndex
                  Length    Length                            
    State
    DBTest\MBX2                              Mounted        
    0         0                                  Healthy
    DBTest\MBX1                              Healthy        
    0         0           2/8/2015 3:09:49 PM    Unknown
    DBTest\DRMBX1                            Healthy        
    0         0           2/8/2015 3:09:49 PM    Healthy
    Same time
    Result of get-serverhealth -server MBX1, also please note all database (Copy) search is in unhealthy condition and newly created copydatabase have no entry for "SearchCatalogAvailabilityMonitor".
    Name
    TargetResource
    HealthSetName
    AlertValue
    SearchCatalogAvailabilityMonitor
    DB01
    Search
    Unhealthy
    SearchCatalogAvailabilityMonitor
    DB06
    Search
    Unhealthy
    Reg
    Aditya

    Hi Deepak
    My both exchange servers on hyper V and there should not be resource problems.
    However I have already rebooted server. but it wont help.
    Mean while I get success to make search component healthy on my problematic server by below command but still content index folder is not coming automatically.
    [PS] C:\Program Files\Microsoft\Exchange Server\V15\Bin\Search\Ceres\Installer>.\installconfig.ps1 -action I –dataFolder  "C:\program files\Microsoft\Exchange Server\V15\bin\search\ceres\hostcontroller\data"
    Configuring Search Foundation for Exchange....
    Successfully configured Search Foundation for Exchange
    By running this command these are in health state now.
    Name
    TargetResource
    HealthSetName
    AlertValue
    SearchCatalogAvailabilityMonitor
    DB01
    Search
    healthy
    SearchCatalogAvailabilityMonitor
    DB06
    Search
    healthy
    Reg
    Aditya

Maybe you are looking for

  • How do i get outlook mail account on macbook air

    i have synced my yahoo mail account just fine but I am having trouble syncing my work email (which is outlook) to my mac book air. can someone please give me the correct steps in order to sync my work account? thanks

  • Photo can't be removed

    When i try to remove photos from my ipod touch in itunes by removing the synced libraries, it tells me that an error has occured and the files can not be found. Does anyone know how to work around this problem or another way to delete photos on the i

  • MAC to HGTV OUTPUTTING SUGGESTIONS

    Hi I used to stream online movies from my Power mac to my HGTV via the DVI to Video Apple adapter. Just upgraded to the new Mac Pro with the NVIDIA 8800gt card and realized the adapter is no longer supported (it only works with a couple of ATI cards)

  • Proxy- JDBC error

    Hi friends, The receiver CC is showing error.. the error Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: JDBC Adapter configuration not initialized: null please help it is showing in CC monitoring.. in sxmb_moni it is

  • LTA Reimbursement

    I have created a wage type for LTA Reimbursement, copied it from model wage type M210. Configured tax code and other details on IMG, Created the records in 0582 and 0589 infotypes. While trying to run the PC00_M40_REMP - Claims Disbursement  from Eas