SQL Server 2012 DB log file doesn't shrink (simple recovery model)

I've found several similar questions in this forum, but none of the answers have resolved my problem: I have a SQL Server 2012 DB using simple recovery model.  The MDF file is 12 GB and the LDF file is 10 GB.  I'm trying to shrink the size of the
LDF file.  I've read that for simple recovery model DBs there are reasons for delaying log file shrinking, but I still can't find a solution based on these reasons.
When I try to shrink it using this command:
DBCC SHRINKFILE(MyDB_log, 1000000)
I get these results, and no change of file size:
DbId FileId CurrentSize MinimumSize UsedPages EstimatedPages8 2 1241328 128 1241328 128
The same results running this:
DBCC SHRINKFILE(MyDB_log, 1000000, TRUNCATEONLY)
There doesn't appear to be any open transactions:
DBCC OPENTRAN()No active open transactions.DBCC execution completed. If DBCC printed error messages, contact your system administrator.
And this returns NOTHING:
SELECT name, database_id, log_reuse_wait_desc FROM sys.databases WHERE database_id = DB_ID()name database_id log_reuse_wait_descMyDB 8 NOTHING
I've also tried running the following, but nothing useful is returned:
SELECT * FROM sys.dm_tran_database_transactionsSELECT * FROM sys.dm_exec_requests WHERE database_id=DB_ID()SELECT * FROM sys.dm_tran_locks WHERE resource_database_id=DB_ID()
Any other suggestions of what I can do to shrink this log file?  Or perhaps someone can justify its enormous size?
David Collacott

The answer is pretty simple.
The following code is the problem:
DBCC SHRINKFILE(MyDB_log, 1000000)
You are telling SQL Server that you want to "shrink" the MyDB_log file and the target size is 1TB.  Well according to you the MyDB_Log file is well below the 1TB size you are targeting, in fact it's only 10GB so SQL Server is doing precisely what you
are telling it to do.
See, according to the SQL Server documentation
here, target size "Is the size for the file in megabytes, expressed as an integer."
Now if you'd like to actually shrink the log file down to, oh say 1GB, then you should try the following command:
DBCC SHRINKFILE(MyDB_log, 1000)
The theory being 1000 * 1048576 (i.e. 1MB) is equal to 1GB.

