SQLCLR "Create Assembly" validation in SQL 2012 vs 2008

Greetings, all.
Could someone describe how the assembly validation steps in SQL 2012 have changed relative to SQL 2008R2?
My understanding thus far is that the .NET 4.0 SQLCLR runtime requirement now precludes the use of mixed-mode assemblies. If a CREATE ASSEMBLY validation failure result includes messages such as the detection of unmanaged pointers, is that indicative of
the cut-and-dried, no-way-around-it discovery of a mixed-mode assembly that can
never be registered in SQL 2012?
I have a third-party assembly which registers and operates normally in SQL 2008R2, but when I try to create the assembly in our SQL 2012 test environment, it fails validation, with mostly "Unexpected type on stack" or "Unmanaged pointer found"
errors. I'm suspecting these errors are why the assembly won't register even though CORFLAGS indicates it is a "Pure IL" assembly (and I realize CORFLAGS can be faked).
Are there any options available? The assembly in question is Oracle.DataAccess.dll, and is part of an assembly that (as one might imagine) collects certain data from Oracle in a SQLCLR method as part of one of our business reporting requirements.
It appears at the moment I may be forced to modify the tool to use the now-deprecated Microsoft Oracle data client, which I am loathe to do for it having been deprecated and much slower than the Oracle-provided version.
If there is no workaround, I would respectfully suggest that the "upgrade advisor" team include this kind of review when inspecting existing databases containing .NET assemblies. If we ultimately cannot register this particular third-party assembly
(which has been part of a working component for several years), it will be a *huge* detriment to our database migration - a far cry from the minor warning about certain geography types provided by the upgrade advisor. It would represent a significant breaking
change for our environment.
Thanks for any information that could be provided.

Thanks for your reply. 
Yes, you are correct in that SQL Server wants to use only "Pure IL" assemblies rather than mixed-mode assemblies. However, when an attempt is made to register an assembly in the SQLCLR that is "mixed mode" (not pure IL), the Verifier respoinds with "Unverifiable
PE/Native code stub." This is not the error I am receiving with the assembly in question. 
SQL2012 and SQL2008R2 do not support the same version of the .NET runtime in the SQLCLR subsystem. The former supports 4.0, while the latter supports 2.0 through 3.5. So it is not possible to create a test case with precisely the conditions you specify -
that is, using the same version of .NET in SQL2012 and SQL2008R2 - unless there is some undocumented startup switch or configuration file modification that can be made of which I am not aware.
The failure mode I am seeing is specifically tied to the reference of unmanaged
code references, eg unmanaged pointers. The 2.x assembly registered an working in SQL2008R2 (and its predecessors) contains multiple references to functions with unmanaged pointers, yet registers and works properly when the assembly is CREATED with PERMISSION_SET
= UNSAFE. I expect the same behavior in SQL 2012 - an assembly with references to things like unmanaged pointers should still verify when PERMISSION_SET = UNSAFE is specified.
This is why I am questioning whether the semantics of PERMISSION_SET = UNSAFE in conjunction with the CREATE ASSEMBLY statement have changed between SQL2008 and SQL2012. To me, it appears that SQL2008R2 and its predecessors verified assemblies via the internal
equivalent of a PEVERIFY /MD when PERMISSION_SET = UNSAFE is used, and PEVERIFY /IL when it is not. In SQL2012, it appears that the equivalent of PEVERIFY /IL is done
regardless of the presence of PERMISSION_SET = UNSAFE. This, to my understanding, is contrary to the whole point of PERMISSION_SET = UNSAFE. 
PEVERIFY /IL on the previous version of the assembly generates precisely the same kinds of errors generated by the CLR Verifier in SQL2008
without PERMISSION_SET = UNSAFE. When the latter is specified, the assembly registers and works normally. I contend that the CLR Verifier in SQL2012 is ignoring the PERMISSION_SET = UNSAFE qualifier, and hence my search for more information
about how the semantics of this command may have changed specifically for SQL2012.
IF there is an unsupported/undocumented method of allowing the SQLCLR to support both .NET 4.0 and .NET 2.0, I would be very interested in exploring how to leverage it. 
Thank you for your interest.

