System.Data.SqlClient.SqlException: The locale identifier (LCID) 16393 is not supported by SQL Server

I have SQL Server 2005 Developer Edition. And my operating system is Windows Vista.
I have written a procedure in C# and deployed it on SQL Server. However when i try to run it i get the following error.
System.Data.SqlClient.SqlException: The locale identifier (LCID) 16393 is not supported by SQL Server
Also I tried using same procedure in Windows XP machine and it workd fine. Can anyone help me what could be the problem?

Hi Jonathan
I tried posting the error box here but it is not allowing me.
Here is the error coming up:
A .NET framework error occured during execution of user-defined routine or aggregate.
System.Data.SqlClient.Sqlexception:The locale identifier (LCID)1153 is not supported by SQL Server.
System.Data.SqlClient.Sqlexception:atSystem.Data.SqlClient.SqlConnection.OnError(SqlExceptionexception, Boolean breakConnection)                            atSystem.Data.SqlClient.SqlInternalConnection.OnError(SqlExceptionexception, BoleanbreakConnection)                     atSystem.data.SqlCleitn.SqlInternalConnectionSmi.EventSink.ProcessMessagesandThrow(Boolean ignoreNonFatalMessages)             atMicrosoft.SqlServer.Server.SmiEventSink_Default.ProcessMessagesandThrow(Boolean ignoreNonFatalMessages) atSystem.Data.SqlClient.SqlCommand.RunExecuteNonQuerySmi.(BooleansendTo Pipe)                                           atSystem.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResultresult,StringmethodName,BooleansendToPipe)
                                                   atSystem.Data.SqlClient.SqlCommand.ExecuteNonQuery()
I hope this will shed some light.
Cheers