Similar Messages

  • Microsoft sql server extended event log file

    Dears
    Sorry for my below questions if it is very beginner level.
    In my implementation I have cluster SQL 2012 on Windows 2012; I am using MountPoints since I have many Clustered Disks.
    My MountPoint Size is only 3 GB; My Extended event log are growing fast and it is storing in the MountPoint Drive directly (Path: F:\MSSQL11.MSSQLSERVER\MSSQL\Log).
    What is the best practice to work with it? (is it to keep all Extended events? or recirculate? or to shrink? or to store in DB?)
    Is there any relation between SQL truncate and limiting the size of Extended event logs?
    How can I recirculate this Extended Events?
    How can I change the default path?
    How can I stop it?
    and in case I stop it, does this means to stop storing SQL event in Windows event Viewer?
    Thank you

    After a lot of checking, I have found below:
    My Case:
    I am having SQL Failover Cluster Instances "FCI" and I am using Mount-Points to store my Instances.
    I am having 2 Passive Copies for each FCI.
    In my configuration I choose to store the Root Instance which include the logs on Mount-Point.
    My Mount Point is 2 GB Only, which became full after few days of deployment.
    Light Technical Information:
    The Extended Event Logs files are generated Coz I have FCI, in single SQL Installation you will not find this files.
    The File Maximum size will be 100 MB.
    The Files start circulating after it become 10 Full Files.
    If you have the FCI installed as 1 Active 2 Passive, and you are doing failover between the nodes, then you will expect to see around 14 - 30 copy of this file.
    Based on above information you will need to have around 100 MB * 10 Files Per Instance copy * 3 Since in my case I have 1 Active and 2 passive instances which will = 3000 MB
    So in my case My Mount-Point was 2 GB, which become full coz of this SQLDIAG Logs.
    Solution:
    I extended my mount point by 3 GB coz I am storing this logs on it.
    In case you will need to change SQLDIAG Extended Logs Size to 50 MB for example and place to F:\Logs, then you will need below commands:
    ALTER SERVER CONFIGURATION SET DIAGNOSTICS LOG OFF;
    ALTER SERVER CONFIGURATION
    SET DIAGNOSTICS LOG MAX_SIZE = 50 MB;
    ALTER SERVER CONFIGURATION
    SET DIAGNOSTICS LOG PATH = 'F:\logs';
    ALTER SERVER CONFIGURATION SET DIAGNOSTICS LOG ON;
    After that you will need to restart the FCI from SQL Server Configuration Manager or Failover Cluster Manager.
    I wish you will find this information helpful if it is your case.
    Regards

  • Getting problem while installing Sql Server 2012

    I am using Windows 8 in my system. I am trying to install Sql Server 2012 in my system .
    But i am getting following error in the final.
    The required MSI package 'D:\SQL Server 2012\x86\setup\sql_engine_core_shared_msi' doesn't exist.
    Please, help me quickly.

    Hi,
    You post same question 3 times. Please avoid this practice on Forum, I 
    have merged the same thread  into this thread . Thanks for your understanding.
    In addition, as other post, you can copy the missing .msi file from the complete and unbroken installation media to your MSI package path. Then run as administrator again. And also check if your account has read and write permission for your installation
    media saving path. If the error still exists, you can check the SQL setup logs (Detail.txt and summary.txt) for analysis.
    There is similar issue about installing SQL Server failed due to miss the required MSI package.
    http://social.msdn.microsoft.com/Forums/en-US/2aa6136b-9ccd-4c97-a6d3-cbe408c38228/sql-server-2008-service-pack-1-installation-problem
    Regards,
    Sofiya Li
    Sofiya Li
    TechNet Community Support

  • Error Installing SQL SERVER 2012 Express

    Hello Everyone, i have this problem:
    When i try to install SQL SERVER Express 2012 on Windows 7 Ultimate 64b, appears the error "Can't fin registry key (MSDTC)", i try to follow the instructions of other forums, but the file "msdtc.exe" not found in the computer.
    Then i try to copy from other computer but only i have Windows 8, and doesn't Work (The copy).
    Also I install SQL Server 2012, but the services doesn't start, I think it's for the same error, then I uninstall the SQL server Again.
    I search in the net, but nobody reports the file "msdtc.exe" not exits in the OS, then I think, Ii have the unique computer that don't have the file????
    Please somebody answer my question, where i could find the file msdtc.exe for download?, this file will fix the problem?
    Sorry for my english.
    Thank you all.

    Could you please check if you have any service call "Distributed Transaction Coordinator" in services.msc
    similar issue:
    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/77f3fd5b-9290-4455-bf8c-0abd58166f91/msdtc-on-windows-7?forum=sqldatabaseengine

  • SQL Server 2012 Express SP1 will not install on Windows Server 2012 Essentials R2

    I have been attempting to install SQL Server 2012 with SP1 Express Edition for about a two weeks and have been unsuccessful.  My organization recently purchased a new Dell PowerEdge T320 Server (64 Bit) with Intel Xeon Proc.-E5-2420; 2.2Ghz, 32 Gb RAM,
    1 Tb RAID 5 H/D, and Windows Server 2012 R2 Essentials (preinstalled).  The server will be configured as an on premises server.  We are running a small church management application that requires SQL Server 2012 SP1 Express.  Per the direction
    of our application vendor, we downloaded the SQL Server 2012 SP1 Express file (SQLEXPRADV_x64_ENU.exe) from the Microsoft SQL Server Website.  We ran the file "As Administrator" and the SQL Server 2012 Setup program began. 
    We selected New SQL Server Stand-Alone Installation, successfully installed the needed Product Updates, and accepted the MS SQL Server 2013 Express License terms. 
    When the Feature Selection Page appeared we checked only the "Data Base Eng Services".  The
    Instance Configuration Page was displayed and we inserted a "Named Instance= Shelby",then pressed next.  On the
    Server Configuration Page the only change was setting the "sql server browser = automatic".  The Database Engine Configuration Page appeared
    and we inserted the following settings:1] Server Configuration Tab; a) mixed mode, b)inserted SQL Server Admin pswd, c) added current user as administrator: 2] Data Directories Tab; default/no changes: 3] User Instanced Tab; default/no
    changes: and 4] Filestream Tab; default/no changes.  Next the
    Reporting Services Configuration Page came up and the reporting services native mode was set to
    "install and configure".  The Error Reporting Page appeared and was left as the
    "default".  The SQL Server 2012 Setup program proceeded to Installation Progress Page and started to install. Just before the install program ended it displayed a message saying that there
    were errors and the Database Eng Services did not succeed. I uninstalled SQL Server 2012 SP1 Express three (3) times, ran Windows Update after every uninstall, attempted to install the Database Engine and got the same results.  Are there any patches or
    special procedures for correctly installing SQL Server 2012 SP1 Express on my hardware configuration or Windows Server 2012 Essentials R2?  Any insight would be greatly appreciated.

    Can you post the setup Summary and detail logs, which will help to figure out the problem? The details about the location can be found at https://msdn.microsoft.com/en-us/library/ms143702(v=sql.110).aspx
    Satish Kartan www.sqlfood.com

  • Use of PVKConverter with SQL Server 2012 SP2

    I am trying to convert a certificate that was exported from our database server to be used by SQL Server for database encryption.  When I run the PVKConverter, not Private Key File (PVK) is generated.
    The certificate has Server and Client Authentication as the purposes of the certificate. 
    What purpose or purposes does the certificate need in order to be able to be used by SQL Server 2012 SP2?
    Why doesn't the PVKConverter generate a private key file?
    I can use the command makecerts to generate a self signed certificate and have it work with SQL Server database encryption.
    Thanks.
    DJ

    Hi DJ,
    Based on my research, SQL Server supports the importing of existing security certificates, specified as a pair of files that are encoded in PVK/DER format. Below Transact-SQL script displays the basic key file format for SQL Server database encryption.
    CREATE CERTIFICATE <Certificate name>
    FROM FILE = '<PVK/DER format file>.cer'
    WITH PRIVATE KEY (FILE = '<PVK/DER format file>.pvk',
    DECRYPTION BY PASSWORD = '<Encryption password>');
    According to your description, PVKConverter doesn’t generate a private key file. PVKConverter is used to generate PVK/DER encoded security certificates from existing PFX encoded security certificates. Thus, please ensure that your certificate is encoded in
    PFX format and make sure you perform all the steps properly as described in the
    KB article.
    There is also a related blog for your reference.
    http://blogs.msdn.com/b/sql_pfe_blog/archive/2014/02/04/generating-a-trusted-tde-certificate-in-the-proper-format-from-a-certificate-authority.aspx
    Thanks,
    Lydia Zhang
    Lydia Zhang
    TechNet Community Support

  • SP2 for SQL Server 2012 with SP1 is failed with Error result: -2067529723

    SP2 for SQL Server 2012 with SP1 is failed when start the installtion from command prompt and thorws below errors in Passive node of the cluster.No other errors logged in eventviewer, temp folder and not created any log files in bootstarp folder.An error occurred during the SQL Server 2012 Setup operation.
    Error result: -2067529723
    Result facility code: 1220
    Result error code: 5
    For more information, review SQL Server 2012 Setup logs in your temp folder.It is not allowing to run the sql core setup to uninstall the cluster node and gives same error.Can any one got into the same issue and please help?ThanksPetchikumar

    Hi,
    Can you post summary.txt below link will help you locate it
    https://msdn.microsoft.com/en-us/library/ms143702%28v=sql.110%29.aspx
    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

  • Uninstall SQL Server 2008 Express R2 and SQL Server 2012 unsuccessfully

    HI
    I want to uninstall SQL Server 2008 R2 and SQL Server 2012 but it was successful.
    When I try to uninstall 2008 R2
    It shows the sqlsupport.msi can't find
    Warning 26003.  Microsoft Server 2008 R2 Setup Support Files cannot be uninstalled because the following products are installed:
    SQL Server 2008 R2 SP2 Common Files are installed
    SQL Server 2008 R2 Dabtabase Engine Shared
    Microsfot SQL Server R2 RsFx Driver
    SQL Server 2008 R2 SP2 Database Engine Services
    When I uninstall 2012, it shows the SQL Browser has been installed.
    Warning 26003.  Microsoft SQL sERVER 2012 Setup Support Files cannot be uninstalled because the following products are installed:
    SQL Server Browser for SQL Server 2012

    I tried to uninsall SQL Server 2008 R2 and SQL Server 2012.
    Yes, I did what you said : right click on Microsoft SQL Server 2008 R2 and then uninstall.
    System pop up window says :
    Warning 26003.  Microsoft SQL Server 2008 R2 Setup Support Files cannot be uninstalled because the following products are installed:
    SQL Server 2008 R2 SP2 Common Files are installed
    SQL Server 2008 R2 Dabtabase Engine Shared
    Microsfot SQL Server R2 RsFx Driver
    SQL Server 2008 R2 SP2 Database Engine Services
    I hope you are uninstalling from Add remove program. Can you first uninstall
    SQL Server 2008 R2 SP2 Common Files are installed
    SQL Server 2008 R2 Dabtabase Engine Shared
    Microsfot SQL Server R2 RsFx Driver
    SQL Server 2008 R2 SP2 Database Engine Services
    And then uninstall the
    Microsoft SQL Server 2008 R2
    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

  • SQL Server 2012 Reorg Index Job Blew up the Log File

    We have a maintenance plan that nightly (1) runs dbcc checkdb on all databases, (2) reorgs indexes on all databases, compacting large objects, (3) updates statistics, etc. There are three user databases, one large, one medium, one small. Usually it uses
    a little more than 80% of the medium database's log, set to 6,700 MB. Last night the reorg index step caused the log to increase to almost 14,000 MB and then blew up because the maximum file size was set to 14,000 MB, one of the alter index commands failed
    because it ran out of log space. (Dbcc checkdb step ran successfully.) Anyone have any idea what might cause this? There is one update process on this database, it runs at 3 AM. The maintenance plan runs at 9 PM and completes by 1 AM. The medium database has
    a 21,000 MB data file, reserved space is at about 10 GB. This is a SQL 2012 Standard SP 2 running on Windows 2012 Server Standard.

    I personally like to shrink the log files once the indexes have been rebuilt and before switching back to full recovery, because as I'm going to take a full backup afterwards, having a small log file reduces the size of the backup.
    Do you grow them afterwards, or do you let the application waste time on that during peak hours?
    I have not checked, but I see no reason why the backup size would depend on the size of the log file - it's the data in the data file you back up, not the log file.
    I would say this is highly dubious.
    Erland Sommarskog, SQL Server MVP, [email protected]
    Yeah I let the application allegedly "waste" a few milisseconds a day autogrowing the log file. Common, how long do you think it takes for a log file to grow a few GB on most storage systems nowadays? As long as you set an appropriate autogrow
    interval so your log file doesn't get too fragmented (full of VLFs), you'll be perfectly fine in most situations.
    Lets say you have a logical disk dedicated to log file storage, but it is shared across multiple databases within the instance. Having allocated space for the log files means there will be not much free space left in the disk in case ANY database needs more
    space than the others due to a peak in transactional workload, even though other databases have unused space that could have been used.
    What if this same disk, for some reason, is also used to store the tempdb log file? Then all applications will become unstable.
    These are the main reasons I don't recommend people blindly crucify keeping log files small when possible. I know there are many people who disagree and I'm aware of their reasons. Maybe we just had different experiences about this subject. Maybe people
    just haven't been through the nightmare of having a corrupted system database or a crashed instance because of insuficient log space in the middle of the day.
    And you are right about the size of the backup, I didn't put it correctly. It isn't the size of the backup that gets smaller (although the backup operation will run faster, having tested this myself), but the benefit from backing up a database with a small
    log file is that you won't need the extra space to restore it in a different environment such as a BI or DEV server, where recuperability doesn't matter and the database will be on simple recovery mode.
    Restoring the database will also be faster.
    Just because there are clouds in the sky it doesn't mean it isn't blue. But someone will come and argue that in addition to clouds, birds, airplanes, pollution, sunsets, daltonism and nuclear bombs, all adding different colours to the sky, this
    is an undocumented behavior and should not be relied upon.

  • Error in sql_engine_core_inst_Cpu64_1.log file for SQL Server 2012

    I was running SQL Server 2012 in Win 7 64 bit OS. Some how I found SQLSERVER server is not running and I was not able to run the service. Then I tried to unisntall and install again. And I found that some of the SQL Server
    features got failed,  like: Reporting Services - Native, Database Engine Services, Data Quality Services, Full-Text and Semantic Extractions for Search and SQL Server Replication. I checked the Summary.txt
    file from location C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\Log. It thsi logs referes to another log file location like: 
    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, and then try the setup process again.
      Component name:                SQL Server Database Engine Services Instance Features
      Component error code:          1639
      Component log file:            C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\Log\20140127_151409\sql_engine_core_inst_Cpu64_1.log
      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=sql_engine_core_inst.msi%400x162A16FE%400x1639
    I did unisntall/install multipel times. But fhw to fix the issue that saying in sql_engine_core_inst_Cpu64_1.log file.: 
    === Verbose logging started: 1/27/2014  15:45:04  Build type: SHIP UNICODE 5.00.7601.00  Calling process: C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\SQLServer2012\x64\ScenarioEngine.exe ===
    MSI (c) (C4:BC) [15:45:04:321]: Resetting cached policy values
    MSI (c) (C4:BC) [15:45:04:321]: Machine policy value 'Debug' is 0
    MSI (c) (C4:BC) [15:45:04:321]: ******* RunEngine:
               ******* Product: E:\Software\SQL Full Installation\x64\setup\sql_engine_core_inst_msi\sql_engine_core_inst.msi
               ******* Action: 
               ******* CommandLine: **********
    MSI (c) (C4:BC) [15:45:04:322]: Client-side and UI is none or basic: Running entire install on the server.
    MSI (c) (C4:BC) [15:45:04:322]: Grabbed execution mutex.
    MSI (c) (C4:BC) [15:45:04:323]: Cloaking enabled.
    MSI (c) (C4:BC) [15:45:04:323]: Attempting to enable all disabled privileges before calling Install on Server
    MSI (c) (C4:BC) [15:45:04:323]: Incrementing counter to disable shutdown. Counter after increment: 0
    MSI (s) (38:8C) [15:45:04:327]: Running installation inside multi-package transaction E:\Software\SQL Full Installation\x64\setup\sql_engine_core_inst_msi\sql_engine_core_inst.msi
    MSI (s) (38:8C) [15:45:04:327]: Grabbed execution mutex.
    MSI (s) (38:A0) [15:45:04:327]: Resetting cached policy values
    MSI (s) (38:A0) [15:45:04:327]: Machine policy value 'Debug' is 0
    MSI (s) (38:A0) [15:45:04:327]: ******* RunEngine:
               ******* Product: E:\Software\SQL Full Installation\x64\setup\sql_engine_core_inst_msi\sql_engine_core_inst.msi
               ******* Action: 
               ******* CommandLine: **********
    MSI (s) (38:A0) [15:45:04:452]: Machine policy value 'TransformsSecure' is 0
    MSI (s) (38:A0) [15:45:04:452]: User policy value 'TransformsAtSource' is 0
    MSI (s) (38:A0) [15:45:04:475]: Machine policy value 'DisableUserInstalls' is 0
    MSI (s) (38:A0) [15:45:04:475]: Specified instance {18B2A97C-92C3-4AC7-BE72-F823E0BC895B} via transform :InstID01.mst;:InstName02.mst is already installed. MSINEWINSTANCE requires a new instance that is not installed.
    MSI (s) (38:A0) [15:45:04:475]: MainEngineThread is returning 1639
    MSI (s) (38:8C) [15:45:04:477]: User policy value 'DisableRollback' is 0
    MSI (s) (38:8C) [15:45:04:477]: Machine policy value 'DisableRollback' is 0
    MSI (s) (38:8C) [15:45:04:477]: Incrementing counter to disable shutdown. Counter after increment: 0
    MSI (s) (38:8C) [15:45:04:478]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\InProgress 3: 2 
    MSI (s) (38:8C) [15:45:04:478]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\InProgress 3: 2 
    MSI (s) (38:8C) [15:45:04:478]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied.  Counter after decrement: -1
    MSI (s) (38:8C) [15:45:04:478]: Restoring environment variables
    MSI (c) (C4:BC) [15:45:04:481]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied.  Counter after decrement: -1
    MSI (c) (C4:BC) [15:45:04:481]: MainEngineThread is returning 1639
    === Verbose logging stopped: 1/27/2014  15:45:04 ===
    Please advice. I searched many places and did not get actual solution that will resolve my case.
    Nusrat Akhter

    Hi Nusrat Akhter,
    According to your description, when installing the first install failed, and it looks like the instance did not uninstall completely. To solve the issue I recommend you changed the instance name in re-installing SQL Server, and check if it can work fine.
    There is a similar issue that the SQL engine will not start, and there is no method of uninstalling either it, or any of the components etc. You can review the following post.
    https://connect.microsoft.com/SQLServer/feedback/details/710892/sql-server-2012-rc0-install-fails-citing-invalid-drivers
    Thanks,
    Sofiya Li
    Sofiya Li
    TechNet Community Support

  • SQL Server 2012 Developer Edition will not install. Setup files don't even get copied completely. Win 8.1. ACT instance is loaded & can't be deleted. From log file: Error: Action "PreMsiTimingConfigAction" failed during execution.

    SQL Server 2012 Developer Edition will not install.  Setup files don't even get copied completely.  Win 8.1.  ACT instance is loaded & can't be deleted. From log file: Error: Action "PreMsiTimingConfigAction" failed during execution.

    Hello,
    I am glad it worked.
    Thank you for visiting MSDN forums!
    Regards,
    Alberto Morillo
    SQLCoffee.com

  • Do we need to format data and log files with 64k cluster size for sql server 2012?

    Do we need to format data and log files with 64k cluster size for sql server 2012?
    Does this best practice still applies to sql server 2012 & 2014?

    Yes.  The extent size of SQL Server data files, and the max log block size have not changed with the new versions, so the guidance should remain the same.
    Microsoft SQL Server Storage Engine PM

  • Can you minimize logging in a SSIS data flow when the database is in a SQL Server 2012 Always On Group?

    We have a file that we are loading 1st into a staging database then into a production database that contains over 5 million rows. Both databases belong to a SQL Server 2012 AG. We would like to minimize the logging in the staging database but t
    the same time keep the staging database in the AG. I know about fast load and setting the buffer settings in SSIS but I've read that this doesn't work on replicated tables and I am assuming that speaks to the AG.
    Are there any articles or someone's personal experiences with this type of scenario that could point us in the right direction and offset some of the initial data load into staging by minimizing logging?
    Thanks,
    Sue
    Sue

    Hi Sue,
    I am trying to involve someone more familiar with this topic for a further look at this issue. Sometime delay might be expected from the job transferring. Your patience is greatly appreciated.
    Thank you for your understanding and support.
    Regards,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Full-Text search is not working with PDF files - SQL Server 2012 64 bit

    Hi,
    We are in the process of storing PDF files in SQL Server 2012 with Full-Text search capability.
    I followed the steps as below and it works fine with word document but not for PDF files. I tried with PDF ifiler 11 & 9 and both are unsuccessful.
    Server/DB Level Settings:
    1)
    Enable FileStream
    2)
    Install Full-Text
    then restart
    3)
    Use [specific db]
    alter
    database [db name]
    add
    filegroup Files
    contains filestream;
    alter
    database [db name]
    add
    file (
    name = N'Files',
    filename =
    N'D:\SQL\DATA') to
    filegroup [Files];
    3)
    Database level
    Settings:
    FileStream:
    FileStream
    Directory name:
    [Set the name]
    FileStream
    non-transacted
    Access: [set Appropriate]
    3a)
    Add a
    datafile to DB
    with filestreamdata
    filetype.
    4)
    Share D:\SQL\DATA
    directory and
    add specific accounts
    with read/write
    access
    5)
    Give bulkadmin
    access to those
    specific accounts
    at server
    level
    6)
    From the
    page (link)
    download and
    install the *.pdf
    IFilter for
    FTS. Link:
    http://www.adobe.com/support/downloads/detail.jsp?ftpID=5542
    7)
    To the
    PATH global system
    variable add
    path to the
    catalog,
    where you installed
    the plugin.
    Default for
    this version is:
    C:\Program
    Files\Adobe\Adobe
    PDF iFilter 9
    for 64-bit
    platforms\bin
    8)
    From the
    page (link)
    download a
    FilterPackx64.exe
    and install
    it. Link:
    http://www.microsoft.com/en-us/download/confirmation.aspx?id=20109
    9)
    Now from
    SSMS execute the following
    procedures:
    -sp_fulltext_service
    'load_os_resources',1
    -sp_fulltext_service
    'verify_signature', 0
    EXEC
    sp_fulltext_service
    'update_languages';
    -- update language list
    EXEC
    sp_fulltext_service
    'restart_all_fdhosts';
    -- restart daemon
    reconfigure
    with override;
    10)
    Restart the
    server
    11)
    select document_type,
    path from
    sys.fulltext_document_types
    where document_type
    = '.pdf'
    -select
    document_type,
    path from sys.fulltext_document_types
    where document_type
    = '.docx'
    12) Results are OK.
    Following is my Table /Index/ catalog script:
    CREATE
    TABLE dbo.DocumentFilesTest
    DocumentId  INT
    IDENTITY(1,1)
    NOT NULL
    PRIMARY KEY,
    AddDate datetime
    NOT NULL,
    Name nvarchar(50)
    NOT NULL,
    Extension nvarchar(10)
    NOT NULL,
    Description nvarchar(1000)
    NULL,
    FileStream_Id UNIQUEIDENTIFIER
    ROWGUIDCOL NOT
    NULL UNIQUE DEFAULT
    NEWSEQUENTIALID(),
    FileSource varbinary(MAX)
    FILESTREAM DEFAULT(0x)
    go
    --Add default add date for document   
    ALTER
    TABLE dbo.DocumentFilesTest
    ADD CONSTRAINT
    DF_DocumentFilesTest_AddDate
    DEFAULT sysdatetime()
    FOR AddDate
    EXEC
    sp_fulltext_database
    'enable'
    GO
    IF
    NOT EXISTS
    (SELECT
    TOP 1 1 FROM sys.fulltext_catalogs
    WHERE name
    = 'Ducuments_Catalog_test')
    BEGIN
    EXEC sp_fulltext_catalog
    'Ducuments_Catalog_test',
    'create',
    'D:\SQL\PDFBlob';
    END
    --EXEC sp_fulltext_catalog 'Ducuments_Catalog_test', 'drop'
    DECLARE
    @indexName nvarchar(255)
    = (SELECT
    Top 1 i.Name
    from sys.indexes
    i
    Join sys.tables
    t on 
    i.object_id
    = t.object_id
    WHERE t.Name
    = 'DocumentFilesTest'
    AND i.type_desc
    = 'CLUSTERED')
    PRINT @indexName
    EXEC
    sp_fulltext_table
    'DocumentFilesTest',
    'create',
    'Ducuments_Catalog_test', 
    @indexName
    EXEC
    sp_fulltext_column
    'DocumentFilesTest',
    'FileSource',
    'add', 0,
    'Extension'
    EXEC
    sp_fulltext_table
    'DocumentFilesTest',
    'activate'
    EXEC
    sp_fulltext_catalog
    'Ducuments_Catalog_test',
    'start_full'
    ALTER
    FULLTEXT INDEX
    ON [dbo].[DocumentFilesTest]
    ENABLE
    ALTER
    FULLTEXT INDEX
    ON [dbo].[DocumentFilesTest]
    SET CHANGE_TRACKING
    = AUTO
    ALTER
    FULLTEXT CATALOG
    Ducuments_Catalog_test REBUILD
    WITH ACCENT_SENSITIVITY=OFF;
    INSERT
    INTO DocumentFilesTest(Extension,
    Name,
    FileSource)
    SELECT
     'pdf'
    'BOL12006553.pdf'
    * FROM
    OPENROWSET(BULK
    'd:\SQL\PDFBlob\BOL12006553.pdf',
    SINGLE_BLOB)
    AS BLOB;
    GO
    INSERT
    INTO DocumentFilesTest(Extension,
    Name,
    FileSource)
    SELECT
     'docx'
    'test.docx'
    * FROM
    OPENROWSET(BULK
    'd:\SQL\PDFBlob\test.docx',
    SINGLE_BLOB)
    AS Document;
    GO
    SELECT
    d.*
    FROM dbo.DocumentFilesTest
    d WHERE
    Contains(d.FileSource,
    'BILL')
    Returns nothing. it should come from PDF file
    SELECT
    d.*
    FROM dbo.DocumentFilesTest
    d WHERE
    Contains(d.FileSource,
    'TEST')
    Returns from word document as follows:
    2           2014-06-04 10:11:41.393            test.docx docx           
    NULL   [BINARY Value]  [Binary Value]
    Any help is appreciated. Its been a long wait.
    Thanks,
    Vel
    Vel Thavasi

    Hello,
    Did you check the fulltext log files for more details about the errors. If the filter isn’t working, there should be errors in the error log file.
    The following thread is about similar issue, please refer to:
    http://social.msdn.microsoft.com/forums/sqlserver/en-US/69535dbc-c7ef-402d-a347-d3d3e4860d72/sql-server-2008-64bit-fulltext-indexing-pdf-not-working-cant-find-ifilter
    Regards,
    Fanny Liu
    If you have any feedback on our support, please click here.
    Fanny Liu
    TechNet Community Support

  • 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

Maybe you are looking for