Ident_Current('TableName') not giving last inserted identity Value in SQL Server 2012

Hi ,
Ident_Current('TableName') is not giving last inserted identity Value in SQL Server 2012. 
Latest Value of ID and Ident_Current is differing for that particular table.  
Why its happening? Ident_Current value is greater than last inserted ID.
Please guide me why its happening?

Here is one example:
CREATE DATABASE PMCtest ON (NAME = 'PMCtest', FILENAME = 'B:\ProdDB-Unzipped\PMCtest.mdf', SIZE = 25GB )
LOG ON (NAME = 'PMCtest_log', FILENAME = 'B:\ProdDB-Unzipped\PMCtest.ldf', SIZE = 2GB)
CREATE TABLE identity_crisis (a int IDENTITY NOT NULL PRIMARY KEY,
                              b sysname NOT NULL CHECK (b <> 'sysschobjs'))
go
INSERT identity_crisis (b) VALUES ('First name')
INSERT identity_crisis SELECT name FROM sys.objects
go
SELECT MAX(a), ident_current('identity_crisis')
FROM  identity_crisis
go
DROP TABLE identity_crisis
Because the second INSERT statement fails, the identity values from 2 to 12 are lost. This is a very intentional design to promote high concurrency. If you don't want gaps, you should not use IDENTITY, but roll your own.
Also, beware that ident_current returns database-wide value, so if you insert one row, and another process inserts another row before you interrogate ident_current, you will get the id for the row of the other process.
Erland Sommarskog, SQL Server MVP, [email protected]