Similar Messages

  • PowerPivot 2012 Error: BaseWorkbook.CacheStream: Failed to read from stream. Error was: System.Data.SqlClient.SqlException: The EXECUTE permission was denied on the object 'proc_FetchChunkFromDocStreams', database 'SharePoint_AdminContent'

    Hi, I have setup PowerPivot 2012 for SharePoint, but when I access'PowerPivot Management Dashboard' in Central Admin I get error message 'An error has occured'
    Below is the error in the ULS,
    Background file fill operation caught exception: System.Data.SqlClient.SqlException: The EXECUTE permission was denied on the object 'proc_FetchChunkFromDocStreams', database 'SharePoint_AdminContent_ca021d58-ef1f-4f30-9aeb-6f24db24862b', schema 'dbo'.  
     at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)    
     at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)    
     at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)    
     at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()    
     at System.Data.SqlClient.SqlDataReader.get_MetaData()    
     at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)    
     at System.Data.SqlClient.SqlCommand.CompleteAsyncExecuteReader()    
     at System.Data.SqlClient.SqlCommand.InternalEndExecuteReader(IAsyncResult asyncResult, String endMethod)    
     at System.Data.SqlClient.SqlCommand.EndExecuteReader(IAsyncResult asyncResult)    
     at Microsoft.SharePoint.CoordinatedStreamBuffer.AsyncSqlSession.EndExecuteReader(IAsyncResult ar)    
     at Microsoft.SharePoint.CoordinatedStreamBuffer.SPBackgroundSqlFileFiller.OnReadComplete(IAsyncResult result)
    BaseWorkbook.CacheStream: Failed to read from stream. Error was: System.Data.SqlClient.SqlException: The EXECUTE permission was denied on the object 'proc_FetchChunkFromDocStreams', database 'SharePoint_AdminContent_ca021d58-ef1f-4f30-9aeb-6f24db24862b',
    schema 'dbo'.    
     at Microsoft.SharePoint.CoordinatedStreamBuffer.SPBackgroundFileFiller.Fill()    
     at Microsoft.SharePoint.CoordinatedStreamBuffer.SPCoordinatedStreamBuffer.WaitForIntervalFill(SPInterval i)    
     at Microsoft.SharePoint.CoordinatedStreamBuffer.SPCoordinatedMemoryStream.Read(Byte[] array, Int32 offset, Int32 count)    
     at Microsoft.SharePoint.SPFileStream.Read(Byte[] buffer, Int32 offset, Int32 count)    
     at Microsoft.Office.Excel.Server.CalculationServer.BaseWorkbookManager.CacheStream(CachedFile cachedFile, FileLoader loader)
    Regards,
    Ayaz
    SharePoint Architect

    Hey Ayaz,
    I do had the same error message when I click on "PowerPivot Management Dashboard". After few research I resolved this issue.
    You need to provide the dbReader and dbWriter permission to powerpivot app pool account at "SharePoint_AdminContent_ca021d58-ef1f-4f30-9aeb-6f24db24862b"
    Have a great day :-)
    Santosh sethi

  • SCOM not generating alerts & The request to synchronize state for OpsMgr Health Service identified by "bdb1712b-0a9a-bbe3-9630-41f2da9f64a1" failed due to the following exception "System.Data.SqlClient.SqlException: Cannot open database "OperationsManager

    Hi Anyone can assisting on this. The SCOM 2007r2 i managed suddenly do not pump out alerts.
    I have perform full scom service restart(data access, agent, config). it no load up related datawarehouse like(stored, write)
    I also restarted my sql db services. It show me the error like this. Anyhow i can fix it
    The request to synchronize state for OpsMgr Health Service identified by "bdb1712b-0a9a-bbe3-9630-41f2da9f64a1" failed due to the following exception "System.Data.SqlClient.SqlException: Cannot open database "OperationsManager" requested
    by the login. The login failed.
    Login failed for user 'HK\svc-scomsdk'.
       at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
       at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
       at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
       at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
       at System.Data.SqlClient.SqlConnection.Open()
       at Microsoft.EnterpriseManagement.Mom.DataAccess.SqlConnectionHandler.Open(SqlConnection sqlConnection, RetryPolicy retryPolicy, DatabaseConnection databaseConnection)
       at System.Data.SqlClient.SqlConnection.Open()
       at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
       at Microsoft.EnterpriseManagement.Mom.DataAccess.SqlConnectionHandler.Open(SqlConnection sqlConnection, RetryPolicy retryPolicy, DatabaseConnection databaseConnection)
       at System.Data.SqlClient.SqlConnection.Open()
       at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
       at System.Data.SqlClient.SqlConnection.Open()
       at Microsoft.EnterpriseManagement.Mom.DataAccess.SqlConnectionHandler.Open(SqlConnection sqlConnection, RetryPolicy retryPolicy, DatabaseConnection databaseConnection)
       at Microsoft.EnterpriseManagement.Mom.DataAccess.DatabaseConnection.Open()
       at Microsoft.EnterpriseManagement.Mom.DataAccess.QueryRequest.Execute(SqlNotificationRequest sqlNotificationRequest)
       at Microsoft.Mom.ConfigService.OpsMgrDataAccess.ConfigurationDataAccessor.QueryInstanceProperties(ReadOnlyCollection`1 instances)
       at Microsoft.Mom.ConfigService.DataAccess.DatabaseAccessor.QueryInstanceProperties(ReadOnlyCollection`1 instances)
       at Microsoft.Mom.ConfigService.Engine.ConfigurationEngine.CommunicationHelper.StateSyncRequestTask.ConfigurationItems.Instances.CollectPublicProperties(ReadOnlyCollection`1 identities, IConfigurationDataAccessor dataAccessor)
       at Microsoft.Mom.ConfigService.Engine.ConfigurationEngine.CommunicationHelper.StateSyncRequestTask.ConfigurationItems.ConfigurationItemCollection`2.CollectPublicProperties(IConfigurationDataAccessor dataAccessor)
       at Microsoft.Mom.ConfigService.Engine.ConfigurationEngine.CommunicationHelper.StateSyncRequestTask.ConfigurationItems..ctor(StateContext stateContext, IConfigurationDataAccessor dataAccessor)
       at Microsoft.Mom.ConfigService.Engine.ConfigurationEngine.CommunicationHelper.StateSyncRequestTask.CreateResponse(Managers managers)
       at Microsoft.Mom.ConfigService.Engine.ConfigurationEngine.Managers.Synchronize(OnDoSynchronizedWork onDoSynchronizedWork)
       at Microsoft.Mom.ConfigService.Engine.ConfigurationEngine.CommunicationHelper.StateSyncRequestTask.Execute(Managers managers)
       at Microsoft.EnterpriseManagement.Mom.DataAccess.SqlConnectionHandler.Open(SqlConnection sqlConnection, RetryPolicy retryPolicy, DatabaseConnection databaseConnection)
       at Microsoft.EnterpriseManagement.Mom.DataAccess.DatabaseConnection.Open()
       at Microsoft.EnterpriseManagement.Mom.DataAccess.QueryRequest.Execute(SqlNotificationRequest sqlNotificationRequest)
       at Microsoft.Mom.ConfigService.OpsMgrDataAccess.ConfigurationDataAccessor.QueryInstanceProperties(ReadOnlyCollection`1 instances)
       at Microsoft.Mom.ConfigService.DataAccess.DatabaseAccessor.QueryInstanceProperties(ReadOnlyCollection`1 instances)
       at Microsoft.Mom.ConfigService.Engine.ConfigurationEngine.CommunicationHelper.StateSyncRequestTask.ConfigurationItems.Instances.CollectPublicProperties(ReadOnlyCollection`1 identities, IConfigurationDataAccessor dataAccessor)
       at Microsoft.Mom.ConfigService.Engine.ConfigurationEngine.CommunicationHelper.StateSyncRequestTask.ConfigurationItems.ConfigurationItemCollection`2.CollectPublicProperties(IConfigurationDataAccessor dataAccessor)
       at Microsoft.Mom.ConfigService.Engine.ConfigurationEngine.CommunicationHelper.StateSyncRequestTask.ConfigurationItems..ctor(StateContext stateContext, IConfigurationDataAccessor dataAccessor)
       at Microsoft.Mom.ConfigService.Engine.ConfigurationEngine.CommunicationHelper.StateSyncRequestTask.CreateResponse(Managers managers)
       at Microsoft.Mom.ConfigService.Engine.ConfigurationEngine.Managers.Synchronize(OnDoSynchronizedWork onDoSynchronizedWork)
       at Microsoft.Mom.ConfigService.Engine.ConfigurationEngine.CommunicationHelper.StateSyncRequestTask.Execute(Managers managers)
       at Microsoft.EnterpriseManagement.Mom.DataAccess.SqlConnectionHandler.Open(SqlConnection sqlConnection, RetryPolicy retryPolicy, DatabaseConnection databaseConnection)
       at Microsoft.EnterpriseManagement.Mom.DataAccess.DatabaseConnection.Open()
       at Microsoft.EnterpriseManagement.Mom.DataAccess.QueryRequest.Execute(SqlNotificationRequest sqlNotificationRequest)
       at Microsoft.Mom.ConfigService.OpsMgrDataAccess.ConfigurationDataAccessor.QueryInstanceProperties(ReadOnlyCollection`1 instances)
       at Microsoft.Mom.ConfigService.DataAccess.DatabaseAccessor.QueryInstanceProperties(ReadOnlyCollection`1 instances)
       at Microsoft.Mom.ConfigService.Engine.ConfigurationEngine.CommunicationHelper.StateSyncRequestTask.ConfigurationItems.Instances.CollectPublicProperties(ReadOnlyCollection`1 identities, IConfigurationDataAccessor dataAccessor)
       at Microsoft.Mom.ConfigService.Engine.ConfigurationEngine.CommunicationHelper.StateSyncRequestTask.ConfigurationItems.ConfigurationItemCollection`2.CollectPublicProperties(IConfigurationDataAccessor dataAccessor)
       at Microsoft.Mom.ConfigService.Engine.ConfigurationEngine.CommunicationHelper.StateSyncRequestTask.ConfigurationItems..ctor(StateContext stateContext, IConfigurationDataAccessor dataAccessor)
       at Microsoft.Mom.ConfigService.Engine.ConfigurationEngine.CommunicationHelper.StateSyncRequestTask.CreateResponse(Managers managers)
       at Microsoft.Mom.ConfigService.Engine.ConfigurationEngine.Managers.Synchronize(OnDoSynchronizedWork onDoSynchronizedWork)
       at Microsoft.Mom.ConfigService.Engine.ConfigurationEngine.CommunicationHelper.StateSyncRequestTask.Execute(Managers managers)
       at Microsoft.EnterpriseManagement.Mom.DataAccess.SqlConnectionHandler.Open(SqlConnection sqlConnection, RetryPolicy retryPolicy, DatabaseConnection databaseConnection)
       at Microsoft.EnterpriseManagement.Mom.DataAccess.DatabaseConnection.Open()
       at Microsoft.EnterpriseManagement.Mom.DataAccess.DatabaseConnection.Open()
       at Microsoft.EnterpriseManagement.Mom.DataAccess.QueryRequest.Execute(SqlNotificationRequest sqlNotificationRequest)
       at Microsoft.Mom.ConfigService.OpsMgrDataAccess.ConfigurationDataAccessor.QueryInstanceProperties(ReadOnlyCollection`1 instances)
       at Microsoft.EnterpriseManagement.Mom.DataAccess.QueryRequest.Execute(SqlNotificationRequest sqlNotificationRequest)
       at Microsoft.Mom.ConfigService.DataAccess.DatabaseAccessor.QueryInstanceProperties(ReadOnlyCollection`1 instances)
       at Microsoft.Mom.ConfigService.Engine.ConfigurationEngine.CommunicationHelper.StateSyncRequestTask.ConfigurationItems.Instances.CollectPublicProperties(ReadOnlyCollection`1 identities, IConfigurationDataAccessor dataAccessor)
       at Microsoft.Mom.ConfigService.Engine.ConfigurationEngine.CommunicationHelper.StateSyncRequestTask.ConfigurationItems.ConfigurationItemCollection`2.CollectPublicProperties(IConfigurationDataAccessor dataAccessor)
       at Microsoft.Mom.ConfigService.Engine.ConfigurationEngine.CommunicationHelper.StateSyncRequestTask.ConfigurationItems..ctor(StateContext stateContext, IConfigurationDataAccessor dataAccessor)
       at Microsoft.Mom.ConfigService.DataAccess.DatabaseAccessor.QueryInstanceProperties(ReadOnlyCollection`1 instances)
       at Microsoft.Mom.ConfigService.Engine.ConfigurationEngine.CommunicationHelper.StateSyncRequestTask.CreateResponse(Managers managers)
       at Microsoft.Mom.ConfigService.Engine.ConfigurationEngine.CommunicationHelper.StateSyncRequestTask.ConfigurationItems.Instances.CollectPublicProperties(ReadOnlyCollection`1 identities, IConfigurationDataAccessor dataAccessor)
       at Microsoft.Mom.ConfigService.Engine.ConfigurationEngine.CommunicationHelper.StateSyncRequestTask.Execute(Managers managers)
       at Microsoft.Mom.ConfigService.Engine.ConfigurationEngine.CommunicationHelper.StateSyncRequestTask.Run(Guid source, String cookie, Managers managers, IConfigurationDataAccessor dataAccessor, Stream stream, IConnection connection)
       at Microsoft.Mom.ConfigService.Engine.ConfigurationEngine.CommunicationHelper.StateSyncRequestTask.ConfigurationItems.ConfigurationItemCollection`2.CollectPublicProperties(IConfigurationDataAccessor dataAccessor)
       at Microsoft.Mom.ConfigService.Engine.ConfigurationEngine.CommunicationHelper.StateSyncRequestTask.ConfigurationItems..ctor(StateContext stateContext, IConfigurationDataAccessor dataAccessor)
       at Microsoft.Mom.ConfigService.Engine.ConfigurationEngine.CommunicationHelper.StateSyncRequestTask.CreateResponse(Managers managers)
       at Microsoft.Mom.ConfigService.Engine.ConfigurationEngine.Managers.Synchronize(OnDoSynchronizedWork onDoSynchronizedWork)
       at Microsoft.Mom.ConfigService.Engine.ConfigurationEngine.CommunicationHelper.StateSyncRequestTask.Execute(Managers managers)
       at Microsoft.EnterpriseManagement.Mom.DataAccess.SqlConnectionHandler.Open(SqlConnection sqlConnection, RetryPolicy retryPolicy, DatabaseConnection databaseConnection)
       at Microsoft.EnterpriseManagement.Mom.DataAccess.DatabaseConnection.Open()
       at Microsoft.EnterpriseManagement.Mom.DataAccess.QueryRequest.Execute(SqlNotificationRequest sqlNotificationRequest)
       at Microsoft.Mom.ConfigService.OpsMgrDataAccess.ConfigurationDataAccessor.QueryInstanceProperties(ReadOnlyCollection`1 instances)
       at Microsoft.EnterpriseManagement.Mom.DataAccess.SqlConnectionHandler.Open(SqlConnection sqlConnection, RetryPolicy retryPolicy, DatabaseConnection databaseConnection)
       at Microsoft.Mom.ConfigService.Engine.ConfigurationEngine.CommunicationHelper.StateSyncRequestTask.ConfigurationItems.ConfigurationItemCollection`2.CollectPublicProperties(IConfigurationDataAccessor dataAccessor)
       at Microsoft.Mom.ConfigService.Engine.ConfigurationEngine.CommunicationHelper.StateSyncRequestTask.ConfigurationItems..ctor(StateContext stateContext, IConfigurationDataAccessor dataAccessor)
       at Microsoft.EnterpriseManagement.Mom.DataAccess.DatabaseConnection.Open()
       at Microsoft.EnterpriseManagement.Mom.DataAccess.QueryRequest.Execute(SqlNotificationRequest sqlNotificationRequest)
       at Microsoft.Mom.ConfigService.OpsMgrDataAccess.ConfigurationDataAccessor.QueryInstanceProperties(ReadOnlyCollection`1 instances)
       at Microsoft.Mom.ConfigService.DataAccess.DatabaseAccessor.QueryInstanceProperties(ReadOnlyCollection`1 instances)
       at Microsoft.Mom.ConfigService.Engine.ConfigurationEngine.CommunicationHelper.StateSyncRequestTask.ConfigurationItems.Instances.CollectPublicProperties(ReadOnlyCollection`1 identities, IConfigurationDataAccessor dataAccessor)
       at Microsoft.Mom.ConfigService.Engine.ConfigurationEngine.CommunicationHelper.StateSyncRequestTask.ConfigurationItems.ConfigurationItemCollection`2.CollectPublicProperties(IConfigurationDataAccessor dataAccessor)
       at Microsoft.Mom.ConfigService.Engine.ConfigurationEngine.Managers.Synchronize(OnDoSynchronizedWork onDoSynchronizedWork)
       at Microsoft.Mom.ConfigService.Engine.ConfigurationEngine.CommunicationHelper.StateSyncRequestTask.ConfigurationItems..ctor(StateContext stateContext, IConfigurationDataAccessor dataAccessor)
       at Microsoft.Mom.ConfigService.Engine.ConfigurationEngine.CommunicationHelper.StateSyncRequestTask.Execute(Managers managers)
       at Microsoft.Mom.ConfigService.Engine.ConfigurationEngine.CommunicationHelper.StateSyncRequestTask.CreateResponse(Managers managers)
       at Microsoft.Mom.ConfigService.Engine.ConfigurationEngine.Managers.Synchronize(OnDoSynchronizedWork onDoSynchronizedWork)
       at Microsoft.Mom.ConfigService.Engine.ConfigurationEngine.CommunicationHelper.StateSyncRequestTask.Run(Guid source, String cookie, Managers managers, IConfigurationDataAccessor dataAccessor, Stream stream, IConnection connection)
       at Microsoft.Mom.ConfigService.Engine.ConfigurationEngine.CommunicationHelper.StateSyncRequestTask.Run(Guid source, String cookie, Managers managers, IConfigurationDataAccessor dataAccessor, Stream stream, IConnection connection)".

    Hi,
    I would like to suggest you reset the SDK account password (in this case, it seems like that the account is 'scomsdk'). And change the password for the account in service configuration.
    Please go through the below article for details:
    How to change the credentials for the SDK Service and for the Config Service in Microsoft System Center Operations Manager
    http://support.microsoft.com/kb/936220/en-us
    Regards,
    Yan Li
    Regards, Yan Li

  • System.Data.SqlClient.SqlException: Cannot open database "MSCRM_CONFIG" requested by the login. The login failed. Login failed for user 'NT AUTHORITY\SYSTEM

    Dear ALL 
    After successfully shifting the CRM from 2011 to 2013 i found a problem in Reporting section none of the report is working after some finding i conclude that MSCRM_FetchDataSource is not able to connect successfully 
    Through my report manager i tried to test the connection of MSCRM_FetchDataSource but i got the following error 
    System.Data.SqlClient.SqlException: Cannot open database "MSCRM_CONFIG" requested by the login. The login failed. Login failed for
    user 'NT AUTHORITY\SYSTEM'. 
    I already add the NT Authority \ System as a db_owner under my database user of MSCRM_CONFIG
    But still no success any one have any idea why it's happaning 
    Regards 
    RB

    I found a solution I hope my post will help other
    I gave the  db_owner to 'NT AUTHORITY\SYSTEM' and 'NT AUTHORITY\NETWORK' and assigned with both CRM and Config database
    It resolved my issue
    RB

  • Running Product Config Wizard on WFE throws Exception: System.Data.SqlClient.SqlException:

    When I tried to kick off PSConfig on WFE, I receive the following error:
    Task upgradebootstrap has failed with an unknown exception
    <o:p></o:p>
    Exception: System.Data.SqlClient.SqlException: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The
    server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
    I was able to test that I'm able to connect to Database from the WFE by creating a udl file.
    Made sure that Named pipes and tcp/ip is enabled on the SQL server...
    Any help would be greatly appreciated.
    Thanks

    Create an inbound rule in windows firewall to enable port 1433. Otherwise you will not be able to connect to SQL from SharePoint farm.
    http://blogs.technet.com/b/wbaer/archive/2011/09/02/sharepoint-2010-and-windows-firewall-with-advanced-security.aspx
    http://technet.microsoft.com/en-us/library/ff607733(v=office.15).aspx
    Please mark the replies as answers if they help or unmark if not.

  • System.Data.SqlClient.SqlException (0x80131904): SQL Server detected a logical consistency-based I/O error: incorrect checksum

    Hello,
    I am migrating client's database to my hosted environment, the client runs
    SQL Server 2008 R2, and we run SQL Server 2014.
    I am stuck on restoring one log file, which left below error message when I restore it:
    Restoring files
      DBFile_20150401030954.trn
    Error Message: System.Data.SqlClient.SqlException (0x80131904): SQL Server detec
    ted a logical consistency-based I/O error: incorrect checksum (expected: 0x512cb
    ec3; actual: 0x512dbec3). It occurred during a read of page (1:827731)
    in databa
    se ID 49 at offset 0x000001942a6000 in file 'F:\MSSQL12.INSTANCE9\MSSQL\Data\Ody
    sseyTSIAKL_Data.mdf'.  Additional messages in the SQL Server error log or system
     event log may provide more detail. This is a severe error condition that threat
    ens database integrity and must be corrected immediately. Complete a full databa
    se consistency check (DBCC CHECKDB). This error can be caused by many factors; f
    or more information, see SQL Server Books Online.
    RESTORE LOG is terminating abnormally.
       at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolea
    n breakConnection, Action`1 wrapCloseInAction)
       at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception
    , Boolean breakConnection, Action`1 wrapCloseInAction)
       at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObj
    ect stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
       at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand
     cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler,
    TdsParserStateObject stateObj, Boolean& dataReady)
       at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
       at System.Data.SqlClient.SqlDataReader.get_MetaData()
       at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, Run
    Behavior runBehavior, String resetOptionsString)
       at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBe
    havior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 time
    out, Task& task, Boolean asyncWrite, SqlDataReader ds)
       at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehav
    ior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletio
    nSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite)
       at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehav
    ior, RunBehavior runBehavior, Boolean returnStream, String method)
       at System.Data.SqlClient.SqlCommand.ExecuteScalar()
       at OnBoardingTrnRestore.FileRestorer.FileIsRestored(SqlConnection connection,
     String sourceBackupFileName, String sourceDatabaseName, String destinationDatab
    aseName, String databaseName, String strFileName) in c:\Dev\WiseCloud\OnBoarding
    TrnRestore\OnBoardingTrnRestore\FileRestorer.cs:line 223
    ClientConnectionId:6f583f98-9c23-4936-af45-0d7e9a9949ea
    Finished
    I have run restore filelistonly and verifyonly in both client and my box, and both worked well:
    XXX_Data D:\Program Files (x86)\XXX\Data\YYY_Data.mdf
    restore filelistonly:
    D PRIMARY
    70922469376 35184372080640
    1 0
    0 00000000-0000-0000-0000-000000000000
    0 0
    0 512 1
    NULL 279441000014839500242
    66CC6D17-575C-41E5-BB58-3FB4D33E288C
    0 1 NULL
    XXX_Log E:\Program Files (x86)\XXX\Log\YYY_Log.ldf
    L NULL
    31985762304 35184372080640
    2 0
    0 00000000-0000-0000-0000-000000000000
    0 0
    0 512 0
    NULL 0
    00000000-0000-0000-0000-000000000000 0
    1 NULL
    restore verifyonly:
    Attempting to restore this backup may encounter storage space problems. Subsequent messages will provide details.
    The path specified by "D:\Program Files (x86)\XXX\Data\YYY_Data.mdf" is not in a valid directory.
    Directory lookup for the file "E:\Program Files (x86)\XXX\Log\YYY_Log.ldf" failed with the operating system error 3(The system cannot find the path specified.).
    The backup set on file 1 is valid.
    Dbcc checkdb also confirmed there is no error in client sql server database.
    dbcc checkdb (XXX, NOINDEX) 
    Results as follows:
    DBCC results for 'XXX'.
    Warning: NO_INDEX option of checkdb being used. Checks on non-system indexes will be skipped.
    Service Broker Msg 9675, State 1: Message Types analyzed: 17.
    Service Broker Msg 9676, State 1: Service Contracts analyzed: 9.
    Service Broker Msg 9667, State 1: Services analyzed: 7.
    Service Broker Msg 9668, State 1: Service Queues analyzed: 7.
    Service Broker Msg 9669, State 1: Conversation Endpoints analyzed: 0.
    Service Broker Msg 9674, State 1: Conversation Groups analyzed: 0.
    Service Broker Msg 9670, State 1: Remote Service Bindings analyzed: 0.
    Service Broker Msg 9605, State 1: Conversation Priorities analyzed: 0.
    DBCC results for 'sys.sysrscols'.
    There are 23808 rows in 350 pages for object "sys.sysrscols".
    DBCC results for 'BMBoard'.
    There are 0 rows in 0 pages for object "BMBoard".
    DBCC results for 'CusOutturnHeader'.
    There are 0 rows in 0 pages for object "CusOutturnHeader".
    CHECKDB found 0 allocation errors and 0 consistency errors in database 'XXX'.
    DBCC execution completed. If DBCC printed error messages, contact your system administrator.
    We use ftp to transfer the log files from the another country to here, I confirmed the file's MD5(checksum) is same as the copy in client's environment, we have tried to upload the file a couple of times, same outcome.
    The full backup is fine, I have successfully restored a series log backups prior to this file.
    Has anyone seen this issue before? It is strange, all information indicates the file is good,but somehow it goes wrong.
    Below are the version details:
    Client: 
    MICROSOFT SQL SERVER 2008 R2 (SP2) - 10.50.4000.0 (X64) 
    My environment:
    Microsoft SQL Server 2014 - 12.0.2480.0 (X64) 
    Jan 28 2015 18:53:20 
    Copyright (c) Microsoft Corporation
    Enterprise Edition (64-bit) on Windows NT 6.3 <X64> (Build 9600: )
    Thanks,
    Albert

    Error Message: System.Data.SqlClient.SqlException (0x80131904): SQL Server detec
    ted a logical consistency-based I/O error: incorrect checksum (expected: 0x512cb
    ec3; actual: 0x512dbec3). It occurred during a read of page (1:827731)
    in databa
    se ID 49 at offset 0x000001942a6000 in file 'F:\MSSQL12.INSTANCE9\MSSQL\Data\Ody
    sseyTSIAKL_Data.mdf'.  Additional messages in the SQL Server error log or system
     event log may provide more detail. This is a severe error condition that threat
    ens database integrity and must be corrected immediately.
    Hi Albert,
    The above error message usually indicates that there is a problem with underlying storage system or the hardware or a driver that is in the path of the I/O request. You can encounter this error when there are inconsistencies in the file system or if the database
    file is damaged.
    Besides other suggestions, consider to use the
    SQLIOSim utility to find out if these errors can be reproduced outside of regular SQL Server I/O requests and change
    your databases to use the PAGE_VERIFY CHECKSUM option.
    Reference:
    http://support.microsoft.com/en-us/kb/2015756
    https://msdn.microsoft.com/en-us/library/aa337274.aspx?f=255&MSPPError=-2147217396
    Thanks,
    Lydia Zhang
    Lydia Zhang
    TechNet Community Support

  • What are all the features not supported in SQL Server 2012 trial version?

    What are all the features not supported in SQL Server 2012 trial version?

    The evaluation edition supports all features and expires after 180 days.
    https://msdn.microsoft.com/en-us/library/cc645993.aspx?f=255&MSPPError=-2147217396

  • SQL Server Usage Summary page, the count of user/device: does not show for SQL Server 2008

    Does MAP tool capture User Summary  (count of users, their details) for SQL Server 2008? 
    At my end, its working for SQL Server 2012 but not showing User Summary for SQL Server 2008..
    Does the User Summary only works for SQL Server 2008 Enterprise edition as one of the thread points out?

    This is from the
    Wiki article:
    SQL Server 2008 Enterprise and Datacenter Editions introduced audit event configuration for Windows security logging, which enabled SQL Server 2008 to log logon events to the Windows Security log. The table below shows which versions and editions have the Audit
    feature that is needed to record the logon events. MAP cannot obtain user and device access information for any other editions or any older versions of SQL Server.
    Datacenter
    Enterprise
    Business Intelligence
    Standard
    Workgroup
    Web
    Express
    SQL Server 2008
    N/A
    Yes
    N/A
    No
    No
    No
    No
    SQL Server 2008 R2
    Yes
    Yes
    N/A
    No
    No
    No
    No
    SQL Server 2012
    N/A
    Yes
    Yes
    Yes
    N/A
    Yes
    Yes
    Please remember to click "Mark as Answer" on the post that helps you, and to click
    "Unmark as Answer" if a marked post does not actually answer your question. Please
    VOTE as HELPFUL if the post helps you. This can be beneficial to other community members reading the thread.

  • The type initializer for 'System.Data.SqlClient.SqlConnection' threw an exception. InnerException: Requested registry access is not allowed.

    I have read some of the other posts for people that got this error, but none seem to apply to me.
    My program has been working for weeks.  I made some minor changes, and started getting the error (full details below).
    I did a TFS "undo pending changes" and still getting the same error, even after logging off.  The one odd thing is that I did change my Windows password this week. The connection string is using a SQL user id and password that has no issues.
    I'm an Admin own my own box (running WIn XP SP3).  I even tried "Run as Admin" on Visual Studio.
    I'm doing a Debug-Start, running a Console-Test-Program that calls a WCF service, which on local machine is hosted by "ASP.NET Development Server".
    We have two other developers, one has the same problem, one does not.  In theory, we have all done "get latest" and are running the same code.
    The SQL Connection is related to a trace database; we are using this library http://ukadcdiagnostics.codeplex.com which has worked fine for months.
    When I do "Start Run" in Visual Studio, I get this error:
    {"The type initializer for 'System.Data.SqlClient.SqlConnection' threw an exception. "}
    with InnerException: {"The type initializer for 'System.Data.SqlClient.SqlConnectionFactory' threw an exception."}
    and it has InnerException: {"Requested registry access is not allowed. "}
    Outmost StackTrace:
       at System.Data.SqlClient.SqlConnection..ctor()
       at System.Data.SqlClient.SqlConnection..ctor(String connectionString)
       at FRB.Diagnostics.Listeners.SqlDataAccessCommand..ctor(String connectionString, String commandText, CommandType commandType)
       at FRB.Diagnostics.Listeners.SqlDataAccessAdapter.CreateCommand()
       at FRB.Diagnostics.Listeners.SqlTraceListener.TraceEventCore(TraceEventCache eventCache, String source, TraceEventType eventType, Int32 id, String message)
       at FRB.Diagnostics.Listeners.CustomTraceListener.FilterTraceEventCore(TraceEventCache eventCache, String source, TraceEventType eventType, Int32 id, String message)
       at FRB.Diagnostics.Listeners.CustomTraceListener.TraceEvent(TraceEventCache eventCache, String source, TraceEventType eventType, Int32 id, String format, Object[] args)
       at System.Diagnostics.TraceSource.TraceEvent(TraceEventType eventType, Int32 id, String format, Object[] args)
       at System.Diagnostics.TraceSource.TraceInformation(String message)
       at FRB.EC.AdminService.AdminService.TestHelloWorldWithTrace(String name)
       at SyncInvokeTestHelloWorldWithTrace(Object , Object[] , Object[] )
       at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
       at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
    Second Inner StackTrace:
       at System.Data.SqlClient.SqlConnection..cctor()
    Third Inner StackTrace:
          at System.Data.SqlClient.SqlConnectionFactory..cctor()
    When I do "Run as Admin", I get this error:
    {"Could not load file or assembly 'FRB.EFDataAccess, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Access is denied. "}
    Server stack trace:
       at System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(Message reply, MessageFault fault, String action, MessageVersion version, FaultConverter faultConverter)
       at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
       at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
       at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
       at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
    Exception rethrown at [0]:
       at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
       at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
       at FRB.EC.AdminService.ConsoleTester.svcRef.IAdminService.GetDispositionStatusTypeList()
       at FRB.EC.AdminService.ConsoleTester.svcRef.AdminServiceClient.GetDispositionStatusTypeList() in C:\SourceEagleConnect\EagleConnect\Dev\WCFServices\FRB.EC.AdminService.ConsoleTester\Service References\svcRef\Reference.cs:line 2459
       at FRB.EC.AdminService.ConsoleTester.ConsoleProgram.GetDispositionStatusTypeList() in C:\SourceEagleConnect\EagleConnect\Dev\WCFServices\FRB.EC.AdminService.ConsoleTester\ConsoleProgram.cs:line 565
       at FRB.EC.AdminService.ConsoleTester.ConsoleProgram.ExecuteNewRelease103QueryMethods() in C:\SourceEagleConnect\EagleConnect\Dev\WCFServices\FRB.EC.AdminService.ConsoleTester\ConsoleProgram.cs:line 189
       at FRB.EC.AdminService.ConsoleTester.ConsoleProgram.Main(String[] args) in C:\SourceEagleConnect\EagleConnect\Dev\WCFServices\FRB.EC.AdminService.ConsoleTester\ConsoleProgram.cs:line 76
       at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
    I am also posting the web.config/app.config, but I would rather not focus on that since there were absolutely no changes to it between the time it was working and the time it began failing. 
    Client app.config
    <?xml version="1.0" encoding="utf-8" ?>
    <configuration>
      <connectionStrings>
      </connectionStrings>
      <system.serviceModel>
        <behaviors>
          <serviceBehaviors>
            <behavior name="ServiceBehavior">
              <serviceMetadata httpGetEnabled="true"/>
              <serviceDebug includeExceptionDetailInFaults="false"/>
              <serviceAuthorization impersonateCallerForAllOperations="true"/>
            </behavior>
          </serviceBehaviors>
          <endpointBehaviors>
            <behavior name="FRB.AllowImpersonate">
              <clientCredentials>
                <windows allowedImpersonationLevel="Impersonation"/>
              </clientCredentials>
            </behavior>
          </endpointBehaviors>
        </behaviors>
        <bindings>
          <wsHttpBinding>
            <binding name="WSHttpBinding_IAdminService" closeTimeout="00:01:00"
              openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
              bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
              maxBufferPoolSize="524288" maxReceivedMessageSize="5565536"
              messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true"
              allowCookies="false">
              <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
                maxBytesPerRead="4096" maxNameTableCharCount="16384" />
              <reliableSession ordered="true" inactivityTimeout="00:10:00"
                enabled="false" />
              <security mode="Message">
                <transport clientCredentialType="Windows" proxyCredentialType="None"
                  realm="" />
                <message clientCredentialType="Windows" negotiateServiceCredential="true"
                  algorithmSuite="Default" />
              </security>
            </binding>
          </wsHttpBinding>
        </bindings>
            <client>
                  <endpoint address="http://localhost:3588/AdminService.svc" binding="wsHttpBinding"
                        bindingConfiguration="WSHttpBinding_IAdminService" contract="svcRef.IAdminService"
                        name="WSHttpBinding_IAdminService">
                        <identity>
                              <dns value="localhost" />
                        </identity>
                  </endpoint>
            </client>
        </system.serviceModel>
    </configuration>
    web.config of WCF service:
      <?xml version="1.0"?>
    <configuration>
        <configSections>
        <section name="FRB.Diagnostics" type="FRB.Diagnostics.Configuration.UkadcDiagnosticsSection, FRB.Diagnostics"/>
      </configSections>
        <appSettings>
           <!-- whatever goes here -->
        </appSettings>
        <!-- connection string section -->
      <connectionStrings>
        <add name="log" connectionString="Data Source=myserver;Initial Catalog=ECWCFLOG_SharedDev;User ID=myuser;Password=mypass;MultipleActiveResultSets=True" providerName="System.Data.SqlClient"/>
        <add name="DBConn" connectionString="Data Source=myserver;Initial Catalog=ECData_SharedDev;User ID=myuser;Password=mypass;MultipleActiveResultSets=True" providerName="System.Data.SqlClient"/>
        <add name="EagleConnectEntities" connectionString="metadata=res://*/EagleConnect.csdl|res://*/EagleConnect.ssdl|res://*/EagleConnect.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=myserver;Initial
    Catalog=ECData_SharedDev;User ID=myuser;Password=mypass;MultipleActiveResultSets=True&quot;" providerName="System.Data.EntityClient"/>
      </connectionStrings>
        <!-- FRB.Diagnostics logging section -->
        <FRB.Diagnostics>
            <sqlTraceListeners>
                <sqlTraceListener name="sqlTraceListenerSettings"
                            connectionStringName="log"
                            commandText="INSERT INTO LogStore VALUES(@Source, @ActivityId, @ProcessId, @ThreadId, @EventType, @Message, @Timestamp)"
                            commandType="Text">
                    <parameters>
                        <parameter name="@Source" propertyToken="{Source}"/>
                        <parameter name="@ActivityId" propertyToken="{ActivityId}"/>
                        <parameter name="@ProcessId" propertyToken="{ProcessId}"/>
                        <parameter name="@ThreadId" propertyToken="{ThreadId}"/>
                        <parameter name="@EventType" propertyToken="{EventType}" callToString="true"/>
                        <parameter name="@Message" propertyToken="{Message}"/>
                        <parameter name="@Timestamp" propertyToken="{DateTime}"/>
              <!-- <parameter name="@UserId" propertyToken="{WindowsIdentity}"/> -->
            </parameters>
                </sqlTraceListener>
            </sqlTraceListeners>
            <smtpTraceListeners>
                <smtpTraceListener name="smtpTraceListenerSettings"
                             host="vssmtp"
                             port="25"
                             from="[email protected]"
                             to="[email protected]"
                             subject="AdminService Logging Event: {EventType}, {MachineName}"
                             body="{Message}&#xA;=======&#xA;Process={ProcessId},&#xA;Thread={ThreadId},&#xA;ActivityId={ActivityId}"/>
            </smtpTraceListeners>
        </FRB.Diagnostics>
        <!-- System.Diagnostics logging section -->
        <system.diagnostics>
            <sources>
                <source name="FRB.EC.AdminService" switchValue="All">
                    <listeners>
                        <clear/>
                        <add name="ods"/>
                        <add name="smtp"/>
                        <add name="sql"/>
                    </listeners>
                </source>
                <source name="System.ServiceModel" switchValue="Off" propagateActivity="true">
                    <listeners>
                        <add name="ignored" type="System.Diagnostics.ConsoleTraceListener"/>
                    </listeners>
                </source>
            </sources>
            <sharedListeners>
                <!-- OutputDebugStringTraceListener -->
                <add name="ods"
               type="FRB.Diagnostics.Listeners.OutputDebugStringTraceListener, FRB.Diagnostics"
               initializeData="{ActivityId}|{EventType}: {Message} - {DateTime}, Process={ProcessId}, Thread={ThreadId}"/>
                <!-- SqlTraceListener -->
                <add name="sql"
               type="FRB.Diagnostics.Listeners.SqlTraceListener, FRB.Diagnostics"
               initializeData="sqlTraceListenerSettings"
               traceOutputOptions="Timestamp"/>
                <!-- SmtpTraceListener -->
                <add name="smtp"
               type="FRB.Diagnostics.Listeners.SmtpTraceListener, FRB.Diagnostics"
               initializeData="smtpTraceListenerSettings">
                       <filter type="System.Diagnostics.EventTypeFilter"
                       initializeData="Error"/>
                </add>
            </sharedListeners>
            <trace autoflush="true"/>
        </system.diagnostics>
        <system.web>
        <compilation debug="true" targetFramework="4.0">
        </compilation>
            <roleManager enabled="true" defaultProvider="AspNetWindowsTokenRoleProvider"/>
        </system.web>
        <system.serviceModel>
            <services>
                <service name="FRB.EC.AdminService.AdminService"
                   behaviorConfiguration="FRB.EC.AdminService.AdminServiceBehavior">
                    <!-- Service Endpoints -->
                    <endpoint address="" binding="wsHttpBinding"
                      bindingConfiguration="wsHttpEndpointBinding"
                      contract="FRB.EC.AdminService.IAdminService">
                        <!--
                  Upon deployment, the following identity element should be removed or replaced to reflect the
                  identity under which the deployed service runs. 
                  If removed, WCF will infer an appropriate identity automatically.
              -->
                        <identity>
                            <dns value="localhost"/>
                        </identity>
                    </endpoint>
                    <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
                </service>
            </services>
            <bindings>
                <wsHttpBinding>
                    <binding name="wsHttpEndpointBinding"
                     maxBufferPoolSize="2147483647"
                     maxReceivedMessageSize="500000000">
                        <readerQuotas maxDepth="2147483647"
                            maxStringContentLength="2147483647"
                            maxArrayLength="2147483647"
                            maxBytesPerRead="2147483647"
                            maxNameTableCharCount="2147483647"/>
                        <security>
                            <message clientCredentialType="Windows"/>
                        </security>
                    </binding>
                </wsHttpBinding>
            </bindings>
            <behaviors>
                <serviceBehaviors>
                    <behavior name="FRB.EC.AdminService.AdminServiceBehavior">
                        <!-- To avoid disclosing metadata information, set the value below to false and
                   remove the metadata endpoint above before deployment -->
                        <serviceMetadata httpGetEnabled="true"/>
                        <!-- To receive exception details in faults for debugging purposes, set the value below to true. 
                   Set to false before deployment to avoid disclosing exception information -->
                        <serviceDebug includeExceptionDetailInFaults="true"/>
                        <serviceCredentials>
                        </serviceCredentials>
                        <!--<serviceAuthorization principalPermissionMode="UseAspNetRoles"
                    roleProviderName="AspNetWindowsTokenRoleProvider"/>-->
                        <serviceAuthorization principalPermissionMode="UseWindowsGroups"
                                    impersonateCallerForAllOperations="true"/>
                    </behavior>
                    <behavior name="FRB.EC.AdminService.IAdminServiceTransportBehavior">
                        <!-- To avoid disclosing metadata information, set the value below to false and
                   remove the metadata endpoint above before deployment -->
                        <serviceMetadata httpGetEnabled="true"/>
                        <!-- To receive exception details in faults for debugging purposes, set the value below to true. 
                   Set to false before deployment to avoid disclosing exception information -->
                        <serviceDebug includeExceptionDetailInFaults="false"/>
                        <serviceCredentials>
                            <clientCertificate>
                                <authentication certificateValidationMode="PeerTrust"/>
                                <!--<authentication certificateValidationMode="Custom" customCertificateValidatorType="DataFactionServices.FRBX509CertificateValidator"/>-->
                            </clientCertificate>
                            <serviceCertificate findValue="WCfServer"
                                    storeLocation="LocalMachine"
                                    storeName="My" x509FindType="FindBySubjectName"/>
                        </serviceCredentials>
                    </behavior>
                </serviceBehaviors>
            </behaviors>
            <serviceHostingEnvironment multipleSiteBindingsEnabled="true"/>
        </system.serviceModel>
        <system.webServer>
            <modules runAllManagedModulesForAllRequests="true"/>
        </system.webServer>
    </configuration>
    Thanks for any help.
    Neal

    I think I found it... this is sure a strange error for what is really happening.
    Apparently it had happened to me before, and fortuantely, I actually added the following comment:
                // Above is related to the WCFLOG SQL Diagnostics Trace 
                // If you get error here an inner exception "requested registry access is not allowed"
                // inside exception "type initializer for System.Data.SqlClient.SqlConnection"
                // then make sure you have impersonation enabled in your client.
                // See AdminConsole web.config or FRB.EC.AdminService.ConsoleTester.app.config for examples
    Now I think I will do a try catch and spit out the same text.
    Still testing to assure that this really was the issue.
          <endpointBehaviors>
            <behavior name="FRB.AllowImpersonate ">
              <clientCredentials>
                <windows allowedImpersonationLevel="Impersonation"/>
              </clientCredentials>
            </behavior>
          </endpointBehaviors>
    The line below in BOLD below is what somehow seemed to disappear from my app.config - probably due to a TFS human error - still checking that also:
            <client>
                  <endpoint address="http://localhost:4998/AdminService.svc"
                                  behaviorConfiguration="FRB.AllowImpersonate"
                                  binding="wsHttpBinding"
                                  bindingConfiguration="WSHttpBinding_IAdminService"
                                 contract="svcRef.IAdminService"
                            name="WSHttpBinding_IAdminService">
                        <identity>
                              <dns value="localhost" />
                        </identity>
                  </endpoint>
            </client>
    Here's how I "idiot-proofed" this error for now, to give an error that actually at least points to a solution:
            public SqlDataAccessCommand(string connectionString, string commandText, CommandType commandType)
                try
                    _connection = new SqlConnection(connectionString);
                    // Above is related to the WCFLOG SQL Diagnostics Trace  
                    // If you get error here an inner exception "requested registry access is not allowed"
                    // inside exception "type initializer for System.Data.SqlClient.SqlConnection"
                    // then make sure you have impersonation enabled in your client.
                    // See AdminConsole web.config or FRB.EC.AdminService.ConsoleTester.app.config for examples
                catch (Exception ex)
                    if (ex.ToString().Contains("The type initializer for"))
                    throw new System.ApplicationException(@"
                    Your client app <endpoint> must be cofigured have a
                  'behaviorConfiguration' attribute like this:
                    behaviorConfiguration='FRB.AllowImpersonate'
                   that points back to a behavior that has this syntax:         
              <behavior name='FRB.AllowImpersonate'>
                 <clientCredentials>
                     <windows allowedImpersonationLevel='Impersonation'/>
                 </clientCredentials>
              </behavior>
              ", ex);
                   else
                        throw ex;
                _command = _connection.CreateCommand();
                _command.CommandText = commandText;
                _command.CommandType = commandType;
                // TODO _command.CommandTimeout = ;
    Neal

  • Error: Request for the permission of type 'System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed

    SharePoint 2010 -
    I have created a console utility that further calls the stsadm.exe to Export sites from one site collection in a DB to another site collection in another DB of the same web application.
    Export works fine. But during Import, I get the following errors
    [ListItem] [Admin] Progress: Importing
    [ListItem] [Admin]   Verbose: List URL: /pwa1/GTR/7 GTR  Programme
    [ListItem] [Hol plans.xls] Progress: Importing
    [ListItem] [Hol plans.xls]   Verbose: List URL: /pwa1/GTR/7 GTR  Programme
    [ListItem] [Time.doc] Progress: Importing
    [ListItem] [Time.doc]   Verbose: List URL: /pwa1/GTR/7 GTR  Programme
    [ListItem] [AP Docs] Progress: Importing
    [ListItem] [AP Docs]   Verbose: List URL: /pwa1/GTR/7 GTR  Programme
    [ListItem] [Update - June 27th.pdf] Progress: Importing
    [ListItem] [Update - June 27th.pdf]   Verbose: List URL: /pwa1/GTR/7 GTR  Programme
    [ListItem] [Update - June 27th.pdf]   Error: Request for the permission of type 'System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
    [ListItem] [Update - June 27th.pdf]   Error: Request for the permission of type 'System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
    [ListItem] [Update - June 27th.pdf]   Error: Request for the permission of type 'System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
    FatalError: Request for the permission of type 'System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
    Progress: Import did not complete.
    1. Does the console application treated as a Sandbox Solution?
    2. Do I need to configure CAS policy in wss_usercode.config? and what?
    3. What else could be configured to make this work?
    I have tried adding the following in wss_custom_minimaltrust.config but no avail.
    <SecurityClass Name="SqlClientPermission" Description="System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>           
    and
    <PermissionSet
                        class="NamedPermissionSet"
                        version="1"
                        Name="SPRestricted">
    <IPermission
                          class="SqlClientPermission"
                          version="1"
                          Unrestricted="true"
                                />   
    <!-- Other IPermission -->
    </PermissionSet>
    UPDATE: It has been observed that the issue is intermittent. That is, sometimes the import works fine (event without any configuration of SqlClientPermission in any config file) but sometimes it gives the above error. I'm stuck!
    Regards, Amit Gupta

    Hi,
    According to your post, my understanding is that you get Error “Request for the permission of type 'System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed
    Simple solution is to change the trust the trust level to FULL: <trust   level="[Full]"    originUrl="URL" />
    In addition, you can modify the wss_mediumtrust.config and wss_minimaltrust.config file under the path “C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\CONFIG”.
    For more information, you can refer to:
    http://blogs.msdn.com/b/navdeepm/archive/2010/02/19/system-security-securityexception-request-for-the-permission-of-type-system-data-sqlclient-sqlclientpermission-system-data-version-2-0-0-0-culture-neutral-publickeytoken-b77a5c561934e089-failed.aspx
    http://www.fewlines4biju.com/2011/01/request-for-permission-of-type_18.html
    http://techsolutions-at-desk.blogspot.com/2011/08/request-for-permission-of-type.html
    Thanks,
    Linda Li                
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Linda Li
    TechNet Community Support

  • Request for the permission of type 'System.Data.SqlClient.SqlClientPermission, System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

    Hi Friends,
          Request for the permission of type System.Data.SqlClient.SqlClientPermission  System.Data  Version 1.0.5000.0  Culture neutral  .This error is recieving when ever i tried to use the sql connection (with Visual
    studio C#)  in sharepoint portal installed application.
    Please help me if any answers for the issue.

    Hi,
    Open wss_mediumtrust.config & wss_minimaltrust.config. SharePoint 2013(C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\config\).
    Find in wss_mediumtrust.config:
    <SecurityClass
     Name="SqlClientPermission"
     Description="System.Data.SqlClient.SqlClientPermis sion, System.Data,
     Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
    Copy and paste it in to the <SecurityClasses> node of wss_minimaltrust.config.
    In the PermissionSet section of this configuration file, add the following:
    Find in wss_mediumtrust.config:
    <IPermission class="SqlClientPermission" version="1" Unrestricted="true"/>
    Copy and paste it in to the a <PermissionSet> node of wss_minimaltrust.config.
    Here is a similar thread for your reference:
    https://social.msdn.microsoft.com/Forums/en-US/a1c8f2bf-2575-40b4-87f1-4f98462b3234/request-for-the-permission-of-type-systemdatasqlclientsqlclientpermission-systemdata-version?forum=tfssetup
    Best Regards
    Dennis Guo
    TechNet Community Support

  • SSRS Database Configuration Manager Error - Could not connect to server: The type initializer for 'System.Data.SqlClient.SqlConnection' threw an exception

    I'm Getting the "Could not connect to server: The type initializer for 'System.Data.SqlClient.SqlConnection' threw an exception" Error on an existing Instance of SSRS that had been working previously (lots of installs/patches since).
    Any time I try to hit the "Test Connection" button on existing connections or create new ones from the SSRS Config Mgr., it throws that error.
    I know the SQL Server connectivity works (I have SSMS installed on there and can cut and paste server Login to connect). The problem is I can't really get any more details on the error...Event Viewer isn't logging anything, I have upped the trace level
    to 4 in the reportingservicesservice.config file, I have even watched it with procmon and nothing obvious pops up.
    Let me know if anyone else has been down this path and what they have tried.

    Hi BillOlive,
    Based on my research, the issue may be related to user access permission. You can refer to the following method to troubleshooting the issue:
    Open C:\Windows\Microsoft.NET\Framework\v2.0.50727\CONFIG folder | right click on the machine.config file | Properties | Security | make sure your domain account has FULL CONTROL permission on this file.
    If above steps still do not work, please backup your machine.config file to somewhere else and replace with the attached one from my Windows Server 2008 environment.
    Alternatively, app.config file also may cause the same issue. There is a similar issue, you can refer to it.
    http://stackoverflow.com/questions/6922879/exception-type-initializer-for-system-data-sqlclient-sqlconnection
    Hope this helps.
    Regards,
    Alisa Tang
    If you have any feedback on our support, please click
    here.
    Alisa Tang
    TechNet Community Support

  • System.Data.SqlClient.SqlClientPermission Fail SSRS

    Hi,
    I created a custom dll to be used in reporting services.
    In this custom dll I have a method that will querying a database and return values that I will use as parameters for my report, something like,
    My report is expecting a division as parameter and as default value I set this expression
    "= CustomDLL.ClassName.GetDivision(User!UserID)",
    Inside the function I have something like this
    "Select division from UserDivisions where UserID = @functionParameter"
    I tried the dll and everything works fine but when I use it either in Report Builder or Report Designer (BI) it fire me with this error.
    System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
    Some people suggest to make some changes in rspolicy.config file to pass this error, I have try all that without result,
    One more thing I have Form Authentication in my SSRS.
    Thanks in advance.

    Hello...I have been struggling with CAS permissions on my custom assembly for many days.
    What I don't understand in this answer is What is the link between the NamedPermissionSet : MyDllPermission
    and the CodeGroup: MyDllGroupCode
    I would have thought that you are referencing the Named Permission set in the CodeGroup, so surely it
    should read:
    <CodeGroup class="UnionCodeGroup"
                                    version="1"
                                    PermissionSetName="MyPermissionSet"
                                    Name="MyDllGroupCode"
                                    Description="">
    Thanks.

  • Cannot implicitly convert type 'System.Data.SqlClient.SqlDataReader' to 'Microsoft.ReportingServices.DataProcessing.IDataReader'. An explicit conversion exists (are you missing a cast?)

    Cannot implicitly convert type 'System.Data.SqlClient.SqlDataReader' to 'Microsoft.ReportingServices.DataProcessing.IDataReader'. An explicit conversion exists (are you missing a cast?)
    I am getting the above error in c#. Please help me. Thanks in advance
    public IDataReader ExecuteReader(CommandBehavior behavior)
    string query = "select * from Sales.Store";
    SqlConnection readerconn = new SqlConnection("Data Source=localhost;Initial Catalog=AdventureWorks2000;Integrated Security=SSPI");
    SqlCommand readercmd = new SqlCommand(query);
    try
    readerconn.Open();
    readercmd = readerconn.CreateCommand();
    readercmd.CommandText = query;
    readercmd.CommandType = System.Data.CommandType.Text;
    SqlDataReader TestReader = readercmd.ExecuteReader();
    return TestReader; //Getting error at this line
    readerconn.Close();
    catch (Exception e)
    throw new Exception(e.Message);

    Hi,
    Please firstly take a look at the documentation:
    IDbCommand.ExecuteReader
    Method
    Users do not create an   instance of a
    DataReader   class directly. Instead, they obtain the
    DataReader   through the
    ExecuteReader   method of the Command   object. Therefore, you should mark
    DataReader   constructors as internal.
    You need to use this method to get the IDataReader object, all the IDbCommand and IDataReader are in the Microsoft.ReportingServices.DataProcessing namespace. There's another IDataReader object which is in System.Data namespace, but they're actually two different
    objects, that's why you got the exception.
    For how to properly implement this Microsoft.ReportingServices.DataProcessing.IDataReader, please check this documentation:
    Implementing a DataReader Class for a Data Processing Extension
    It also provides code samples there.
    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.

  • Config sync:error: Folder is no longer part of the system data source or the folder not found

    This is the message I am getting when i try to configure synchronization through intellisync in all functions.  Any ideas?
    Folder is no longer part of the system data source or the folder not found
    JT

    jtwilcox wrote:
    Mail account is MAPI
    XP
    Outlook 2007
    thanks for your help so far!
    JT
    Hi...
    Based upon the folder error, my guess is the Desktop Manager is having difficulty determining your default mail client. I am not sure why but it is easy enough to redo a profile in Outlook just to test this. (Control Panel / Mail)
    Of course, I would backup my PST file prior to doing this and then create a new profile and import the PST file into the new profile. Once the profile is running and tested ok, I would again go to the Control Panel / Mail and set the default profile to point to the newly created profile. Then run the Desktop Manager and see what happens....
    H.
    +++++++++++++++++++++++++++++++++++++++++++++++++
    If successful in helping you, please give me kudos in my post.
    Please mark the post that solved it for you!
    Thank you!
    Best Regards
    hmeister

Maybe you are looking for