Similar Messages

  • Create Assembly fails in SQL Server 2012 SP1 if an assembly is built with Platform Target as AnyCPU

    Environment:
    Windows 2008 R2.
    SQL Server 2012 SP1 64 bit.
    I have a .NET assembly built using .NET Framework 4.0 with Platform Target set to AnyCPU and Unsafe options. The assembly has dependency on few other assemblies and has unmanaged code also. When I run CREATE ASSEMBLY for this assembly I get the following
    error message.
    Assembly '<assembly name>' could
    not be installed because existing policy would keep it
    from being used.
    However if I change the compile option to x64 instead of AnyCPU, I can successfully create the assembly. So my question : Does SQL Server 2012 64 bit requires assemblies that have Unmanaged code or makes calls to native libraries need to be built using x64
    bit option? AnyCPU should not be used?
    Thanks in Advance

    Hello,
    The default setting of a Visual Studio project is "Any CPU".SO on a 64 bit system this means the program will automatically run as a 64 bit application and on a 32 bit system it will automatically run as a 32 bit application. But if you have a dependency
    assembly which is either x86 or x64, technically your project is therefore not "Any CPU" compatible. 
    According to BOL: If the the assembly is 100% type safe which there is no dependencies on native code or COM objects and that there is no 'unsafe' code, it is possible to take the .NET executable
    that you run on your 32-bit machine and move it to the 64-bit system and have it run successfully.
    In your case, the issue may caused by the unsafe code and you should spcify the platform target to X64 to make is run on the 64 bit system.
    Reference:http://www.hanselman.com/blog/BackToBasics32bitAnd64bitConfusionAroundX86AndX64AndTheNETFrameworkAndCLR.aspx
    Regards,
    Fanny Liu
    If you have any feedback on our support, please click here. 
    Fanny Liu
    TechNet Community Support

  • Create a validation for SQL Query (updateable report)

    Hello
    I have a need for creating a validation on a SQL Query (updateable report)- type region
    1)
    When a row get populated i don't want same values to be populated in the second row.(as shown in first 2 rows)
    Also, I don't want to have a value that falls in range in between 100 and 1000 for the period falls in the previous. (as shown in third row)
    i.e
    Type_id
    Lower_Limit        Upper_Limit           Date_From       Date _To
    1
    100                      1000                   1/1/2013        12/31/2013
    2
    100                      1000                    1/1/2013        12/31/2013
    3
    101                       500                    2/1/2013        10/31/2013
    appreciate any help
    thanks
    kp

    This example could help:
    http://apex.oracle.com/pls/otn/f?p=31517:214
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • Entity Framework doesn't create the database in SQL Server Management 2012, instead it just creates in (localdb)\v11.0 How to fix it?

    Hi, I'm Begginer in Entity Framework. Then I'm having some problems.
    I created my entities and I give Save Changes. (Ok)
    Then, I Tried to Connect with the database through Server Explorer, if I use the instance of the SQL Server Management Studio 2012(PC-PAULO\INSTANCIAPJ) as Server Name, the database doesn't appears but, if I use the the instance (localdb)\v11.0 the dabase
    appears.
    How to change the save to the SQL Server Management Studio 2012, I don't know where this (localDB)\v11.0 saves.
    Help-me Thank you :D

    Hello PauloJos,
    The code should be ok and it is really strange that the database is only created into the local database in your machine. I am wondering if it is related with the machine environment, could you please have a try with below demo on your machine which works
    on my side and if it is possible, please have a try to run your application on other machines to see if it works:
    class Program
    static void Main(string[] args)
    #region https://social.msdn.microsoft.com/Forums/en-US/00eff3c4-2336-4807-9212-e6f2a6c8812e/entity-framework-doesnt-create-the-database-in-sql-server-management-2012-instead-it-just-creates?forum=adodotnetentityframework
    using (CFDbContext db = new CFDbContext())
    db.Database.CreateIfNotExists();
    #endregion
    public class CFDbContext : DbContext
    public CFDbContext() : base("UltraFoda3") { }
    public DbSet<TestOne> TestOnes { get; set; }
    public class TestOne
    public int ID { get; set; }
    public string Name { get; set; }
    Config file is similar:
    <?xml version="1.0" encoding="utf-8"?>
    <configuration>
    <configSections>
    <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
    </configSections>
    <entityFramework>
    <defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
    <parameters>
    <parameter value="v11.0" />
    </parameters>
    </defaultConnectionFactory>
    <providers>
    <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
    </providers>
    </entityFramework>
    <connectionStrings>
    <add name="UltraFoda3" connectionString="Data Source=YourServer;Initial Catalog=UltraFoda3;Integrated Security=True;MultipleActiveResultSets=True" providerName="System.Data.SqlClient" />
    </connectionStrings>
    </configuration>
    Regards.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • 2008 R2 upgrade to SQL 2012 validation error - No Features Selected

    I need a work-around for a known bug.  Some features of Server 2008 R2 Enterprise install an instance of SQL Server.  I'm attempting to upgrade the in-place instance to SQL 2012 Express.  After selecting 'Upgrade', it returns this error:
    Upgrade to SQL Server 2012
    There are validation errors on this page.  Click OK to close this dialog box.  Review errors at the bottom of the setup page, then provide valid parameters or click Help for more information.
    There are no features selected for upgrade.
    In researching, I find this is a known problem in which the hotfix is available in a cumulative update.  The 2419 build updates the released 2100 build.  My problem now is that applying the cumulative update requires that SQL 2012 already be installed.
    What is the correct procedure for upgrading the in-place SQL instance to 2012 SQL Express?
    Beware of unmoderated moderators in the Expression Web forums.

    One of us is confused.... likely me.  The SQL currently installed is the built-in SQL of Windows Server 2008 R2 Enterprise.  It is not SQL Enterprise.  I understand it to be a limited variation called SSEE, SQL Server Embedded Edition. 
    I believe the installation of this variation can be triggered by installing IIS or WSUS.  The instance name is Microsoft##SSEE.
    Nevertheless, there must be a proper way to install SQL 2012 Express, migrate, and uninstall the Windows Internal Database SQL 2005.  Where can I find the correct procedure for upgrading the in-place SQL instance to 2012 SQL Express?
    Hi backup,
    According to your description, I recommend you install SQL Server 2012 Express directly. Before installing, you should note the
    hardware and software requirements, for example, you need to download and install Microsoft .Net Framework 3.5 SP1 and Windows Installer 4.5.
    There is a process of installing SQL Server 2012 Express, you can review it.
    http://www.jsinh.in/2012/09/install-sql-server-2012-express-step-by-step/
    Thanks,
    Sofiya Li
    Sofiya Li
    TechNet Community Support

  • CREATE ASSEMBLY for assembly Assembly Name failed because the assembly is built for an unsupported version of the Common Language Runtime.

    Not sure if this is an SQL or C# question, but here it goes:  I am trying to create my first CLR assembly for SQL using C#.  I found several examples online, and am following them.  However, when I try to load my assembly into the SQL Server,
    I receive the aforementioned error.  I've googled the heck out of it an am coming up with nothing.  Anyone have an idea that can point me in the right direction?

    SQL Server 2008 uses .NET Framework 3.5 SP1 (and, really, the base portion of the framework is just 2.0 with updates, 3.0 and 3.5 just update the 2.0 base and add some new assemblies). If changing the VS2010 to 3.5 didn't do it, I'd try starting out with
    an entire new project and set the target to 3.5 at project creation time. Unless you're using some odd referenced assemblies that are version 1.1 or 4.0, this should work (I've been using VS2010 with 3.5 targets for SQLCLR for quite a while without incident).
    Hope this helps, Cheers, Bob Beauchemin, SQLskills

  • SQL 2012 SP1 VMM Deployment

    Is it even possible to deploy sql 2012 sp1 with vmm?
    The below are the high level steps I followed.
    1. Create VM with Windows Server 2012 R2
    2. Prepare the SQL Server 2012 SP1 image and note down the instance id used
    3. Sysprep the VHD (generalize, oobe)
    4. Copy the Syspreped VHD into VMM Library
    5. Create VM template and map the syspreped VHD
    6. Under SQL Configuration, specify all the SQL Configuration details(use the same instance id that was given during sql image preparation)
    7. Create the Service Template
    8. Create the Service and deploy to cloud or host groups
    Error (22703)
    The SQL media configured on the template is not supported by Virtual Machine Manager. Virtual Machine Manager only supports SQL2008 and SQL2012 for SQL deployment.
    Recommended Action
    Fix the SQL media path to point to a valid setup location for SQL2008 or SQL2012
    Just to clarify, VM gets created just fine, sql setup doesn't even start, the error above is everything I could find regarding this issue.
    The media is at c:\sql on the VHD file, I used the same path in deployment options.

    Ok, you can close this. Here's a solution for my trouble (So yes, works with SQL 2012 SP1):
    1. Create VM with Windows Server 2012 R2
    2. Extract and copy the SQL Server ISO to C:\SQL, "install" sql, note the instance ID
    3. Sysprep the VHD (generalize, oobe)
    4. Copy the Syspreped VHD into VMM Library
    5. Create VM template and map the syspreped VHD
    6. Under SQL Configuration, specify all the SQL Configuration details, use the same instance id and media path that was given during sql image preparation. (Media path is case sensitive, but do not take my word for it. In case it's case insensitive
    you got nothing to lose).
    7. Create the Service Template
    8. Create the Service and deploy to cloud or host groups
    It works ONLY THIS WAY. NO installs from ISO or FILE share, only install SQL from locally copied setup files. I cannot believe how retarded that is. I got to give credits to the person that made me try all various ways to install it.
    http://www.systemcentercentral.com/scvmm-2012-beta-sql-server-deployment/

  • CLR fce in MS SQL 2012 DirectoryServicesPermission failed

    Hello,
    I did this all and result isnt good :-)
    When I try to call the function dbo.fn_jk_ver_email(@param) the error occurs:
    // SQL settings
    USE master
    GO
    CREATE ASYMMETRIC KEY DirectoryServices_Key
    FROM EXECUTABLE FILE = 'C:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.DirectoryServices\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.DirectoryServices.dll';
    CREATE LOGIN DirectoryServices_Login
    FROM ASYMMETRIC KEY DirectoryServices_Key;
    GRANT EXTERNAL ACCESS ASSEMBLY TO DirectoryServices_Login;
    GRANT UNSAFE ASSEMBLY TO DirectoryServices_Login;
    GO
    USE CRMMAFRA_TEST_23032014
    GO
    CREATE ASSEMBLY DirectoryServices FROM 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\System.DirectoryServices.dll' --na serveru
    WITH PERMISSION_SET = UNSAFE;
    GO
    -- Create My_CLR_function in SQL
    USE CRMMAFRA_TEST_23032014
    GO
    CREATE FUNCTION [dbo].[fn_jk_ver_email]( @adresa nvarchar(100))
    RETURNS int
    WITH EXECUTE AS CALLER
    AS
    EXTERNAL NAME LDAP_CLR.UserDefinedFunctions.jk_ver_email;
    GO
    //CLR fce deployed into SQL
    using System;
    using System.Data;
    using System.DirectoryServices.AccountManagement;
    using System.DirectoryServices;
    using System.Data.SqlClient;
    using System.Data.SqlTypes;
    using Microsoft.SqlServer.Server;
    public partial class UserDefinedFunctions
    [Microsoft.SqlServer.Server.SqlFunction]
    public static SqlInt32 jk_ver_email(string emailadresamoje)
    int vysledek = 0;
    int firstCharacter = emailadresamoje.IndexOf("@") + 1;
    string domena = emailadresamoje.Substring(firstCharacter);
    string ldapstr = "LDAP://" + domena;
    emailadresamoje = emailadresamoje.ToLower();
    using (DirectoryEntry entry = new DirectoryEntry(ldapstr))
    DirectorySearcher dSearch = new DirectorySearcher(entry);
    dSearch.Filter = "(objectClass=user)";
    foreach (SearchResult sResultSet in dSearch.FindAll())
    if (sResultSet.Properties["mail"].Count > 0)
    //if (String.ReferenceEquals(sResultSet.Properties["mail"][0].ToString(), emailadresamoje))
    bool result = Equals(sResultSet.Properties["mail"][0].ToString().ToLower(), emailadresamoje);
    if (result)
    vysledek = 1;
    return new SqlInt32(vysledek);
    Msg 6522, Level 16, State 2, Line 1
    A .NET Framework error occurred during execution of user-defined routine or aggregate "fn_jk_ver_email":
    System.Security.SecurityException: Request for the permission of type 'System.DirectoryServices.DirectoryServicesPermission, System.DirectoryServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' failed.
    System.Security.SecurityException:
       at UserDefinedFunctions.jk_ver_email(String emailadresamoje)

    Hi
    I've fixed this finally - at least for me!
    It appears that if your assembly is using an assembly that has been marked as 'unsafe' - such as the DirectoryServices one - then your own assembly must be set to 'unsafe' as well. I changed a number of things in Visual Studio to this affect and then re-published
    and the error went away and it all works fine now, AD from SQL server! However, I didn't use any of the manual scripted key generation code though that you used. The only T-SQL I used in this whole project was this...
    ALTER DATABASE MyDatabase SET TRUSTWORTHY ON
    GO
    IF NOT EXISTS (SELECT * FROM sys.assemblies WHERE [name] = 'System.DirectoryServices.AccountManagement')
    BEGIN
    CREATE ASSEMBLY [System.DirectoryServices.AccountManagement]
    FROM 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\System.DirectoryServices.AccountManagement.dll'
    WITH PERMISSION_SET = UNSAFE
    END
    And these are the steps to what I changed in Visual Studio...
    1) First right click on the project in the solution explorer to get the project settings tabs up...
    2) Under the 'Project Settings' tab click on the 'Database Settings' button, when the dialog comes up goto the 'Miscellaneous' tab and tick the 'Trustworthy' option (even if you've set the database as trustworthy in SQL server using T-SQL still do this,
    wouldn't work for me until I did this as well)
    3) Next under the 'SQLCLR' tab set the assembly permission level to 'UNSAFE'
    4) Lastly (not sure if this is required) still under the 'SQLCLR' tab click on the 'Signing' button and create a new strong name key file, call it anything and click ok and make sure that it's now showing as the selected strong name key file. Probably a
    security risk but hey. Then don't forget to click ok!
    5) Save everything and rebuild, then publish to your database and test again - hopefully it works!
    Good luck
    Padigan

  • T-sql 2012 accept null parameter values

    The following t-sql 2012 works fine in sql management studio. However when I place it in a .net 2010 web form application, I am told the sql does not work when the parameter values are null. Thus can you tell me what I can change in the sql below that will
    accept null as 3 possible input values?
    SELECT i.[lastName]
                ,i.[firstName] 
                ,i.[middleName]
                ,i.[suffix] 
                ,a.[userid]
                ,a.schoolnum 
                ,a.spa 
                ,a.mrref
                from [OPS].[dbo].[Identity] i 
                inner join  [OPS].[dbo].[Person] p on i.identityID = p.currentIdentityID 
                inner join [OPS].[dbo].[UserAccount] u on u.personID = p.personID 
                inner join [CampusOps].[dbo].[AtnLtrUsers] a on a.userid =u.username
                       where (i.[lastName] like  '%' + @lname  + '%' or i.[firstName] like'%' +
    @fname + '%'
                       or i.[middleName]  like'%' + @mname + '%')
    or (@fname is null and @lname is null and @mname is null)
            order by  i.[lastName], i.[firstName], i.[middleName]"

    You should create a stored procedure for this.
    create procedure GetNames
    (@lname varchar(max) = null, @fname varchar(max) = null, @mname varchar(max) = null)
    as
    begin
    SELECT i.[lastName]
    ,i.[firstName]
    ,i.[middleName]
    ,i.[suffix]
    ,a.[userid]
    ,a.schoolnum
    ,a.spa
    ,a.mrref
    from [OPS].[dbo].[Identity] i
    inner join [OPS].[dbo].[Person] p on i.identityID = p.currentIdentityID
    inner join [OPS].[dbo].[UserAccount] u on u.personID = p.personID
    inner join [CampusOps].[dbo].[AtnLtrUsers] a on a.userid =u.username
    where (i.[lastName] like '%' + @lname + '%' or @lname is null) and
    (i.[firstName] like'%' + @fname + '%' or @fname is null) and
    (i.[middleName] like'%' + @mname + '%' or @mname is null)
    order by i.[lastName], i.[firstName], i.[middleName]
    end
    Also keep in mind that NULL is different than an empty string but it should work exactly like a null anyway (unless your columns/fields are also NULLable).

  • Issue with SSIS Custom Components - 64 bit SQL 2012

    Hello All,
    Our SSIS packages built on SQL 2008 R2 make use of some custom components. These custom components are installed as part of an MSI. The dll's are copied over to the Windows/assemble [GAC Folder] and also to the Program Files(x86)/SQL Server/110/DTS/* folder.
    The installation does not copy the dll's to the 64 bit program files folder.
    X:\Program Files\Microsoft SQL Server\110\DTS
    These packages are executed via SQL Agent jobs on a 64 bit SQL server and there does not seem be any issue.
    Now we are upgrading our servers to SQL 2012 and we have a new installer for the custom components as well. The new custom components use .NET Framework 4.0 and when installed the dll files get copied over to the Ms.NET 32 bit runtime GAC folder and also
    to the SQL Server DTS Folder in x86. The upgraded packages work only when we set the runtime mode to 32 bit. The packages successfully executes within the 32 bit dtexec utility, but when we try to run the same package using a 64 bit dtexec utility the
    process errors out with a component failed to load message. The package moves data between two SQL Server instances.
    The custom components have always been built for 32 bit runtime. I can run a older package through the dtexec utility (from the 64 bit folder in program files) and it does work without any issues. After the upgrade the package will only execute on
    a 32 bit utility. can someone help me understand this issue?
    Regards, Dinesh

    Thank you Arthur.
    i think we got the answer as well, as the .NET framework 3.0 installer copied the files over to the C:\windows assembly the dtexec utility [32 bit/64 bit] was able to load the components.
    Now with the new installer the files are copied to specific runtime gac folders as Arthur has mentioned. The 64  bit  utility does not find the dlls in the GAC whereas the 32 bit version will find them.
    Regards, Dinesh

  • "The certificate chain was issued by an authority that is not trusted" when migrating to SQL 2012

    Environment:
    1 Primary Site (USSCCM-Site.domain.com)
    1 CAS (USSCCM-CAS.domain.com)
    SQL 2008 R2 (USSCCM-CAS.domain.com)
    SQL 2012 SP1 CU6 (USSQL12.domain.com)
    Issue:
    We were successfully able to migrate the CAS to the new SQL 2012 server, almost without incident. When attempting to migrate the Site instance however, we are getting errors. Screenshot below.
    Attached is a copy of the log. But below is a highlight of what I think are the errors… It appears that either SQL or SCCM doesn’t like a certificate somewhere, but it is contradicting because the logs say that it has successfully tested connection to SQL.
    I am lost.
    Logs stating it can connect successfully to SQL
    Machine certificate has been created successfully on server USSQL12.domain.com.        Configuration Manager Setup                10/21/2013 10:20:10
    AM               2100 (0x0834)
    Deinstalled service SMS_SERVER_BOOTSTRAP_USSCCM-Site.domain.com_SMS_SQL_SERVER on USSQL12.domain.com.  Configuration Manager Setup    10/21/2013 10:20:10 AM              
    2100 (0x0834)
    SQL Server instance [sccmsite] is already running under the certificate with thumbprint[f671be844bf39dec7e7fdd725dc30e225991f28a].       Configuration Manager Setup    10/21/2013 10:20:10 AM        
    2100 (0x0834)
    INFO: Testing SQL Server [USSQL12.domain.com] connection ...                Configuration Manager Setup    10/21/2013 10:20:10 AM      
    2100 (0x0834)
    INFO: SQL Connection succeeded. Connection: USSQL12.domain.com SCCMSITE\MASTER, Type: Unsecure                Configuration Manager Setup    10/21/2013 10:20:10 AM              
    2100 (0x0834)
    INFO: Tested SQL Server [USSQL12.domain.com] connection successfully.  Any preceding SQL connection errors may be safely ignored.            Configuration Manager Setup    10/21/2013
    10:20:10 AM               2100 (0x0834)
    INFO: Certificate: 308202FC308201E4A003020102021011BA47041BB0609D4097BC19F5AB96B5300D06092A864886F70D01010B0500301D311B301906035504031312555353514C31322E7063756265642E636F6D3020170D3133313031373139343632345A180F32313133303932343139343632345A301D311B301906035504031312555353514C31322E7063756265642E636F6D30820122300D06092A864886F70D01010105000382010F003082010A0282010100CFAC23CEA8920051C8C24DF4E96D76D9E034931867C4DBF74F8AE863C5BDE6D1EAEAAF363F6B97DEF1D7A1FC292CB870F353D72F04472EBE3D31DCA009BD3F8C58E2AAB69C892C20598306537F5EEAA43FA6DE55D4A784CEB6FD07486AB2CC2DE1A8651648EBC31A5CD918E8ED6E184FC560B3A8B0F76F83E310BBA8C4EB27F46707E3A6377D8DD06C6808146E407EF9DB464F453798B6C1748216665884A7F2CDE03D9DA1CB4E59E67516E4F345755E35450F84F4B039642851EFFA96B22D8E77EC11C01D389989F740923B58799E34FC8F4F19CD55830FA7E786C993A08A1EEDCA87F209268CE9D5E86AC9E2A14668207721D94ACE9FACE3AA55B53507F6BF0203010001A3363034301D0603551D11041630148212555353514C31322E7063756265642E636F6D30130603551D25040C300A06082B06010505070301300D06092A864886F70D01010B05000382010100A0E33BF490B60C2B8A73BF7FA90EBB69D92DA27B439EF0569650F388EBA34B9F382CEF52DAAB543C2924E1B8DC7BEE828FB0C276330B0FF67340CBFA0CC24F47431E5272DC76C7610C290A04411036441E9822FBF8AB52B4BBE43F5FF48074BA420FF690A94D53AFCEF7AC75E2D2723520A9EF64AF06759814AE92D41CEA2F0D6CC8D9E5DEF121234F5DD97A7E886BE55F57DC0B79052A554724E8A0146C08A74AE75672FBD8C8BD6B7FCA82C1CC69906A45128CDDD1BC3985ED9603C16E712FFBAA8AA6878F853367F3E1F69E727DB96864DF6B47EBDA82659036EC82A8B04E77535CEA314D7518D02C401969C77B91C8C210C57AA991A622D679B994AEED3C               
    Configuration Manager Setup    10/21/2013 10:20:10 AM               2100 (0x0834)
    INFO: Created SQL Server machine certificate for Server [USSQL12.domain.com] successfully.    Configuration Manager Setup 10/21/2013 10:20:10 AM               2100 (0x0834)
    INFO: Configuration Manager Setup - Application Shutdown       Configuration Manager Setup    10/21/2013 10:20:10 AM         2100 (0x0834)
    INFO: Running SQL Server test query.    Configuration Manager Setup    10/21/2013 10:20:10 AM               2100 (0x0834)
    INFO: SQL Connection succeeded. Connection: USSQL12.domain.com SCCMSITE\MASTER, Type: Secure                Configuration Manager Setup    10/21/2013 10:20:10 AM              
    2100 (0x0834)
    INFO: SQL Server Test query succeeded.              Configuration Manager Setup    10/21/2013 10:20:10 AM              
    2100 (0x0834)
    INFO: SQLInstance Name: sccmsite         Configuration Manager Setup    10/21/2013 10:20:10 AM               2100 (0x0834)
    INFO: SQL Server version detected is 11.0, 11.0.3381.0 (SP1).      Configuration Manager Setup    10/21/2013 10:20:10 AM         2100 (0x0834)
    Logs saying certificate is not trusted
    ERROR: SQL Server error: [08001][-2146893019][Microsoft][SQL Server Native Client 11.0]SSL Provider: The certificate chain was issued by an authority that is not trusted.        Configuration Manager Setup   
    10/21/2013 10:20:49 AM                2100 (0x0834)
    *** [08001][-2146893019][Microsoft][SQL Server Native Client 11.0]Client unable to establish connection                Configuration Manager Setup    10/21/2013 10:20:49
    AM               2100 (0x0834)
    ERROR: SQL Server error: [08001][-2146893019][Microsoft][SQL Server Native Client 11.0]Client unable to establish connection         Configuration Manager Setup    10/21/2013 10:20:49 AM              
    2100 (0x0834)
    *** Failed to connect to the SQL Server, connection type: CCAR_DB_ACCESS.    Configuration Manager Setup                10/21/2013 10:20:49 AM              
    2100 (0x0834)
    INFO: SQL Connection failed. Connection: CCAR_DB_ACCESS, Type: Secure         Configuration Manager Setup                10/21/2013 10:20:49
    AM               2100 (0x0834)
    *** [08001][-2146893019][Microsoft][SQL Server Native Client 11.0]SSL Provider: The certificate chain was issued by an authority that is not trusted. Configuration Manager Setup    10/21/2013 10:20:52 AM              
    2100 (0x0834)
    ERROR: SQL Server error: [08001][-2146893019][Microsoft][SQL Server Native Client 11.0]SSL Provider: The certificate chain was issued by an authority that is not trusted.        Configuration Manager Setup   
    10/21/2013 10:20:52 AM                2100 (0x0834)
    *** [08001][-2146893019][Microsoft][SQL Server Native Client 11.0]Client unable to establish connection                Configuration Manager Setup    10/21/2013 10:20:52
    AM               2100 (0x0834)
    ERROR: SQL Server error: [08001][-2146893019][Microsoft][SQL Server Native Client 11.0]Client unable to establish connection         Configuration Manager Setup    10/21/2013 10:20:52 AM              
    2100 (0x0834)
    *** Failed to connect to the SQL Server, connection type: CCAR_DB_ACCESS.    Configuration Manager Setup                10/21/2013 10:20:52 AM              
    2100 (0x0834)
    INFO: SQL Connection failed. Connection: CCAR_DB_ACCESS, Type: Secure         Configuration Manager Setup                10/21/2013 10:20:52
    AM               2100 (0x0834)
    *** [08001][-2146893019][Microsoft][SQL Server Native Client 11.0]SSL Provider: The certificate chain was issued by an authority that is not trusted. Configuration Manager Setup    10/21/2013 10:20:55 AM              
    2100 (0x0834)
    ERROR: SQL Server error: [08001][-2146893019][Microsoft][SQL Server Native Client 11.0]SSL Provider: The certificate chain was issued by an authority that is not trusted.        Configuration Manager Setup   
    10/21/2013 10:20:55 AM                2100 (0x0834)
    *** [08001][-2146893019][Microsoft][SQL Server Native Client 11.0]Client unable to establish connection                Configuration Manager Setup    10/21/2013 10:20:55
    AM               2100 (0x0834)
    ERROR: SQL Server error: [08001][-2146893019][Microsoft][SQL Server Native Client 11.0]Client unable to establish connection         Configuration Manager Setup    10/21/2013 10:20:55 AM              
    2100 (0x0834)
    *** Failed to connect to the SQL Server, connection type: CCAR_DB_ACCESS.    Configuration Manager Setup                10/21/2013 10:20:55 AM              
    2100 (0x0834)
    INFO: SQL Connection failed. Connection: CCAR_DB_ACCESS, Type: Secure         Configuration Manager Setup                10/21/2013 10:20:55
    AM               2100 (0x0834)
    *** [08001][-2146893019][Microsoft][SQL Server Native Client 11.0]SSL Provider: The certificate chain was issued by an authority that is not trusted. Configuration Manager Setup    10/21/2013 10:20:58 AM              
    2100 (0x0834)
    ERROR: SQL Server error: [08001][-2146893019][Microsoft][SQL Server Native Client 11.0]SSL Provider: The certificate chain was issued by an authority that is not trusted.        Configuration Manager Setup   
    10/21/2013 10:20:58 AM                2100 (0x0834)
    *** [08001][-2146893019][Microsoft][SQL Server Native Client 11.0]Client unable to establish connection                Configuration Manager Setup    10/21/2013 10:20:58
    AM               2100 (0x0834)
    ERROR: SQL Server error: [08001][-2146893019][Microsoft][SQL Server Native Client 11.0]Client unable to establish connection         Configuration Manager Setup    10/21/2013 10:20:58 AM              
    2100 (0x0834)
    *** Failed to connect to the SQL Server, connection type: CCAR_DB_ACCESS.    Configuration Manager Setup                10/21/2013 10:20:58 AM              
    2100 (0x0834)
    INFO: SQL Connection failed. Connection: CCAR_DB_ACCESS, Type: Secure         Configuration Manager Setup                10/21/2013 10:20:58
    AM               2100 (0x0834)
    *** [08001][-2146893019][Microsoft][SQL Server Native Client 11.0]SSL Provider: The certificate chain was issued by an authority that is not trusted. Configuration Manager Setup    10/21/2013 10:21:01 AM              
    2100 (0x0834)
    More logs saying cert is not trusted
    *** [08001][-2146893019][Microsoft][SQL Server Native Client 11.0]SSL Provider: The certificate chain was issued by an authority that is not trusted. Configuration Manager Setup    10/21/2013 10:21:20 AM              
    2100 (0x0834)
    ERROR: SQL Server error: [08001][-2146893019][Microsoft][SQL Server Native Client 11.0]SSL Provider: The certificate chain was issued by an authority that is not trusted.        Configuration Manager Setup   
    10/21/2013 10:21:20 AM                2100 (0x0834)
    *** [08001][-2146893019][Microsoft][SQL Server Native Client 11.0]Client unable to establish connection                Configuration Manager Setup    10/21/2013 10:21:20
    AM               2100 (0x0834)
    ERROR: SQL Server error: [08001][-2146893019][Microsoft][SQL Server Native Client 11.0]Client unable to establish connection         Configuration Manager Setup    10/21/2013 10:21:20 AM              
    2100 (0x0834)
    *** Failed to connect to the SQL Server, connection type: CCAR_DB_ACCESS.    Configuration Manager Setup                10/21/2013 10:21:20 AM              
    2100 (0x0834)
    INFO: Updated the site control information on the SQL Server USSQL12.domain.com.    Configuration Manager Setup                10/21/2013 10:21:39 AM              
    2100 (0x0834)
    *** [08001][-2146893019][Microsoft][SQL Server Native Client 11.0]SSL Provider: The certificate chain was issued by an authority that is not trusted. Configuration Manager Setup    10/21/2013 10:21:39 AM              
    2100 (0x0834)
    ERROR: SQL Server error: [08001][-2146893019][Microsoft][SQL Server Native Client 11.0]SSL Provider: The certificate chain was issued by an authority that is not trusted.        Configuration Manager Setup   
    10/21/2013 10:21:39 AM                2100 (0x0834)
    *** [08001][-2146893019][Microsoft][SQL Server Native Client 11.0]Client unable to establish connection                Configuration Manager Setup    10/21/2013 10:21:39
    AM               2100 (0x0834)
    ERROR: SQL Server error: [08001][-2146893019][Microsoft][SQL Server Native Client 11.0]Client unable to establish connection         Configuration Manager Setup    10/21/2013 10:21:39 AM              
    2100 (0x0834)
    *** Failed to connect to the SQL Server, connection type: CCAR_DB_ACCESS.    Configuration Manager Setup                10/21/2013 10:21:39 AM              
    2100 (0x0834)
    CSiteSettings::WriteActualSCFToDatabase: Failed to get SQL connection                Configuration Manager Setup               
    10/21/2013 10:21:39 AM               2100 (0x0834)
    CSiteSettings::WriteActualSCFToDatabaseForNewSite: WriteActualSCFToDatabase(USA) returns 0x87D20002                Configuration Manager Setup    10/21/2013 10:21:39
    AM               2100 (0x0834)
    ERROR: Failed to insert the recovery site control image to the parent database. Configuration Manager Setup                10/21/2013 10:21:39 AM              
    2100 (0x0834)
    Troubleshooting:
    I have read on a few articles of other people having this issue that states to find the certificate on SQL 2012 that’s being used and export it to the SCCM server – which I’ve done.
    http://damianflynn.com/2012/08/22/sccm-2012-and-sql-certificates/
    http://trevorsullivan.net/2013/05/16/configmgr-2012-sp1-remote-sql-connectivity-problem/
    http://scug.be/sccm/2012/09/19/configmgr-2012-rtm-sp1-and-remote-management-points-not-healthy-when-running-configmgr-db-on-a-sql-cluster/
    -Brad

    Hi,
    How about importing certificate in the personal folder under SQL server computer account into SCCM server computer account or SCCM server service account? That certificate is for SQL Server Identification. And you could
    set the value of the ForceEncryption option to NO. (SQL Server Configuration Manager->SQL Server Network Configuration->
    Protocols for <server instance>->Properties)
    Best Regards,
    Joyce Li
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • SQL 2012 AlwaysON High Availability for SharePoint 2013

    Our Company have 2 Webfront Servers for Sharepoint 2013 and one Database SQL 2012 Server.
    We got one more Server & we don't have Storage so need to configure Always On.
    There are Some Confusions:
    1- Database Server is in production, so how much down time required to Achieve the AlwaysOn?
    2- What are the Changes need to be done on Production Server?
    3- What are the Steps to be followed While Configuring new Database Server?
    Regards,

    Hi Genius1985,
    According to your description, you want to configure a SQL Server 2012 AlwaysOn Availability Group for your database, right?
    Question 1: Database Server is in production, so how much down time required to achieve the AlwaysOn?
    There is no a certain downtime for AlwaysOn, it depends on the configuration of our AlwaysOn Availability Group, normally it can be several seconds or minutes. In order to understand why there is downtime for SQL Server with Microsoft Clustering, please refer
    to the following article:
    http://www.mssqltips.com/sqlservertip/1882/understanding-why-there-is-still-downtime-for-sql-server-with-microsoft-clustering/
    Question 2 and 3: What are the Changes need to be done on Production Server? What are the Steps to be followed While Configuring new Database Server?
    Since AlwaysOn Availability Groups require a Windows Server Failover Cluster, we first need to add the Windows Failover Cluster Feature to all the machines running the SQL Server instances that we will configure as replicas.
    Once the Windows Server Failover Cluster has been created, we need to proceed with enabling the AlwaysOn Availability Groups feature in SQL Server 2012.  This needs to be done on all of the SQL Server instances that we will configure as replicas in our
    Availability Group.
    For more details about Step-By-Step: Creating a SQL Server 2012 AlwaysOn Availability Group, please refer to the following article:
    http://blogs.technet.com/b/canitpro/archive/2013/08/20/step-by-step-creating-a-sql-server-2012-alwayson-availability-group.aspx
    If you have any question, please feel free to let me know.
    Regards,
    Jerry Li

  • 32-bit iFilter with Reader 11.0.10 cannot be found by SQL 2012 Fulltext Indexing on Windows 7 32 bit. How can I fix this?

    I have verified that a record shows up in the fulltext system components (EXEC sys.sp_help_fulltext_system_components 'filter').
    componenttype    componentname    clsid    fullpath    version    manufacturer
    filter    .pdf    E8978DA6-047F-4E3D-9C78-CDBE46041603    C:\Program Files\Adobe\Reader 11.0\Reader\AcroRdIF.dll    11.0.0.379    Adobe Systems, Inc.
    I have also added Reader's installation folder to my system PATH variable, and ran these 3 things:
    EXEC sp_fulltext_service 'update_languages';
    EXEC sp_fulltext_service 'load_os_resources', 1;
    EXEC sp_fulltext_service 'restart_all_fdhosts';
    and then dropped and re-created my fulltext index.  For each row in the table, I receive a message like this:
    Warning: No appropriate filter was found during full-text index population for table or indexed view '[DocumentIndexing].[dbo].[Document]' (table or indexed view ID '277576027', database ID '8'), full-text key value '17'. Some columns of the row were not indexed.
    In the Registry, under HKEY_CLASSES_ROOT / .pdf / PersistentHandler is the value {F6594A6D-D57F-4EFD-B2C3-DCD9779E382E}.
    I have tried several times to install/fix my PDF installation, restart SQL Server, Reboot my laptop, etc.  All to no avail.
    I saw the article on the 64-bit filter and was able to successfully do that on another workstation (Windows 8.1 64-bit SQL 2012).  However, I really need this working on my laptop.
    Do you have a solution or workaround or some recommendations for me to move forward with this?
    Thanks,
    Dave

    I found the solution.  Here it is:
    Take backup of below registry key.
    HKLM\SOFTWARE\Microsoft\Cryptography\MachineGuid This key should ideally have the GUID of the machine without curly braces, so {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} becomes xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
    Then delete the braces.
    Try to reboot and start the SQL service . If service don’t start then Uninstall and reinstall SQL.
    The MachineGuid had curly braces so I removed them and rebooted my laptop.  Now both instances of SQL Server start.  It is the last post of this thread:
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/56f14665-3f00-41ff-b002-bb5e86b3f219/sql-server-not-starting-fallback-certificate-initialization-failed?forum=sqlsecurity
    He states that he got it from Microsoft but did not give the url.
    Thanks for all your help.
    Fred Schmid

  • Fulltext search of binary files outside of database in SQL 2012/Server 2012

    This may be more of a Windows Server 2012 question but I'm not sure.
    I have a system that holds large amounts of binary files (pdf, doc, etc.).  The files themselves are held outside the database in a folder and a SQL table holds the metadata.  I used the Indexing Service available through Windows Server 2008 to
    create a catalog called "EFCATALOG" to index the contents of the external folder, then created a linked server called MYIDXS which allowed me to query that external indexing catalog from within SQL with a query like this:
    EXEC sp_addlinkedserver MYIDXS, 'Internal App', 'MSIDXS', 'EFCATALOG'
    SELECT * FROM MYDOCS
    LEFT JOIN OPENQUERY(MYIDXS,'SELECT FILENAME FROM SCOPE() WHERE CONTAINS (''test'')') AS MYTBL
    ON MYDOC_FILE_NAME = MYTBL.[FILENAME]
    With Windows Server 2012, I'm missing the functionality to create the indexing service catalog.  I've added the Windows Search Service and see how I can configure folders for searching, but there is no naming functionality for this and I don't see how
    I can get the above query/structure to work in Windows Server 2012/SQL Server 2012 environment.  In fact, there isn't much at all online regarding the search service or the relationship back to the older versions in 2008 and before.
    Is there any way to continue this structure in 2012?  I would like to avoid recoding my application to work with a different structure.  I'm afraid that changing everything to work with the FILETABLE/FILESTREAM functionality added in SQL 2012
    will be necessary which is fine long term, but not convenient right now.
    Thanks in advance for any suggestions/help.

    Thank you Fanny Liu, based on your link the syntax has changed dramatically. I need to query SYSTEMINDEX now and the structure is very different.    It still seems that this new syntax requires creating a linked server of a different type. 
    I've tried:
    EXEC sp_addlinkedserver @server = 'TEST', @provider = 'Search.CollatorDSO.1', @datasrc = 'SYSTEMINDEX', @srvproduct = '', @provstr='Application=Windows'
    SELECT FileName FROM OPENQUERY("TEST", 'SELECT Filename FROM SYSTEMINDEX')
    Msg 7302, Level 16, State 1, Line 1
    Cannot create an instance of OLE DB provider "Search.CollatorDSO.1" for linked server "TEST".
    I've also tried using just "Search.CollatorDSO"as the provider since that is the provider name listed in management studio but basically the same error comes back.
    So I have 2 questions:
    1) Is it possible for my original process to work in Windows Server 2012 in any way (meaning that the OPENQUERY example I provided can remain relatively unchanged)?
    2) If change is necessary using this new SYSTEMINDEX and linked server combination, why is my linked server definition failing?  I'm using SQL Server 2012....Microsoft SQL Server 2012 - 11.0.2100.60 (X64)
     Feb 10 2012 19:39:15
     Copyright (c) Microsoft Corporation
     Express Edition (64-bit) on Windows NT 6.2 <X64> (Build 9200: ) (Hypervisor)
    Thank you.

  • How to configure log files in SQL 2012?

    I'm installing a SharePoint Solution and using Microsoft SQL 2012 and I have limited knowledge in installing SQL.  I simply run the wizard and create the DB for SharePoint. 
    Is there any links/materials available demonstrating how to correctly configure the log files step by step in a specific partition during the SQL installation for SharePoint 2013?
    thanks, 

    Hello,
    SQL Server database log files benefit from RAID 1 and RAID 10 configurations. RAID 10 is recommended for both data files and log files.
    To control de grow of transaction log files, please backup them regularly. The following article may explain you in detail why:
    http://technet.microsoft.com/en-us/library/ms175495.aspx
    Monitor the growth of log files using Performance Monitor and the SQLServer:Databases --> Log Growths counter. Adjust the size of log files until Log Growths
    is constantly zero.
    Hope this helps.
    Regards,
    Alberto Morillo
    SQLCoffee.com

Maybe you are looking for

  • Error- "Unable to capture video..."

    What is the solution to allow video capture in the preferred WMV mode. I know AVI mode works but compression sucks. Plus, my laptop was always able to capture vid in WMV until recently. Now i get this error!!!!!!!!!!! Pls advice on this error: "Unabl

  • Canon EOS Utility Crash

    Hi, I am using an '07 MacBook 13" and have been using the Canon EOS utility to transfer photos from my camera to my laptop for the past year. I upgraded my camera about one month ago and reinstalled the Canon software with the disc supplied and have

  • Can't restore a corrupt iPod classic?

    So my iPod nano 6th gen died on me last night so I decided to dig out my iPod Classic %th gen and see if it worked. I turned on fine so I was like "Happy days!" untill I pulgged into iTunes. When I plug it in I get this message: So I went through the

  • Software requirements

    Hello, We wish to convert our existing HR processes into enterprise services and create process transperancy by modeling the process in BPM. Finally, create the dashboard in visual composer using the enterprise services. This is our vision. I believe

  • Stop whole program with one button

    Hi, I've written a program for reading some values out of a measurement instrument. Now i want to have one button which stops the entire program no matter in which loop or which subVI the program is in. I have a subvi to make a connection to the devi