Similar Messages

  • Master Data Services not available under shared feature while installing SQL server 2012

    Hi,
    I am trying to install Master Data Services but do not see the option to select MDS under the shared features when going through the SQL server 2012 installation. I have the SQL server 2012 SP1 (64 bit) install files. I have also installed SP2. I havent
    found anything online about the issue.
    Can someone please advise?
    I have a screenshot of the installation screen which I will attach as soon as I am able to get my account verified. Thanks!

    Hi Revees,
    This might be a very naïve and also out of the original scope of the thread question.
    We are thinking of going with the developer edition. We have 2/3 developers and some other testers and business users.
    1) I understand that we need a developer license for each developer. But would we need a license for the business user. Can they have a sort of read access to the dbs?
    2) If a developer has MSDN subscription, Would they need to purchase the license too assuming we purchase the developer edition of the software (and not download it using the MSDN subscription)?
    Thanks for your assistance!

  • Bit value in sql-server

    hello frnds,
    i want to insert bit value into sql-server 2000... using hibernate
    what is the datatype for java bean.... ?
    and how it is mappend in mapping xml....?
    if any one has idea then please help me...
    thanx in advance..
    regards
    PanDev84

    The WPF MediaElement (unlike Silverlight's) doesn't support setting the Source to a Stream directly. You could try any of the workarounds suggested here:
    http://stackoverflow.com/questions/7117589/using-mediaelement-to-play-video-from-stream
    Othwerwise you could select the data (bytes) from the database into a byte[]:
    http://stackoverflow.com/questions/13952261/insert-and-retrieve-bytearray-from-sql-server-in-c-sharp
    ...and then save the data to a temporary physical file and play this one as usual:
    byte[] data = ...; //select from db
    System.IO.File.WriteAllBytes("temp.wav", data);
    var mediaPlayer = new MediaPlayer();
    mediaPlayer.Open(new Uri("temp.wav", UriKind.Relative));
    mediaPlayer.Play();
    The MediaPlayer.Open method will read the file via a stream automatically.
    Hope that helps.
    Please remember to close your threads by marking helpful posts as answer and please start a new thread if you have a new question.

  • SQL Server 2012 Management Studio: Creating a Database and a dbo Table. Inserting VALUES into the table. How to insert 8 Values for future use in XQuery?

    Hi all,
    In my SQL Server 2012 Management Studio (SSMS2012), I tried to create a Database (MacLochainnsDB) and a dbo Table (marvel). then I wanted insert 8 VALUES into the Table by using the following code:
    USE master
    IF EXISTS
    (SELECT 1
    FROM sys.databases
    WHERE name = 'MacLochlainnsDB')
    DROP DATABASE MacLochlainnsDB
    GO
    CREATE DATABASE MacLochlainnsDB
    GO
    CREATE TABLE [dbo].[marvel] (
    [avenger_name] [char] (30) NULL)
    INSERT INTO marvel
    (avenger_name)
    VALUES
    ('Hulk', 1),
    ('Iron Man', 2),
    ('Black Widow', 3),
    ('Thor', 4),
    ('Captain America', 5),
    ('Hawkeye', 6),
    ('Winter Soldier', 7),
    ('Iron Patriot', 8)
    I got the following error Message:
    Msg 110, Level 15, State 1, Line 5
    There are fewer columns in the INSERT statement than values specified in the VALUES clause. The number of values in the VALUES clause must match the number of columns specified in the INSERT statement.
    How can I correct this problem?
    Please kindly help and advise.
    Thanks in advance,
    Scott Chang
    P. S.
    The reason I tried to create the Database, dbo Table, and then to insert the VALUES is to learn the following thing:
    You can query the entire node tree with the following xquery statement because it looks for the occurrence of any node with the /* search string:
    DECLARE @x xml;
    SET @x = N'<marvel>
    <avenger_name>Captain America</avenger_name>
    </marvel>';
    SELECT @x.query('/*');
    You can query the avenger_name elements from the marvel_xml table with the following syntax:
    SELECT xml_table.query('/marvel/avenger_name')
    FROM marvel_xml;
    It returns the following set of avenger_name elements:
    <avenger_name>Hulk</avenger_name>
    <avenger_name>Iron Man</avenger_name>
    <avenger_name>Black Widow</avenger_name>
    <avenger_name>Thor</avenger_name>
    <avenger_name>Captain America</avenger_name>
    <avenger_name>Hawkeye</avenger_name>
    <avenger_name>Winter Soldier</avenger_name>
    <avenger_name>Iron Patriot</avenger_name>
    You can query the fourth avenger_name element from the marvel_xml table with the following xquery statement:
    SELECT xml_table.query('/marvel[4]/avenger_name')
    FROM marvel_xml;
    It returns the following avenger_name element:
    <avenger_name>Thor</avenger_name>

    Hi Scott,
    The master database records all the system-level information for a SQL Server system, so best practise would be not to create any user-defined
    object within it.
    To change your default database(master by default) of your login to another, follow the next steps so that next time when connected you don't have to use "USE dbname" to switch database.
    Open SQL Server Management Studio
    --> Go to Object explorer(the left panel by default layout)
    --> Extend "Security"
    --> Extend "Logins"
    --> Right click on your login, click "propertites"
    --> Choose the "Default database" at the bottom of the pop-up window.
    --or simply by T-SQL
    Exec sp_defaultdb @loginame='yourLogin', @defdb='youDB'
    Regarding your question, you can reference the below.
    SELECT * FROM master.sys.all_objects where name ='Marvel'
    --OR
    SELECT OBJECT_ID('master.dbo.Marvel') --if non empty result returns, the object exists
    --usually the OBJECT_ID is used if a if statement as below
    IF OBJECT_ID('master.dbo.Marvel') IS NOT NULL
    PRINT ('TABLE EXISTS') --Or some other logic
    What is the sys.all_objects? See
    here.
    If you have any question, feel free to let me know.
    Eric Zhang
    TechNet Community Support

  • Could not find value to a key (sql server 2012)

    hi guys . look i have problem here. i already safely installed sql server 2012 64 bit . but when come to sql managament studio , it always appear error "could not write a value to a key " something like that. plus i already run it as administator
    and already set HKEY to full control. yet it still appear the same. someone please help me . 

    hi guys . look i have problem here. i already safely installed sql server 2012 64 bit . but when come to sql managament studio , it always appear error "could not write a value to a key " something like that. plus i already run it as administator
    and already set HKEY to full control. yet it still appear the same. someone please help me . 
    Hi,
    Was your error like Could not write value to key \SOFTWARE. Error code: 1406 if so this is Not a problem with SQL server possible causes for this kind of issue is
    1. Antivrus running. Please stop antivirus for period of install
    2. Some kind or registry scanner software, adware, some scanning software running on your windows machine which is blocking access to registry. Below link has same issue see answer given by Michpol
    http://social.technet.microsoft.com/Forums/sqlserver/en-US/41dec503-ce0a-40e1-ae5f-363452890d48/sql-server-management-tools-could-not-write-value-to-key-software-error-code-1406?forum=sqltools
    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

  • Selective XML Index feature is not supported for the current database version , SQL Server Extended Events , Optimizing Reading from XML column datatype

    Team , Thanks for looking into this  ..
    As a last resort on  optimizing my stored procedure ( Below ) i wanted to create a Selective XML index  ( Normal XML indexes doesn't seem to be improving performance as needed ) but i keep getting this error within my stored proc . Selective XML
    Index feature is not supported for the current database version.. How ever
    EXECUTE sys.sp_db_selective_xml_index; return 1 , stating Selective XML Indexes are enabled on my current database .
    Is there ANY alternative way i can optimize below stored proc ?
    Thanks in advance for your response(s) !
    /****** Object: StoredProcedure [dbo].[MN_Process_DDLSchema_Changes] Script Date: 3/11/2015 3:10:42 PM ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    -- EXEC [dbo].[MN_Process_DDLSchema_Changes]
    ALTER PROCEDURE [dbo].[MN_Process_DDLSchema_Changes]
    AS
    BEGIN
    SET NOCOUNT ON --Does'nt have impact ( May be this wont on SQL Server Extended events session's being created on Server(s) , DB's )
    SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED
    select getdate() as getdate_0
    DECLARE @XML XML , @Prev_Insertion_time DATETIME
    -- Staging Previous Load time for filtering purpose ( Performance optimize while on insert )
    SET @Prev_Insertion_time = (SELECT MAX(EE_Time_Stamp) FROM dbo.MN_DDLSchema_Changes_log ) -- Perf Optimize
    -- PRINT '1'
    CREATE TABLE #Temp
    EventName VARCHAR(100),
    Time_Stamp_EE DATETIME,
    ObjectName VARCHAR(100),
    ObjectType VARCHAR(100),
    DbName VARCHAR(100),
    ddl_Phase VARCHAR(50),
    ClientAppName VARCHAR(2000),
    ClientHostName VARCHAR(100),
    server_instance_name VARCHAR(100),
    ServerPrincipalName VARCHAR(100),
    nt_username varchar(100),
    SqlText NVARCHAR(MAX)
    CREATE TABLE #XML_Hold
    ID INT NOT NULL IDENTITY(1,1) PRIMARY KEY , -- PK necessity for Indexing on XML Col
    BufferXml XML
    select getdate() as getdate_01
    INSERT INTO #XML_Hold (BufferXml)
    SELECT
    CAST(target_data AS XML) AS BufferXml -- Buffer Storage from SQL Extended Event(s) , Looks like there is a limitation with xml size ?? Need to re-search .
    FROM sys.dm_xe_session_targets xet
    INNER JOIN sys.dm_xe_sessions xes
    ON xes.address = xet.event_session_address
    WHERE xes.name = 'Capture DDL Schema Changes' --Ryelugu : 03/05/2015 Session being created withing SQL Server Extended Events
    --RETURN
    --SELECT * FROM #XML_Hold
    select getdate() as getdate_1
    -- 03/10/2015 RYelugu : Error while creating XML Index : Selective XML Index feature is not supported for the current database version
    CREATE SELECTIVE XML INDEX SXI_TimeStamp ON #XML_Hold(BufferXml)
    FOR
    PathTimeStamp ='/RingBufferTarget/event/timestamp' AS XQUERY 'node()'
    --RETURN
    --CREATE PRIMARY XML INDEX [IX_XML_Hold] ON #XML_Hold(BufferXml) -- Ryelugu 03/09/2015 - Primary Index
    --SELECT GETDATE() AS GETDATE_2
    -- RYelugu 03/10/2015 -Creating secondary XML index doesnt make significant improvement at Query Optimizer , Instead creation takes more time , Only primary should be good here
    --CREATE XML INDEX [IX_XML_Hold_values] ON #XML_Hold(BufferXml) -- Ryelugu 03/09/2015 - Primary Index , --There should exists a Primary for a secondary creation
    --USING XML INDEX [IX_XML_Hold]
    ---- FOR VALUE
    -- --FOR PROPERTY
    -- FOR PATH
    --SELECT GETDATE() AS GETDATE_3
    --PRINT '2'
    -- RETURN
    SELECT GETDATE() GETDATE_3
    INSERT INTO #Temp
    EventName ,
    Time_Stamp_EE ,
    ObjectName ,
    ObjectType,
    DbName ,
    ddl_Phase ,
    ClientAppName ,
    ClientHostName,
    server_instance_name,
    nt_username,
    ServerPrincipalName ,
    SqlText
    SELECT
    p.q.value('@name[1]','varchar(100)') AS eventname,
    p.q.value('@timestamp[1]','datetime') AS timestampvalue,
    p.q.value('(./data[@name="object_name"]/value)[1]','varchar(100)') AS objectname,
    p.q.value('(./data[@name="object_type"]/text)[1]','varchar(100)') AS ObjectType,
    p.q.value('(./action[@name="database_name"]/value)[1]','varchar(100)') AS databasename,
    p.q.value('(./data[@name="ddl_phase"]/text)[1]','varchar(100)') AS ddl_phase,
    p.q.value('(./action[@name="client_app_name"]/value)[1]','varchar(100)') AS clientappname,
    p.q.value('(./action[@name="client_hostname"]/value)[1]','varchar(100)') AS clienthostname,
    p.q.value('(./action[@name="server_instance_name"]/value)[1]','varchar(100)') AS server_instance_name,
    p.q.value('(./action[@name="nt_username"]/value)[1]','varchar(100)') AS nt_username,
    p.q.value('(./action[@name="server_principal_name"]/value)[1]','varchar(100)') AS serverprincipalname,
    p.q.value('(./action[@name="sql_text"]/value)[1]','Nvarchar(max)') AS sqltext
    FROM #XML_Hold
    CROSS APPLY BufferXml.nodes('/RingBufferTarget/event')p(q)
    WHERE -- Ryelugu 03/05/2015 - Perf Optimize - Filtering the Buffered XML so as not to lookup at previoulsy loaded records into stage table
    p.q.value('@timestamp[1]','datetime') >= ISNULL(@Prev_Insertion_time ,p.q.value('@timestamp[1]','datetime'))
    AND p.q.value('(./data[@name="ddl_phase"]/text)[1]','varchar(100)') ='Commit' --Ryelugu 03/06/2015 - Every Event records a begin version and a commit version into Buffer ( XML ) we need the committed version
    AND p.q.value('(./data[@name="object_type"]/text)[1]','varchar(100)') <> 'STATISTICS' --Ryelugu 03/06/2015 - May be SQL Server Internally Creates Statistics for #Temp tables , we do not want Creation of STATISTICS Statement to be logged
    AND p.q.value('(./data[@name="object_name"]/value)[1]','varchar(100)') NOT LIKE '%#%' -- Any stored proc which creates a temp table within it Extended Event does capture this creation statement SQL as well , we dont need it though
    AND p.q.value('(./action[@name="client_app_name"]/value)[1]','varchar(100)') <> 'Replication Monitor' --Ryelugu : 03/09/2015 We do not want any records being caprutred by Replication Monitor ??
    SELECT GETDATE() GETDATE_4
    -- SELECT * FROM #TEMP
    -- SELECT COUNT(*) FROM #TEMP
    -- SELECT GETDATE()
    -- RETURN
    -- PRINT '3'
    --RETURN
    INSERT INTO [dbo].[MN_DDLSchema_Changes_log]
    [UserName]
    ,[DbName]
    ,[ObjectName]
    ,[client_app_name]
    ,[ClientHostName]
    ,[ServerName]
    ,[SQL_TEXT]
    ,[EE_Time_Stamp]
    ,[Event_Name]
    SELECT
    CASE WHEN T.nt_username IS NULL OR LEN(T.nt_username) = 0 THEN t.ServerPrincipalName
    ELSE T.nt_username
    END
    ,T.DbName
    ,T.objectname
    ,T.clientappname
    ,t.ClientHostName
    ,T.server_instance_name
    ,T.sqltext
    ,T.Time_Stamp_EE
    ,T.eventname
    FROM
    #TEMP T
    /** -- RYelugu 03/06/2015 - Filters are now being applied directly while retrieving records from BUFFER or on XML
    -- Ryelugu 03/15/2015 - More filters are likely to be added on further testing
    WHERE ddl_Phase ='Commit'
    AND ObjectType <> 'STATISTICS' --Ryelugu 03/06/2015 - May be SQL Server Internally Creates Statistics for #Temp tables , we do not want Creation of STATISTICS Statement to be logged
    AND ObjectName NOT LIKE '%#%' -- Any stored proc which creates a temp table within it Extended Event does capture this creation statement SQL as well , we dont need it though
    AND T.Time_Stamp_EE >= @Prev_Insertion_time --Ryelugu 03/05/2015 - Performance Optimize
    AND NOT EXISTS ( SELECT 1 FROM [dbo].[MN_DDLSchema_Changes_log] MN
    WHERE MN.[ServerName] = T.server_instance_name -- Ryelugu Server Name needes to be added on to to xml ( Events in session )
    AND MN.[DbName] = T.DbName
    AND MN.[Event_Name] = T.EventName
    AND MN.[ObjectName]= T.ObjectName
    AND MN.[EE_Time_Stamp] = T.Time_Stamp_EE
    AND MN.[SQL_TEXT] =T.SqlText -- Ryelugu 03/05/2015 This is a comparision Metric as well , But needs to decide on
    -- Peformance Factor here , Will take advise from Lance if comparision on varchar(max) is a vital idea
    --SELECT GETDATE()
    --PRINT '4'
    --RETURN
    SELECT
    top 100
    [EE_Time_Stamp]
    ,[ServerName]
    ,[DbName]
    ,[Event_Name]
    ,[ObjectName]
    ,[UserName]
    ,[SQL_TEXT]
    ,[client_app_name]
    ,[Created_Date]
    ,[ClientHostName]
    FROM
    [dbo].[MN_DDLSchema_Changes_log]
    ORDER BY [EE_Time_Stamp] desc
    -- select getdate()
    -- ** DELETE EVENTS after logging into Physical table
    -- NEED TO Identify if this @XML can be updated into physical system table such that previously loaded events are left untoched
    -- SET @XML.modify('delete /event/class/.[@timestamp="2015-03-06T13:01:19.020Z"]')
    -- SELECT @XML
    SELECT GETDATE() GETDATE_5
    END
    GO
    Rajkumar Yelugu

    @@Version : ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Microsoft SQL Server 2012 - 11.0.5058.0 (X64)
        May 14 2014 18:34:29
        Copyright (c) Microsoft Corporation
        Developer Edition (64-bit) on Windows NT 6.2 <X64> (Build 9200: ) (Hypervisor)
    (1 row(s) affected)
    Compatibility level is set to 110 .
    One of the limitation states - XML columns with a depth of more than 128 nested nodes
    How do i verify this ? Thanks .
    Rajkumar Yelugu

  • 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

  • The cluster resource 'SQL Server' could not be brought online error while in completion stage of sql server 2012 failover installation

    While installing sql server 2012 with failover clustering I got the following error:
    The cluster resource 'SQL Server' could not be brought online. Error: There was a failure to call cluster code from a provider. Exception message: Generic failure. Status code: 5942. Description: The resource failed to come online due to the failure of one
    or more provider resources.
    The two nodes of the sql server failover have been successfully prepared. The error came while running the advance cluster completion option.
    In the clustered events in failover cluster manager the following message is displayed:
    Cluster resource 'SQL Network Name (CPCTestSQLClus)' of type 'Network name' in clustered role 'SQL Server (MSSQLSERVER)' failed.
    I have done various checking and the issue remained. I tried to start the sql

    Please find below part of the content of the cluster log. I hope this is helpful in resolving the issue:
    00000998.000010e8::2013/05/08-20:45:00.233 INFO  [RES] Network Name <SQL Network Name (CPCTestSQLClus)>: Online called for resource SQL Network Name (CPCTestSQLClus)
    000005a4.0000050c::2013/05/08-20:45:00.233 INFO  [RCM] HandleMonitorReply: ONLINERESOURCE for 'SQL Network Name (CPCTestSQLClus)', gen(6) result 997/0.
    000005a4.0000050c::2013/05/08-20:45:00.233 INFO  [RCM] Res SQL Network Name (CPCTestSQLClus): OnlineCallIssued -> OnlinePending( StateUnknown )
    000005a4.0000050c::2013/05/08-20:45:00.233 INFO  [RCM] TransitionToState(SQL Network Name (CPCTestSQLClus)) OnlineCallIssued-->OnlinePending.
    00000998.000012f0::2013/05/08-20:45:00.233 INFO  [RES] Network Name <SQL Network Name (CPCTestSQLClus)>: Entering Online thread
    000005a4.0000050c::2013/05/08-20:45:00.233 INFO  [GEM] Sending 1 messages as a batched GEM message
    00000998.000012f0::2013/05/08-20:45:00.233 INFO  [RES] Network Name <SQL Network Name (CPCTestSQLClus)>: Initializing config info
    00000998.000012f0::2013/05/08-20:45:00.248 INFO  [RES] Network Name <SQL Network Name (CPCTestSQLClus)>: Skipping initialization of 'Identity' module because netname is not yet created
    00000998.000012f0::2013/05/08-20:45:00.248 INFO  [RES] Network Name <SQL Network Name (CPCTestSQLClus)>: Performing actual online of resource.
    00000998.000012f0::2013/05/08-20:45:00.248 INFO  [RES] Network Name <SQL Network Name (CPCTestSQLClus)>: Obtaining IP info for resource SQL IP Address 1 (CPCTestSQLClus)
    00000998.000012f0::2013/05/08-20:45:00.248 INFO  [RES] Network Name <SQL Network Name (CPCTestSQLClus)>: Using provider SQL IP Address 1 (CPCTestSQLClus), ip address 10.144.166.160, mask 255.255.255.0, prefix length 24
    00000998.000012f0::2013/05/08-20:45:00.248 INFO  [RES] Network Name <SQL Network Name (CPCTestSQLClus)>: Resource has 1 IPs
    00000998.000012f0::2013/05/08-20:45:00.248 INFO  [RES] Network Name <SQL Network Name (CPCTestSQLClus)>: IP: Type Ipv4, Address 10.144.166.160:~0~, Prefix 10.144.166.160/24, Online true, Transport \Device\NetBt_If3
    00000998.000012f0::2013/05/08-20:45:00.248 INFO  [RES] Network Name: Agent: Initializing (082d8ef5-62a8-4fee-acbc-e89b769e9181,Configuration)
    00000998.000012f0::2013/05/08-20:45:00.248 INFO  [RES] Network Name: Agent: Sending request Netname/InitializeIndirect to NN:Agent
    00000998.000010e8::2013/05/08-20:45:00.248 INFO  [RES] Network Name: Agent: OnInitialize (082d8ef5-62a8-4fee-acbc-e89b769e9181,Configuration)
    00000998.000010e8::2013/05/08-20:45:00.248 INFO  [RES] Network Name: Agent: CanModuleBeInitializedImp - Module can be initialized, current state Offline
    00000998.000010e8::2013/05/08-20:45:00.248 INFO  [RES] Network Name: Agent: Sending Initialize to module NN:082d8ef5-62a8-4fee-acbc-e89b769e9181:Configuration
    00000998.000010e8::2013/05/08-20:45:00.248 INFO  [RES] Network Name: Agent: Sending request Netname/Initialize to NN:082d8ef5-62a8-4fee-acbc-e89b769e9181:Configuration
    00000998.000010e8::2013/05/08-20:45:00.248 INFO  [RES] Network Name <SQL Network Name (CPCTestSQLClus)>: Configuration: Waiting for ongoing slow strand to complete (if any)
    00000998.000010e8::2013/05/08-20:45:00.248 INFO  [RES] Network Name <SQL Network Name (CPCTestSQLClus)>: Configuration: Signaling main strand to initialize module
    00000998.000010e8::2013/05/08-20:45:00.248 INFO  [RES] Network Name <SQL Network Name (CPCTestSQLClus)>: Configuration: Calling initialize of the configuration implementation
    000005a4.00001350::2013/05/08-20:45:00.248 INFO  [GEM] Sending 1 messages as a batched GEM message
    00000998.000010e8::2013/05/08-20:45:00.248 INFO  [RES] Network Name <SQL Network Name (CPCTestSQLClus)>: Configuration: Setting 'StatusKerberos' in clusdb returned status 0
    00000998.000010e8::2013/05/08-20:45:00.248 INFO  [RES] Network Name <SQL Network Name (CPCTestSQLClus)>: Configuration: Creating a New AD NetName (type Singleton)...
    00000998.000010e8::2013/05/08-20:45:00.248 INFO  [RES] Network Name: Agent: Initializing (082d8ef5-62a8-4fee-acbc-e89b769e9181,AccountAD)
    00000998.000010e8::2013/05/08-20:45:00.248 INFO  [RES] Network Name: Agent: Sending request Netname/InitializeIndirect to NN:Agent
    00000998.000010e8::2013/05/08-20:45:00.248 INFO  [RES] Network Name: Agent: OnInitialize (082d8ef5-62a8-4fee-acbc-e89b769e9181,AccountAD)
    00000998.000010e8::2013/05/08-20:45:00.248 INFO  [RES] Network Name: Agent: CanModuleBeInitializedImp - Module can be initialized, current state Closing
    00000998.000010e8::2013/05/08-20:45:00.248 INFO  [RES] Network Name: Agent: Sending Initialize to module NN:082d8ef5-62a8-4fee-acbc-e89b769e9181:AccountAD
    00000998.000010e8::2013/05/08-20:45:00.248 INFO  [RES] Network Name: Agent: Sending request Netname/Initialize to NN:082d8ef5-62a8-4fee-acbc-e89b769e9181:AccountAD
    00000998.000010e8::2013/05/08-20:45:00.248 INFO  [RES] Network Name <SQL Network Name (CPCTestSQLClus)>: AccountAD: Waiting for ongoing slow strand to complete (if any)
    00000998.000010e8::2013/05/08-20:45:00.248 INFO  [RES] Network Name <SQL Network Name (CPCTestSQLClus)>: AccountAD: Signaling main strand to initialize module
    00000998.000010e8::2013/05/08-20:45:00.248 INFO  [RES] Network Name <SQL Network Name (CPCTestSQLClus)>: AccountAD: Initializing Name: CPCTestSQLClus, NetbiosName: CPCTESTSQLCLUS, Type: Singleton, Created: false
    00000998.000010e8::2013/05/08-20:45:00.248 INFO  [RES] Network Name: [NNLIB] GetCreatingDC - name CPCTestSQLClus, lookup flags = 1
    00000998.000010e8::2013/05/08-20:45:00.452 INFO  [RES] Network Name: [NNLIB] GetDCWithFlags - using DC
    \\MY01DC03.Domain.net, domain name Domain.net, IsReadOnly 0, Object exists 0
    00000998.000010e8::2013/05/08-20:45:00.452 INFO  [RES] Network Name:  [NN] Setting crypto access members for encrypt. New container = false.
    000005a4.00001350::2013/05/08-20:45:00.452 INFO  [GEM] Sending 1 messages as a batched GEM message
    00000998.000010e8::2013/05/08-20:45:00.452 INFO  [RES] Network Name: Agent: Sending request Netname/LastDcChange to NN:082d8ef5-62a8-4fee-acbc-e89b769e9181:Configuration
    00000998.0000075c::2013/05/08-20:45:00.452 INFO  [RES] Network Name <SQL Network Name (CPCTestSQLClus)>: Configuration: LastDc Changed, configOnly: 1
    000005a4.00001350::2013/05/08-20:45:00.452 INFO  [GEM] Sending 1 messages as a batched GEM message
    00000998.0000075c::2013/05/08-20:45:00.468 INFO  [RES] Network Name <SQL Network Name (CPCTestSQLClus)>: Configuration: Setting last DC in clusdb returned status 0
    00000998.0000075c::2013/05/08-20:45:00.468 INFO  [RES] Network Name:  [NN] got sync reply: 0
    00000998.000010e8::2013/05/08-20:45:00.468 INFO  [RES] Network Name <SQL Network Name (CPCTestSQLClus)>: AccountAD: LastDc Changed (configOnly true), result: 0
    00000998.000010e8::2013/05/08-20:45:00.468 INFO  [RES] Network Name: Agent: Sending request Netname/PasswordChange to NN:082d8ef5-62a8-4fee-acbc-e89b769e9181:Configuration
    00000998.0000075c::2013/05/08-20:45:00.468 INFO  [RES] Network Name <SQL Network Name (CPCTestSQLClus)>: Configuration: Password Changed, configOnly: 1
    000005a4.00001350::2013/05/08-20:45:00.468 INFO  [GEM] Sending 1 messages as a batched GEM message
    00000998.0000075c::2013/05/08-20:45:00.468 INFO  [RES] Network Name <SQL Network Name (CPCTestSQLClus)>: Configuration: Setting password in clusdb returned status 0
    00000998.0000075c::2013/05/08-20:45:00.468 INFO  [RES] Network Name:  [NN] got sync reply: 0
    00000998.000010e8::2013/05/08-20:45:00.468 INFO  [RES] Network Name <SQL Network Name (CPCTestSQLClus)>: AccountAD: PasswordChanged (configOnly true), result: 0
    00000998.000010e8::2013/05/08-20:45:00.468 INFO  [RES] Network Name:  [NN] Setting crypto access members for decrypt. New container = false.
    00000998.00000ab8::2013/05/08-20:45:00.636 INFO  [RES] Network Name <SQL Network Name (CPCTestSQLClus)>: Getting Read/Write private properties
    00000998.00000ab8::2013/05/08-20:45:00.647 INFO  [RES] Network Name <SQL Network Name (CPCTestSQLClus)>: Getting Read only private properties
    00000998.0000075c::2013/05/08-20:45:00.784 INFO  [RES] Network Name <SQL Network Name (CPCTestSQLClus)>: Getting Read/Write private properties
    00000998.00000ab8::2013/05/08-20:45:00.815 INFO  [RES] Network Name <SQL Network Name (CPCTestSQLClus)>: Getting Read only private properties
    00000998.00000ab8::2013/05/08-20:45:00.815 INFO  [RES] Network Name <SQL Network Name (CPCTestSQLClus)>: Getting Read/Write private properties
    00000998.00000ab8::2013/05/08-20:45:00.830 INFO  [RES] Network Name <SQL Network Name (CPCTestSQLClus)>: Getting Read only private properties
    00000998.00000ab8::2013/05/08-20:45:00.830 INFO  [RES] Network Name <SQL Network Name (CPCTestSQLClus)>: Getting Read/Write private properties
    00000998.00000ab8::2013/05/08-20:45:00.830 INFO  [RES] Network Name <SQL Network Name (CPCTestSQLClus)>: Getting Read only private properties
    00000998.000010e8::2013/05/08-20:45:00.924 INFO  [RES] Network Name <SQL Network Name (CPCTestSQLClus)>: AccountAD: OU name for VCO is OU=NewComputers,OU=WORKSTATIONS,DC=Domain,DC=net
    00000998.000010e8::2013/05/08-20:45:00.924 INFO  [RES] Network Name: Agent: Sending request Netname/GetToken to NN:c03fb105-9a50-4d00-8bee-afaf693f7efc:Identity
    00000998.00000ab8::2013/05/08-20:45:00.924 INFO  [RES] Network Name <Cluster Name>: Identity: Module is not yet initialized. Trying to obtain a new token.
    00000998.0000075c::2013/05/08-20:45:00.924 INFO  [RES] Network Name <Cluster Name>: Identity: Obtaining new token
    00000998.0000075c::2013/05/08-20:45:00.924 INFO  [RES] Network Name:  [NN] Setting crypto access members for decrypt. New container = false.
    00000998.0000075c::2013/05/08-20:45:00.924 INFO  [RES] Network Name: [NNLIB] Priming local KDC cache to
    \\MY01DC02.Domain.net for domain Domain.net
    00000998.0000075c::2013/05/08-20:45:00.924 INFO  [RES] Network Name: [NNLIB] PopulateKerbKDCLookupCache - DC flags 0
    00000998.0000075c::2013/05/08-20:45:00.940 INFO  [RES] Network Name: [NNLIB] LsaCallAuthenticationPackage success with a request of size 94, result size 0 (status: 0, subStatus: 0)
    00000998.0000075c::2013/05/08-20:45:00.940 INFO  [RES] Network Name: [NNLIB] Priming local KDC cache to
    \\MY01DC02.Domain.net for domain label Domain
    00000998.0000075c::2013/05/08-20:45:00.940 INFO  [RES] Network Name: [NNLIB] LsaCallAuthenticationPackage success with a request of size 86, result size 0 (status: 0, subStatus: 0)
    00000998.0000075c::2013/05/08-20:45:01.018 WARN  [RES] Network Name: [NNLIB] LogonUserEx fails for user CPCTestWinClus$: 1326 (useSecondaryPassword: 0)
    00000998.0000075c::2013/05/08-20:45:01.096 WARN  [RES] Network Name: [NNLIB] LogonUserEx fails for user CPCTestWinClus$: 1326 (useSecondaryPassword: 1)
    00000998.0000075c::2013/05/08-20:45:01.096 INFO  [RES] Network Name: [NNLIB] Logon failed for user CPCTestWinClus$ (Error 1326), DC
    \\MY01DC02.Domain.net, domain Domain.net
    00000998.0000075c::2013/05/08-20:45:01.096 INFO  [RES] Network Name <Cluster Name>: Identity: Obtaining Windows Token for Name: CPCTestWinClus, SamName: CPCTestWinClus$, Type: Singleton, Result: 1326, LastDC:
    \\MY01DC02.Domain.net
    00000998.0000075c::2013/05/08-20:45:01.096 INFO  [RES] Network Name <Cluster Name>: Identity: Slow Operation, FinishWithReply: 1326
    00000998.0000075c::2013/05/08-20:45:01.096 INFO  [RES] Network Name <Cluster Name>: Identity: InternalReplyHandler with event: 1326
    00000998.0000075c::2013/05/08-20:45:01.096 INFO  [RES] Network Name <Cluster Name>: Identity: End of Slow Operation, state: Error/Idle, prevWorkState: Idle
    00000998.00000ab8::2013/05/08-20:45:01.096 WARN  [RES] Network Name <Cluster Name>: Identity: Get Token Request, currently doesnt have a token!
    00000998.00000ab8::2013/05/08-20:45:01.096 INFO  [RES] Network Name:  [NN] got sync reply: 0
    00000998.000010e8::2013/05/08-20:45:01.096 INFO  [RES] Network Name <SQL Network Name (CPCTestSQLClus)>: AccountAD: End of Slow Operation, state: Initializing/Writing, prevWorkState: Writing
    00000998.000010e8::2013/05/08-20:45:01.096 WARN  [RES] Network Name <SQL Network Name (CPCTestSQLClus)>: AccountAD: Slow operation has exception ERROR_INVALID_HANDLE(6)' because of '::ImpersonateLoggedOnUser( GetToken() )'
    00000998.000010e8::2013/05/08-20:45:01.096 INFO  [RES] Network Name: Agent: OnInitializeReply, Failure on (082d8ef5-62a8-4fee-acbc-e89b769e9181,AccountAD): 6
    00000998.000010e8::2013/05/08-20:45:01.096 INFO  [RES] Network Name <SQL Network Name (CPCTestSQLClus)>: Configuration: InitializeReplyCreation of NetName (type Singleton), result: 6, IsCanceled: false
    000005a4.00000cd8::2013/05/08-20:45:01.096 INFO  [GEM] Sending 1 messages as a batched GEM message
    00000998.00000ab8::2013/05/08-20:45:01.096 INFO  [RES] Network Name <SQL Network Name (CPCTestSQLClus)>: Getting Read/Write private properties
    00000998.000010e8::2013/05/08-20:45:01.096 INFO  [RES] Network Name <SQL Network Name (CPCTestSQLClus)>: Configuration: Setting 'StatusKerberos' in clusdb returned status 0
    00000998.000010e8::2013/05/08-20:45:01.096 INFO  [RES] Network Name <SQL Network Name (CPCTestSQLClus)>: Configuration: Deleting ResourceData, CreatingDC, ObjectGUID for a newly created netname from cluster database
    000005a4.00000cd8::2013/05/08-20:45:01.096 INFO  [GEM] Sending 1 messages as a batched GEM message
    000005a4.00000cd8::2013/05/08-20:45:01.112 INFO  [GEM] Sending 1 messages as a batched GEM message
    00000998.00000ab8::2013/05/08-20:45:01.112 INFO  [RES] Network Name <SQL Network Name (CPCTestSQLClus)>: Getting Read only private properties
    00000998.000010e8::2013/05/08-20:45:01.112 INFO  [RES] Network Name: Agent: OnInitializeReply, Failure on (082d8ef5-62a8-4fee-acbc-e89b769e9181,Configuration): 6
    00000998.000010e8::2013/05/08-20:45:01.112 INFO  [RES] Network Name <SQL Network Name (CPCTestSQLClus)>: SyncReplyHandler Configuration, result: 6
    00000998.000012f0::2013/05/08-20:45:01.112 INFO  [RES] Network Name <SQL Network Name (CPCTestSQLClus)>: PerformOnline - Initialization of Configuration module finished with result: 6
    00000998.000012f0::2013/05/08-20:45:01.112 ERR   [RES] Network Name <SQL Network Name (CPCTestSQLClus)>: Online thread Failed: ERROR_SUCCESS(0)' because of 'Initializing netname configuration for SQL Network Name (CPCTestSQLClus) failed with
    error 6.'
    00000998.000012f0::2013/05/08-20:45:01.112 INFO  [RES] Network Name <SQL Network Name (CPCTestSQLClus)>: All resources offline. Cleaning up.
    00000998.000012f0::2013/05/08-20:45:01.112 ERR   [RHS] Online for resource SQL Network Name (CPCTestSQLClus) failed.
    000005a4.0000050c::2013/05/08-20:45:01.112 WARN  [RCM] HandleMonitorReply: ONLINERESOURCE for 'SQL Network Name (CPCTestSQLClus)', gen(6) result 5018/0.
    000005a4.0000050c::2013/05/08-20:45:01.112 INFO  [RCM] Res SQL Network Name (CPCTestSQLClus): OnlinePending -> ProcessingFailure( StateUnknown )
    000005a4.0000050c::2013/05/08-20:45:01.112 INFO  [RCM] TransitionToState(SQL Network Name (CPCTestSQLClus)) OnlinePending-->ProcessingFailure.
    000005a4.0000050c::2013/05/08-20:45:01.112 ERR   [RCM] rcm::RcmResource::HandleFailure: (SQL Network Name (CPCTestSQLClus))
    000005a4.0000050c::2013/05/08-20:45:01.112 INFO  [RCM] resource SQL Network Name (CPCTestSQLClus): failure count: 6, restartAction: 2 persistentState: 1.
    000005a4.00000cd8::2013/05/08-20:45:01.112 INFO  [GEM] Sending 1 messages as a batched GEM message
    000005a4.0000050c::2013/05/08-20:45:01.112 INFO  [RCM] Greater than restartPeriod time has elapsed since first failure of SQL Network Name (CPCTestSQLClus), resetting failureTime and failureCount.
    000005a4.0000050c::2013/05/08-20:45:01.112 INFO  [RCM] Will queue immediate restart (500 milliseconds) of SQL Network Name (CPCTestSQLClus) after terminate is complete.
    000005a4.0000050c::2013/05/08-20:45:01.112 INFO  [RCM] Res SQL Network Name (CPCTestSQLClus): ProcessingFailure -> WaitingToTerminate( DelayRestartingResource )
    000005a4.0000050c::2013/05/08-20:45:01.112 INFO  [RCM] TransitionToState(SQL Network Name (CPCTestSQLClus)) ProcessingFailure-->[WaitingToTerminate to DelayRestartingResource].
    000005a4.0000050c::2013/05/08-20:45:01.112 INFO  [RCM] Res SQL Network Name (CPCTestSQLClus): [WaitingToTerminate to DelayRestartingResource] -> Terminating( DelayRestartingResource )
    000005a4.0000050c::2013/05/08-20:45:01.112 INFO  [RCM] TransitionToState(SQL Network Name (CPCTestSQLClus)) [WaitingToTerminate to DelayRestartingResource]-->[Terminating to DelayRestartingResource].
    00000998.00000ab8::2013/05/08-20:45:01.112 INFO  [RES] Network Name <SQL Network Name (CPCTestSQLClus)>: Terminate called for resource SQL Network Name (CPCTestSQLClus)
    00000998.00000ab8::2013/05/08-20:45:01.112 INFO  [RES] Network Name <SQL Network Name (CPCTestSQLClus)>: Entering Offline thread
    00000998.00000ab8::2013/05/08-20:45:01.112 INFO  [RES] Network Name <SQL Network Name (CPCTestSQLClus)>: Performing actual offline of resource.
    00000998.00000ab8::2013/05/08-20:45:01.112 INFO  [RES] Network Name: Agent: Closing (082d8ef5-62a8-4fee-acbc-e89b769e9181,AdminShare)
    00000998.00000ab8::2013/05/08-20:45:01.112 INFO  [RES] Network Name: Agent: Sending request Netname/CloseIndirect to NN:Agent
    00000998.000010e8::2013/05/08-20:45:01.112 INFO  [RES] Network Name: Agent: OnClose (082d8ef5-62a8-4fee-acbc-e89b769e9181,AdminShare)
    00000998.000010e8::2013/05/08-20:45:01.112 INFO  [RES] Network Name: Agent: Sending request Netname/Close to NN:082d8ef5-62a8-4fee-acbc-e89b769e9181:AdminShare
    00000998.000010e8::2013/05/08-20:45:01.112 ERR   [RES] Network Name <SQL Network Name (CPCTestSQLClus)>: AdminShare: OnCloseBase, Error Already Closing, previous state: Closing/Ending
    00000998.000010e8::2013/05/08-20:45:01.112 INFO  [RES] Network Name: Agent: OnCloseReply (082d8ef5-62a8-4fee-acbc-e89b769e9181,AdminShare) result: 1904
    00000998.000010e8::2013/05/08-20:45:01.112 INFO  [RES] Network Name <SQL Network Name (CPCTestSQLClus)>: SyncReplyHandler Configuration, result: 1904
    00000998.00000ab8::2013/05/08-20:45:01.112 INFO  [RES] Network Name: Agent: Closing (082d8ef5-62a8-4fee-acbc-e89b769e9181,Configuration)
    00000998.00000ab8::2013/05/08-20:45:01.112 INFO  [RES] Network Name: Agent: Sending request Netname/CloseIndirect to NN:Agent
    000005a4.00000cd8::2013/05/08-20:45:01.112 INFO  [RCM-rbtr] giving default token to group SQL Server (MSSQLSERVER)
    000005a4.00000cd8::2013/05/08-20:45:01.112 INFO  [RCM-rbtr] giving default token to group SQL Server (MSSQLSERVER)
    000005a4.00000cd8::2013/05/08-20:45:01.112 INFO  [RCM-rbtr] giving default token to group SQL Server (MSSQLSERVER)
    000005a4.00000cd8::2013/05/08-20:45:01.112 INFO  [RCM-rbtr] giving default token to group SQL Server (MSSQLSERVER)
    00000998.0000075c::2013/05/08-20:45:01.112 INFO  [RES] Network Name: Agent: OnClose (082d8ef5-62a8-4fee-acbc-e89b769e9181,Configuration)
    00000998.0000075c::2013/05/08-20:45:01.112 INFO  [RES] Network Name: Agent: Sending request Netname/Close to NN:082d8ef5-62a8-4fee-acbc-e89b769e9181:Configuration
    00000998.0000075c::2013/05/08-20:45:01.112 INFO  [RES] Network Name <SQL Network Name (CPCTestSQLClus)>: Configuration: Canceling work, state: Closing/Idle
    00000998.0000075c::2013/05/08-20:45:01.112 INFO  [RES] Network Name <SQL Network Name (CPCTestSQLClus)>: Configuration: OnCloseBase, previous state: Initializing/Idle
    00000998.0000075c::2013/05/08-20:45:01.112 INFO  [RES] Network Name <SQL Network Name (CPCTestSQLClus)>: Configuration: Closing... (PreviousState: Initializing, Created: false, Type: Singleton)
    00000998.0000075c::2013/05/08-20:45:01.112 INFO  [RES] Network Name: Agent: Closing (082d8ef5-62a8-4fee-acbc-e89b769e9181,AccountAD)
    00000998.0000075c::2013/05/08-20:45:01.112 INFO  [RES] Network Name: Agent: Sending request Netname/CloseIndirect to NN:Agent
    00000998.000010e8::2013/05/08-20:45:01.112 INFO  [RES] Network Name: Agent: OnClose (082d8ef5-62a8-4fee-acbc-e89b769e9181,AccountAD)
    00000998.000010e8::2013/05/08-20:45:01.112 INFO  [RES] Network Name: Agent: Sending request Netname/Close to NN:082d8ef5-62a8-4fee-acbc-e89b769e9181:AccountAD
    00000998.000010e8::2013/05/08-20:45:01.112 INFO  [RES] Network Name <SQL Network Name (CPCTestSQLClus)>: AccountAD: Canceling work, state: Closing/Idle
    00000998.000010e8::2013/05/08-20:45:01.112 INFO  [RES] Network Name <SQL Network Name (CPCTestSQLClus)>: AccountAD: OnCloseBase, previous state: Initializing/Idle
    00000998.000010e8::2013/05/08-20:45:01.112 INFO  [RES] Network Name: Agent: OnCloseReply (082d8ef5-62a8-4fee-acbc-e89b769e9181,AccountAD) result: 0
    00000998.000010e8::2013/05/08-20:45:01.112 INFO  [RES] Network Name <SQL Network Name (CPCTestSQLClus)>: Configuration: Finish Closing NetName (type Singleton) Module AccountAD, result 0, remaining... 0 (0)
    00000998.000010e8::2013/05/08-20:45:01.112 INFO  [RES] Network Name: Agent: -- listing 3 instances ---------------------------------------------
    00000998.000010e8::2013/05/08-20:45:01.112 INFO  [RES] Network Name: Agent: --- 7 modules for instance: 082d8ef5-62a8-4fee-acbc-e89b769e9181:
    00000998.000010e8::2013/05/08-20:45:01.112 INFO  [RES] Network Name: Agent: ---- Module: Configuration with states: Offline/Ending (BeingBorn)
    00000998.000010e8::2013/05/08-20:45:01.112 INFO  [RES] Network Name: Agent: ---- Module: AccountAD with states: Closing/Ending (BeingBorn)
    00000998.000010e8::2013/05/08-20:45:01.112 INFO  [RES] Network Name: Agent: ---- Module: Client with states: Offline/Idle (BeingBorn)
    00000998.0000075c::2013/05/08-20:45:01.112 INFO  [RES] Network Name <SQL Network Name (CPCTestSQLClus)>: Configuration: Closed
    00000998.000010e8::2013/05/08-20:45:01.112 INFO  [RES] Network Name: Agent: ---- Module: Identity with states: Offline/Idle (BeingBorn)
    00000998.000010e8::2013/05/08-20:45:01.112 INFO  [RES] Network Name: Agent: ---- Module: Dns with states: Offline/Idle (BeingBorn)
    00000998.0000075c::2013/05/08-20:45:01.112 INFO  [RES] Network Name: Agent: OnCloseReply (082d8ef5-62a8-4fee-acbc-e89b769e9181,Configuration) result: 0
    00000998.000010e8::2013/05/08-20:45:01.112 INFO  [RES] Network Name: Agent: ---- Module: Netbios with states: Offline/Idle (BeingBorn)
    00000998.0000075c::2013/05/08-20:45:01.112 INFO  [RES] Network Name <SQL Network Name (CPCTestSQLClus)>: SyncReplyHandler Configuration, result: 0
    00000998.000010e8::2013/05/08-20:45:01.112 INFO  [RES] Network Name: Agent: ---- Module: AdminShare with states: Closing/Ending (BeingBorn)
    00000998.000010e8::2013/05/08-20:45:01.112 INFO  [RES] Network Name: Agent: --- 7 modules for instance: 43dec41b-661c-42a8-ae23-b635d7ab11f5:
    00000998.000010e8::2013/05/08-20:45:01.112 INFO  [RES] Network Name: Agent: ---- Module: Configuration with states: Offline/Ending (BeingBorn)
    00000998.000010e8::2013/05/08-20:45:01.112 INFO  [RES] Network Name: Agent: ---- Module: AccountAD with states: Closing/Ending (BeingBorn)
    00000998.000010e8::2013/05/08-20:45:01.112 INFO  [RES] Network Name: Agent: ---- Module: Client with states: Offline/Idle (BeingBorn)
    00000998.000010e8::2013/05/08-20:45:01.112 INFO  [RES] Network Name: Agent: ---- Module: Identity with states: Offline/Idle (BeingBorn)
    00000998.000010e8::2013/05/08-20:45:01.112 INFO  [RES] Network Name: Agent: ---- Module: Dns with states: Offline/Idle (BeingBorn)
    00000998.000010e8::2013/05/08-20:45:01.112 INFO  [RES] Network Name: Agent: ---- Module: Netbios with states: Offline/Idle (BeingBorn)
    00000998.000010e8::2013/05/08-20:45:01.112 INFO  [RES] Network Name: Agent: ---- Module: AdminShare with states: Closing/Ending (BeingBorn)
    00000998.000010e8::2013/05/08-20:45:01.112 INFO  [RES] Network Name: Agent: --- 7 modules for instance: c03fb105-9a50-4d00-8bee-afaf693f7efc:
    00000998.000010e8::2013/05/08-20:45:01.112 INFO  [RES] Network Name: Agent: ---- Module: Configuration with states: Initialized/Idle (Alive)
    00000998.000010e8::2013/05/08-20:45:01.112 INFO  [RES] Network Name: Agent: ---- Module: AccountAD with states: Initializing/Idle (BeingBorn)
    00000998.000010e8::2013/05/08-20:45:01.112 INFO  [RES] Network Name: Agent: ---- Module: Client with states: Initialized/Idle (Alive)
    00000998.000010e8::2013/05/08-20:45:01.112 INFO  [RES] Network Name: Agent: ---- Module: Identity with states: Error/Idle (BeingBorn)
    00000998.000010e8::2013/05/08-20:45:01.112 INFO  [RES] Network Name: Agent: ---- Module: Dns with states: Initialized/Idle (Alive)
    00000998.000010e8::2013/05/08-20:45:01.112 INFO  [RES] Network Name: Agent: ---- Module: Netbios with states: Initialized/Idle (Alive)
    00000998.000010e8::2013/05/08-20:45:01.112 INFO  [RES] Network Name: Agent: ---- Module: AdminShare with states: Initialized/Idle (BeingBorn)
    00000998.000010e8::2013/05/08-20:45:01.112 INFO  [RES] Network Name: Agent: -- 0 Zombie modules
    000005a4.0000050c::2013/05/08-20:45:01.112 INFO  [RCM] HandleMonitorReply: TERMINATERESOURCE for 'SQL Network Name (CPCTestSQLClus)', gen(7) result 0/0.
    000005a4.0000050c::2013/05/08-20:45:01.112 INFO  [RCM] Res SQL Network Name (CPCTestSQLClus): [Terminating to DelayRestartingResource] -> DelayRestartingResource( StateUnknown )
    000005a4.0000050c::2013/05/08-20:45:01.112 INFO  [RCM] TransitionToState(SQL Network Name (CPCTestSQLClus)) [Terminating to DelayRestartingResource]-->DelayRestartingResource.
    000005a4.0000050c::2013/05/08-20:45:01.112 WARN  [RCM] Queueing immediate delay restart of resource SQL Network Name (CPCTestSQLClus) in 500 ms.
    000005a4.00001248::2013/05/08-20:45:01.112 INFO  [RCM-rbtr] giving default token to group SQL Server (MSSQLSERVER)
    000005a4.00001248::2013/05/08-20:45:01.112 INFO  [RCM-rbtr] giving default token to group SQL Server (MSSQLSERVER)
    000005a4.00001248::2013/05/08-20:45:01.112 INFO  [RCM-rbtr] giving default token to group SQL Server (MSSQLSERVER)
    000005a4.00001248::2013/05/08-20:45:01.112 INFO  [RCM-rbtr] giving default token to group SQL Server (MSSQLSERVER)
    000005a4.00001350::2013/05/08-20:45:01.112 INFO  [GEM] Sending 1 messages as a batched GEM message
    00000998.00000b78::2013/05/08-20:45:01.112 INFO  [RES] Network Name <SQL Network Name (CPCTestSQLClus)>: Getting Read/Write private properties
    000005a4.00001350::2013/05/08-20:45:01.112 INFO  [GEM] Sending 1 messages as a batched GEM message
    00000998.00000b78::2013/05/08-20:45:01.112 INFO  [RES] Network Name <SQL Network Name (CPCTestSQLClus)>: Getting Read only private properties
    00000998.00000b78::2013/05/08-20:45:01.127 INFO  [RES] Network Name <SQL Network Name (CPCTestSQLClus)>: Getting Read/Write private properties
    000005a4.00001350::2013/05/08-20:45:01.127 INFO  [GEM] Sending 1 messages as a batched GEM message
    00000998.00000b78::2013/05/08-20:45:01.127 INFO  [RES] Network Name <SQL Network Name (CPCTestSQLClus)>: Getting Read only private properties
    000005a4.00001350::2013/05/08-20:45:01.127 INFO  [GEM] Sending 1 messages as a batched GEM message
    000005a4.00001350::2013/05/08-20:45:01.127 INFO  [GEM] Sending 1 messages as a batched GEM message
    000005a4.00001350::2013/05/08-20:45:01.143 INFO  [GEM] Sending 1 messages as a batched GEM message
    00000998.00000b78::2013/05/08-20:45:01.252 INFO  [RES] Network Name: Agent: Sending request Netname/RecheckConfig to NN:c03fb105-9a50-4d00-8bee-afaf693f7efc:Netbios
    00000998.00000ab8::2013/05/08-20:45:01.252 INFO  [RES] Network Name <Cluster Name>: Netbios: Slow Operation, FinishWithReply: 0
    00000998.00000ab8::2013/05/08-20:45:01.252 INFO  [RES] Network Name:  [NN] got sync reply: 0
    00000998.00000ab8::2013/05/08-20:45:01.252 INFO  [RES] Network Name <Cluster Name>: Netbios: End of Slow Operation, state: Initialized/Idle, prevWorkState: Idle

  • SQL Server 2012 DB Engine does not start (clean install with server 2012 and 2008 R2)

    I'm trying to do clean installation of SQL server 2012 on Server 2012 (which is runnning as a VM on ESX server) and getting this "wait on the DB engine recovery failed" message. Initially, I though this issue was related to some permission issues
    but changing the permission or service accounts didn't help. I'm not seeing any "denied" messages in the log files either. Even with Server 2008 R2 (clean built VM), the installation gives the exactly the same error messages. 
    My setup is purely for test purpose; so, the security is not a concern. Can someone help or give me a clue where to look? 
    (Summary)
    Overall summary:
      Final result:                  Failed: see details below
      Exit code (Decimal):           -2061893606
      Start time:                    2014-05-28 17:12:12
      End time:                      2014-05-28 17:19:47
      Requested action:              Install
    Setup completed with required actions for features.
    Troubleshooting information for those features:
      Next step for SQLEngine:       Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
    Machine Properties:
      Machine name:                  WIN-1V3VKPV5Q19
      Machine processor count:       1
      OS version:                    Future Windows Version
      OS service pack:               
      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
      Installation location:         E:\x64\setup\
      Installation edition:          Evaluation
      Slipstream:                    True
      SP Level                       1
      Patch Level:                   11.1.3128.0
    Product Update Status:
      Success: KB 2674319, KB 2793634
    Product Updates Selected for Installation:
      Title:                         Service Pack 1
      Knowledge Based Article:       KB 2674319
      Version:                       11.1.3000.0
      Architecture:                  x64
      Language:                      1033
      Title:                         SQL Server 2012 SP1 GDR Product Update
      Knowledge Based Article:       KB 2793634
      Version:                       11.1.3128.0
      Architecture:                  x64
      Language:                      All
      Update Source:                 MU
    User Input Settings:
      ACTION:                        Install
      ADDCURRENTUSERASSQLADMIN:      false
      AGTSVCACCOUNT:                 NT Service\SQLAgent$TESTDB
      AGTSVCPASSWORD:                *****
      AGTSVCSTARTUPTYPE:             Manual
      ASBACKUPDIR:                   Backup
      ASCOLLATION:                   Latin1_General_CI_AS
      ASCONFIGDIR:                   Config
      ASDATADIR:                     Data
      ASLOGDIR:                      Log
      ASPROVIDERMSOLAP:              1
      ASSERVERMODE:                  MULTIDIMENSIONAL
      ASSVCACCOUNT:                  <empty>
      ASSVCPASSWORD:                 <empty>
      ASSVCSTARTUPTYPE:              Automatic
      ASSYSADMINACCOUNTS:            <empty>
      ASTEMPDIR:                     Temp
      BROWSERSVCSTARTUPTYPE:         Automatic
      CLTCTLRNAME:                   <empty>
      CLTRESULTDIR:                  <empty>
      CLTSTARTUPTYPE:                0
      CLTSVCACCOUNT:                 <empty>
      CLTSVCPASSWORD:                <empty>
      CLTWORKINGDIR:                 <empty>
      COMMFABRICENCRYPTION:          0
      COMMFABRICNETWORKLEVEL:        0
      COMMFABRICPORT:                0
      CONFIGURATIONFILE:             C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\Log\20140528_170909\ConfigurationFile.ini
      CTLRSTARTUPTYPE:               0
      CTLRSVCACCOUNT:                <empty>
      CTLRSVCPASSWORD:               <empty>
      CTLRUSERS:                     <empty>
      ENABLERANU:                    false
      ENU:                           true
      ERRORREPORTING:                false
      FEATURES:                      SQLENGINE
      FILESTREAMLEVEL:               0
      FILESTREAMSHARENAME:           <empty>
      FTSVCACCOUNT:                  <empty>
      FTSVCPASSWORD:                 <empty>
      HELP:                          false
      IACCEPTSQLSERVERLICENSETERMS:  true
      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:                    TESTDB
      INSTANCENAME:                  TESTDB
      ISSVCACCOUNT:                  NT AUTHORITY\Network Service
      ISSVCPASSWORD:                 <empty>
      ISSVCSTARTUPTYPE:              Automatic
      MATRIXCMBRICKCOMMPORT:         0
      MATRIXCMSERVERNAME:            <empty>
      MATRIXNAME:                    <empty>
      NPENABLED:                     0
      PID:                           *****
      QUIET:                         false
      QUIETSIMPLE:                   false
      ROLE:                          <empty>
      RSINSTALLMODE:                 DefaultNativeMode
      RSSHPINSTALLMODE:              DefaultSharePointMode
      RSSVCACCOUNT:                  <empty>
      RSSVCPASSWORD:                 <empty>
      RSSVCSTARTUPTYPE:              Automatic
      SAPWD:                         *****
      SECURITYMODE:                  SQL
      SQLBACKUPDIR:                  <empty>
      SQLCOLLATION:                  SQL_Latin1_General_CP1_CI_AS
      SQLSVCACCOUNT:                 NT Service\MSSQL$TESTDB
      SQLSVCPASSWORD:                <empty>
      SQLSVCSTARTUPTYPE:             Automatic
      SQLSYSADMINACCOUNTS:           WIN-1V3VKPV5Q19\Administrator
      SQLTEMPDBDIR:                  <empty>
      SQLTEMPDBLOGDIR:               <empty>
      SQLUSERDBDIR:                  <empty>
      SQLUSERDBLOGDIR:               <empty>
      SQMREPORTING:                  false
      TCPENABLED:                    1
      UIMODE:                        Normal
      UpdateEnabled:                 true
      UpdateSource:                  MU
      X86:                           false
      Configuration file:            C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\Log\20140528_170909\ConfigurationFile.ini
    Detailed results:
      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:                       SQL Browser
      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\20140528_170909\SystemConfigurationCheck_Report.htm
    (Error Log)
    2014-05-28 17:17:26.64 spid8s      0 transactions rolled back in database 'msdb' (4:0). This is an informational message only. No user action is required.
    2014-05-28 17:17:26.73 spid9s      Starting up database 'model'.
    2014-05-28 17:17:28.24 spid9s      Error: 9004, Severity: 23, State: 6.
    2014-05-28 17:17:28.24 spid9s      An error occurred while processing the log for database 'model'.  If possible, restore from backup. If a backup is not available, it might be necessary to rebuild the log.
    2014-05-28 17:17:28.24 spid9s      SQL Trace was stopped due to server shutdown. Trace ID = '1'. This is an informational message only; no user action is required.
    (Details)
    (01) 2014-05-28 17:17:28 Slp: Exception type: Microsoft.SqlServer.Configuration.SqlEngine.SqlEngineConfigException
    (01) 2014-05-28 17:17:28 Slp:     Message: 
    (01) 2014-05-28 17:17:28 Slp:         Wait on the Database Engine recovery handle failed. Check the SQL Server error log for potential causes.
    (01) 2014-05-28 17:17:28 Slp:     HResult : 0x851a001a
    (01) 2014-05-28 17:17:28 Slp:         FacilityCode : 1306 (51a)
    (01) 2014-05-28 17:17:28 Slp:         ErrorCode : 26 (001a)
    (01) 2014-05-28 17:17:28 Slp:     Data: 
    (01) 2014-05-28 17:17:28 Slp:       SQL.Setup.FailureCategory = ConfigurationFailure
    (01) 2014-05-28 17:17:28 Slp:       WatsonConfigActionData = INSTALL@CONFIGRC@SQL_ENGINE_CORE_INST
    (01) 2014-05-28 17:17:28 Slp:       WatsonExceptionFeatureIdsActionData = System.String[]
    (01) 2014-05-28 17:17:28 Slp:     Stack: 
    (01) 2014-05-28 17:17:28 Slp:         at Microsoft.SqlServer.Configuration.SqlEngine.SqlServerServiceBase.WaitSqlServerStart(Process processSql)
    (01) 2014-05-28 17:17:28 Slp:         at Microsoft.SqlServer.Configuration.SqlEngine.SqlServerServiceSCM.StartSqlServer(String[] parameters)
    (01) 2014-05-28 17:17:28 Slp:         at Microsoft.SqlServer.Configuration.SqlEngine.SqlEngineDBStartConfig.ConfigSQLServerSystemDatabases(EffectiveProperties properties, Boolean isConfiguringTemplateDBs, Boolean useInstallInputs)
    (01) 2014-05-28 17:17:28 Slp:         at Microsoft.SqlServer.Configuration.SqlEngine.SqlEngineDBStartConfig.DoCommonDBStartConfig(ConfigActionTiming timing)
    (01) 2014-05-28 17:17:28 Slp:         at Microsoft.SqlServer.Configuration.SqlConfigBase.SlpConfigAction.ExecuteAction(String actionId)
    (01) 2014-05-28 17:17:28 Slp:         at Microsoft.SqlServer.Configuration.SqlConfigBase.SlpConfigAction.Execute(String actionId, TextWriter errorStream)
    (01) 2014-05-28 17:17:28 Slp: Watson Bucket 1 
     Original Parameter Values 
    (01) 2014-05-28 17:17:28 Slp: Parameter 0 : SQL Server 2012@RTM@ 
    (01) 2014-05-28 17:17:28 Slp: Parameter 1 : Microsoft.SqlServer.Configuration.SqlEngine.SqlServerServiceBase.WaitSqlServerStart 
    (01) 2014-05-28 17:17:28 Slp: Parameter 2 : Microsoft.SqlServer.Configuration.SqlEngine.SqlServerServiceBase.WaitSqlServerStart 
    (01) 2014-05-28 17:17:28 Slp: Parameter 3 : Microsoft.SqlServer.Configuration.SqlEngine.SqlEngineConfigException@1306@26 
    (01) 2014-05-28 17:17:28 Slp: Parameter 4 : Microsoft.SqlServer.Configuration.SqlEngine.SqlEngineConfigException@1306@26 
    (01) 2014-05-28 17:17:28 Slp: Parameter 5 : SqlEngineDBStartConfigAction_install_configrc 
    (01) 2014-05-28 17:17:28 Slp: Parameter 6 : INSTALL@CONFIGRC@SQL_ENGINE_CORE_INST 
    (01) 2014-05-28 17:17:28 Slp: 
     Final Parameter Values 
    (01) 2014-05-28 17:17:28 Slp: Parameter 0 : SQL Server 2012@RTM@ 
    (01) 2014-05-28 17:17:28 Slp: Parameter 1 : 0xD15B4EB2 
    (01) 2014-05-28 17:17:28 Slp: Parameter 2 : 0xD15B4EB2 
    (01) 2014-05-28 17:17:28 Slp: Parameter 3 : 0x4BDAF9BA@1306@26 
    (01) 2014-05-28 17:17:28 Slp: Parameter 4 : 0x4BDAF9BA@1306@26 
    (01) 2014-05-28 17:17:28 Slp: Parameter 5 : SqlEngineDBStartConfigAction_install_configrc 
    (01) 2014-05-28 17:17:28 Slp: Parameter 6 : 0x9C5770A6 

    Hi Nababoya:
    As you are telling this is a test installation process...
    In the logs i m seeing the error message "An error occurred while processing the log for database 'model'.  If possible, restore from backup. If a backup is not available, it might be necessary to rebuild the log.".
    1) If the SQL Services was installed successfully and SQL Service was not able to start because of model database issue...
        1.1) If you have model database SQL back file, start the SQL Server in single user mode with minimum configuration and try to restore MODEL database
    http://blogs.msdn.com/b/sqlserverfaq/archive/2011/05/11/inf-hey-my-sql-server-service-is-not-starting-what-do-i-do.aspx
        1.2) If you don't have backups., try to rebuild the system databases but make sure that you are not losing any data critical data on master and SQL Jobs on MSDB
    http://msdn.microsoft.com/en-us/library/dd207003%28v=sql.110%29.aspx#RebuildProcedure
    2) As if this is a new installation try to repair the instance with the help of setup media file
    3) If the repair option fails., the last option wipe out the complete SQL Server components from Services.msc and Registries and start new installation.
    4) Make sure when you are doing un-installation all the required SQL Server components on services.msc should be in stop state.
    Hope this helps and let me know any questions...
    Thanks,
    Thanks, Satish Kumar. Please mark as this post as answered if my anser helps you to resolves your issue :)

  • SQL Server 2012 Express bulk Insert flat file 1million rows with "" as delimeter

    Hi,
    I wanted to see if anyone can help me out. I am on SQL server 2012 express. I cannot use OPENROWSET because my system is x64 and my Microsoft office suit is x32 (Microsoft.Jet.OLEDB.4.0).
    So I used Import wizard and is not working either. 
    The only thing that let me import this large file, is:
    CREATE TABLE #LOADLARGEFLATFILE
    Column1
    varchar(100), Column2 varchar(100), Column3 varchar(100),
    Column4 nvarchar(max)
    BULK INSERT
    #LOADLARGEFLATFILE
    FROM 'C:\FolderBigFile\LARGEFLATFILE.txt'
    WITH 
    FIRSTROW = 2,
    FIELDTERMINATOR ='\t',
    ROWTERMINATOR ='\n'
    The problem with CREATE TABLE and BULK INSERT is that my flat file comes with text qualifiers - "". Is there a way to prevent the quotes "" from loading in the bulk insert? Below is the data. 
    Column1
    Column2
    Column3
    Column4
    "Socket Adapter"
    8456AB
    $4.25
    "Item - Square Drive Socket Adapter | For "
    "Butt Splice" 
    9586CB
    $14.51
    "Item - Butt Splice"
    "Bleach"
    6589TE
    $27.30
    "Item - Bleach | Size - 96 oz. | Container Type"
    Ed,
    Edwin Lopera

    Hi lgnusLumen,
    According to your description, you use BULK INSERT to import data from a data file to the SQL table. However, to be usable as a data file for bulk import, a CSV file must comply with the following restrictions:
    1. Data fields never contain the field terminator.
    2. Either none or all of the values in a data field are enclosed in quotation marks ("").
    In your data file, the quotes aren't consistent, if you want to prevent the quotes "" from loading in the bulk insert, I recommend you use SQL Server Import and Export Wizard tools in SQL Server Express version. area, it will allow to strip the
    double quote from columns, you can review the following screenshot.
    In other SQL Server version, we can use SQL Server Integration Services (SSIS) to import data from a flat file (.csv) with removing the double quotes. For more information, you can review the following article.
    http://www.mssqltips.com/sqlservertip/1316/strip-double-quotes-from-an-import-file-in-integration-services-ssis/
    In addition, you can create a function to convert a CSV to a usable format for Bulk Insert. It will replace all field-delimiting commas with a new delimiter. You can then use the new field delimiter instead of a comma. For more information, see:
    http://stackoverflow.com/questions/782353/sql-server-bulk-insert-of-csv-file-with-inconsistent-quotes
    Regards,
    Sofiya Li
    Sofiya Li
    TechNet Community Support

  • SQL Server 2012 not auto-shrinking logfile

    We recently deployed SQL Server 2012 Standard on a Server 2008 R2 SP1 machine and, for the most part, everything behaves the same as SQL 2008 R2 (no surprise there). However, one issue I've been experiencing is that the transaction logs will not automatically
    shrink like they do in SQL 2008 R2. The database recovery model is set to full, and we have full backups running weekly and transaction log backups running every 12 hours. The transaction log backups work fine, but the files themselves never shrink. Autoshrink
    is set to true. If I manually run a shrink operation on the transaction log files, it works like a charm - it just shrank the 29GB file down to 3GB. Why does the transaction log not automatically shrink anymore?
    Microsoft SQL Server 2012 - 11.0.2100.60 (X64)  
    Windows Server 2008 R2 SP1 (Build 7601: Service Pack 1)

    Hallo Daniel,
    I understand the reason for the action of shrink now but I'm not agreeing to your arguments :)
    But that is an issue what you may decide...
    I meant RTO (recovery time objectives) because with your backup strategy you have to restore at least 10 log backups if the database will crash.
    RPO may fail with the log backup period of 12 hrs in between, too!
    (But all measures are part of a SLA we don't know - so maybe your business may tolerate such values)
    e.g. Full Backup is on Sunday night 10:00 pm
    The database crashes at Friday afternoon 5:00 pm
    You have to restore the last full backup and 9 transaction log backups (2 each day from Mo - Thursday + 1 from Friday)
    All data from 12:00 am to point of crash are lost!
    If you would have a full backup and a daily diff backup you would decrease the numbers of restoring actions to 3 instead of 10
    Restore of the full backup from Sunday
    Restore of the diff backup from Friday
    Restore of the log backup from Friday noon
    Sorry for my OT because this has not really to do with your problems but I would take theses objectives into consideration.
    We don't activate "auto shrink" for ANY productive database because we can not foresee what processes will run on the databases at any time - this is a decision the business has to make.
    Uwe Ricken
    MCITP Database Administrator 2005
    MCITP Database Administrator 2008
    MCITP Microsoft SQL Server 2008, Database Development
    db Berater GmbH
    http://www-db-berater.de

  • Problem inserting date into MS SQL Server

    I am trying insert date into MS SQL Server database. First I used Statement and when I insert the date only date used to be inserted properly and the time used to be always 12:00:00 AM. I tried PreparedStatement and when I insert I get an error message:
    SQL Error: [Microsoft][ODBC SQL Server Driver]Optional feature not implemented
    I have attached the code.
    GregorianCalendar cal = new GregorianCalendar();
    java.util.Date dtm = (java.util.Date)cal.getTime();
    SimpleDateFormat formatOb = new SimpleDateFormat("dd/MM/yy hh:mm:ss");
    String date= (String)formatOb.format(dtm);
    dateCreated = new java.sql.Date(formatOb.parse(date).getTime());
    PreparedStatement psmt = con.prepareStatement("INSERT INTO Resume (ResumeName, Summary, Skills, OtherInformation, Interests, Memberships, Languages, Category, DateCreated, SupervisorName) VALUES(?,?,?,?,?,?,?,?,?,?)");
    psmt.setString(1, name);
    psmt.setString(2, summary);
    psmt.setString(3, skills);
    psmt.setString(4, info);
    psmt.setString(5, interest);
    psmt.setString(6, member);
    psmt.setString(7, language);
    psmt.setString(8, category);
    psmt.setDate(9, dateCreated);
    psmt.setString(10, loginName);
    psmt.executeUpdate();
    Any suggestions will be really helpful.

    Thanks,
    I changed the field in the database of DateCreated to timestamp, but when I insert the some binary data is inserted into the database. something like 0000000000000017D.
    I installed jtds-0.8.1 driver from source forge. but when try to connect to the database I get an error as:
    Connection refused: connect
    Error: Connection refused: connect
    I have attached the code for setting the driver and url also.
    private String driver = "net.sourceforge.jtds.jdbc.Driver";
    private String url = "jdbc:jtds:sqlserver://TEKKATTE:1433/placement;TDS=7.0";

  • After Installing SQL Server 2012 Service Pack the RDL reports do not work

    I installed SQL Server 2012 Service Pack on backEnd sharepoint and also on BI Server that host Reporting Service.(Before installation everything was working properly)
    After this installation the RDL reports do not open and I receive this error message.
    The permissions granted to user 'domain\username' are insufficient for performing this operation. (rsAccessDenied)
    I also receive the same error message on changing DataSource, Parameters and subscription.
    I should mention that, I am using Reporting Services in the Integration Mode. I want to open and modify RDL reports from SharePoint and inside the SharePoint Document Library.

    Hi Hedayat,
    Thanks for posting your issue,
    To solve this problem you have to grant your SQL Reporting Service Application Pool
    Account (whatever is running your SQL Service Application, see Central Admin -> Manage Service Application -> SQL Server Reporting Services)
    Full Control to the web application that report is being deployed to in your particular case.
    Or you could just use the powershell command below:
    $webApp = Get-SPWebApplication –Identity http://yoursharepointapp 
    $webApp.GrantAccessToProcessIdentity(“domain\SSRSAccount”) 
    Also, check out below mentioned URLs for more details and fixes of this issue
    http://paulliebrand.com/2013/09/25/ssrs-and-permissions-granted-to-user-are-insufficient-for-performing-this-operation/
    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/4ea477ec-ea12-4a3e-bc33-2fcf9d52b84e/error-rsaccessdenied-nt-authoritynetwork-service-are-insufficient?forum=sqlreportingservices
    I hope this is helpful to you, mark it as Helpful.
    If this works, Please mark it as Answered.
    Regards,
    Dharmendra Singh (MCPD-EA | MCTS)
    Blog : http://sharepoint-community.net/profile/DharmendraSingh

  • DSC, SQL Server 2012 Enterprise sp2 x64, SQL Server Failover Cluster Install not succeeding

    Summary: DSC fails to fully install the SQL Server 2012 Failover Cluster, but the identical code snippet below run in powershell ise with administrator credentials works perfectly as does running the SQL server install interface.
    In order to develop DSC configurations, I have set up a Windows Server 2012 R2 failover cluster in VMware Workstation v10 consisting of 3 nodes.  All have the same Windows Server 2012 version and have been fully patched via Microsoft Updates. 
    The cluster properly fails over on command and the cluster validates.  Powershell 4.0 is being used as installed in windows.
    PDC
    Node1
    Node2
    The DSC script builds up the parameters to setup.exe for SQL Server.  Here is the cmd that gets built...
    $cmd2 = "C:\SOFTWARE\SQL\Setup.exe /Q /ACTION=InstallFailoverCluster /INSTANCENAME=MSSQLSERVER /INSTANCEID=MSSQLSERVER /IACCEPTSQLSERVERLICENSETERMS /UpdateEnabled=false /IndicateProgress=false /FEATURES=SQLEngine,FullText,SSMS,ADV_SSMS,BIDS,IS,BC,CONN,BOL /SECURITYMODE=SQL /SAPWD=password#1 /SQLSVCACCOUNT=SAASLAB1\sql_services /SQLSVCPASSWORD=password#1 /SQLSYSADMINACCOUNTS=`"SAASLAB1\sql_admin`" `"SAASLAB1\sql_services`" `"SAASLAB1\cubara01`" /AGTSVCACCOUNT=SAASLAB1\sql_services /AGTSVCPASSWORD=password#1 /ISSVCACCOUNT=SAASLAB1\sql_services /ISSVCPASSWORD=password#1 /ISSVCSTARTUPTYPE=Automatic /FAILOVERCLUSTERDISKS=MountRoot /FAILOVERCLUSTERGROUP='SQL Server (MSSQLSERVER)' /FAILOVERCLUSTERNETWORKNAME=SQLClusterLab1 /FAILOVERCLUSTERIPADDRESSES=`"IPv4;192.168.100.15;LAN;255.255.255.0`" /INSTALLSQLDATADIR=M:\SAN\SQLData\MSSQLSERVER /SQLUSERDBDIR=M:\SAN\SQLData\MSSQLSERVER /SQLUSERDBLOGDIR=M:\SAN\SQLLogs\MSSQLSERVER /SQLTEMPDBDIR=M:\SAN\SQLTempDB\MSSQLSERVER /SQLTEMPDBLOGDIR=M:\SAN\SQLTempDB\MSSQLSERVER /SQLBACKUPDIR=M:\SAN\Backups\MSSQLSERVER > C:\Logs\sqlInstall-log.txt "
    Invoke-Expression $cmd2
    When I run this specific command in Powershell ISE running as administrator, logged in as domain account that is in the Node1's administrators group and has domain administrative authority, it works perfectly fine and sets up the initial node properly.
    When I use the EXACT SAME code above pasted into my custom DSC resource, as a test with a known successful install, run with the same user as above, it does NOT completely install the cluster properly.  It still installs 17 applications
    related to SQL Server and seems to properly configure everything except the cluster.  The Failover Cluster Manager shows that the SQL Server Role will not come on line and the SQL Server Agent Role is not created. 
    The code is run on Node1 so the setup folder is local to Node1.
    The ConfigurationFile.ini files for the two types of installs are identical.
    Summary.txt does have issues..
    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:          0x86D8003A
      Error description:             The cluster resource 'SQL Server' could not be brought online.  Error: There was a failure to call cluster code from a provider. Exception message: Generic
    failure . Status code: 5023. Description: The group or resource is not in the correct state to perform the requested operation.  .
    It feels like this is a security issue with DSC or an issue with the setup in SQL Server, but please note I have granted administrators group and domain administrators authority.  The nodes were built with the same login.  Windows firewall
    is completely disabled.
    Please let me know if any more detail is required.

    Hi Lydia,
    Thanks for your interest and help.
    I tried "Option 3 (recommended)" and that did not help.
    The issue I encounter with the fail-over cluster only occurs when trying to install with DSC!
    Using the SQL Server Install wizard, Command Prompt and even in Powershell by invoking the setup.exe all work perfectly.
    So, to reiterate, this issue only occurs while running in the context of DSC.
    I am using the same domain login with Domain Admin Security and locally the account has Administrators group credentials.  The SQL Server Service account also has Administrators Group Credentials.

  • Is it possible to Deploy a SSIS package to catalog with a Sql Server Identity in SQL Server 2012 programmly ?

    Hi,
    how can I deploy a SSIS package with a SQL SERVER identity to the catalog in SQL Server 2012 programmly?
    I tried to use the [SSISDB].[catalog].[deploy_project], but the error said that it could only be used with a WINDOWS identity.
    This question has worried me for days.
    Is there any way to make the catalog.deploy_project available for a SQL SERVER identity ?
    Or just an new solution instead of using the catalog.deploy_project?
    best wishes from Qingyuan Lee.

    Sorry, my description may be confusable.
    I use EXECUTE AS , not EXECUTE WITH, to solve the problem.
    In fact,  I don't care about the authority.
    I want to execute the stored procedure using a SQL SERVER Authentication Account , since my codes run on a linux OS and it is hard to connect to SSIS using a Windows Authentication Account.
    so, using EXECUTE AS to change the execution context is accaptable.
    The requirement for a Windows Authentication Account makes sense.
    I consider that the SSIS executes outside the context of SQL Server and as part of an OS process, which means that a Windows account is necessary in order to deploy a package.
    Thanks very much for your help.

Maybe you are looking for

  • Issue in Inter Company postings

    Hi All,            Currently I face an issue with inter-company posting transaction. Let me explain the issue. Using ‘FB01’ we can create inter-company postings by giving G/l and New Company code fields in the first screen. Let us say there are two c

  • Can programs be installed on an external hard drive with my mac pro?

    Can programs be installed on an external hard drive.  I am running low on space.  Final Cut Pro X spins off the rendering files which takes a large chunk of space.  Like to at least have those rendered files on an external drive, but can find that op

  • WL 6.0 using MS SQL Server 2000 - Transaction timeout when invoking stored procedure

    Hi, Facing a problem on WL6.0. We are connecting to MS SQL server 2000 using a stateless session bean using container managed transaction. The bean method does a few updates to the database and also calls a stored procedure that generates primary key

  • Sw trunk alloved vlan - best practises

    Hi all together! There is large network with about 40 L2 (access) and 5 L3(vlan termination) switches. What is, with your point of view, the right method of using alloved vlan feature - should I use it on one side of links, mostly in hub points of ne

  • Does anyone have LABVIEW 6.1 Installation CDs?

    Does anyone have LABVIEW v6.1 installation CDs?