Quantcast
Channel: Forum SQL Server Database Engine
Viewing all 15889 articles
Browse latest View live

SQL Server 2012 Error In Installation : Could Not Find Database Engine Startup Handle Error During installation

$
0
0

I'm getting an error while installing SQL Server Standard edition 2012 sp1 in Windows Server 2012 R2.

Component name: SQL Server Database Engine Services Instance Features
Component error code: 0x851A001A
Error description:Wait on the Database Engine recovery handle failed. Check the SQL Server error log for potential causes.

I found a solution from technet for the same and it was not worked for me. 

According to that I have changed Database Engine & Agent Service Account to NT AUTHORITY\SYSTEM.

But I'm getting the same error Database Engine recovery handle failed.

I found the below exceptions in detail log file.

=============================

The server was unable to initialize encryption because of a problem with a security library. The security library may be missing. Verify that security.dll exists on the system.
Error: 17182, Severity: 16, State: 1.

TDSSNIClient initialization failed with error 0x139f, status code 0x80. Reason: Unable to initialize SSL support. The group or resource is not in the correct state to perform the requested operation. 
Error: 17182, Severity: 16, State: 1.

TDSSNIClient initialization failed with error 0x139f, status code 0x1. Reason: Initialization failed with an infrastructure error. Check for previous errors. The group or resource is not in the correct state to perform the requested operation. 
Error: 17826, Severity: 18, State: 3.

Could not start the network library because of an internal error in the network library. To determine the cause, review the errors immediately preceding this one in the error log.
Error: 17120, Severity: 16, State: 1.

SQL Server could not spawn FRunCommunicationsManager thread. Check the SQL Server error log and the Windows event logs for information about possible related problems.

So any one have faced the same issue or since I'm new to this your help will be much appreciated.

Thanks,

Isuru




Sql servr 2014 instant to sql server 2008 r2 instance linked servers query problem

$
0
0

I'm getting the following error  on some of the linked server,when I try to query a table using a link server. The link server is created on SQL2014 instance to connect to an SQL2008r2 instance. 

"

Msg 7313, Level 16, State 1, Line 2
An invalid schema or catalog was specified for the provider "SQLNCLI11" for linked server "LEK".

"

Error The locale (LCID) 8192 is not supported by SQL Server

$
0
0

Attempting to deploy a SSIS package and keep getting the above - register and windows account locales all set to en-US 0000409

and just reinstalled all SQL server components 

Help 

Regards 

Chris

TITLE: SQL Server Integration Services
------------------------------

A .NET Framework error occurred during execution of user-defined routine or aggregate "deploy_project_internal": 
System.Data.SqlClient.SqlException: The locale identifier (LCID) 8192 is not supported by SQL Server.
System.Data.SqlClient.SqlException: 
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.SqlInternalConnectionSmi.EventSink.DispatchMessages(Boolean ignoreNonFatalMessages)
   at System.Data.SqlClient.SqlDataReaderSmi.InternalNextResult(Boolean ignoreNonFatalMessages)
   at System.Data.SqlClient.SqlDataReaderSmi.NextResult()
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderSmi(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteScalar()
   at Microsoft.SqlServer.IntegrationServices.Server.ServerConnectionControl.GetServerProperty(String propertyName)
   at Microsoft.SqlServer.IntegrationServices.Server.ServerConnectionControl.GetSchemaVersion()
   at Microsoft.SqlServer.IntegrationServices.Server.ISServerExecArgumentBuilder.ToString()
   at Microsoft.SqlServer.IntegrationServices.Server.ServerApi.DeployProjectInternal(SqlInt64 deployId, SqlInt64 versionId, SqlInt64 projectId, SqlString projectName)
. (Microsoft SQL Server, Error: 6522)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&ProdVer=14.00.1000&EvtSrc=MSSQLServer&EvtID=6522&LinkId=20476

------------------------------
BUTTONS:

OK
------------------------------

 

Power Plan for SQL Server box - Configuration

$
0
0

hi

we have cloud VM installed SQL 2016 Ent sp2,  (replications & lot of triggers & main high used ProdcutionDB also there)

currently windows power plan is Balanced   , if i going to set this "high Performance" ,

system config attached below, 

how can i identify this power plan help after change to High performance? is this really required?

UNABLE TO SETUP MSSQL ON LINUX

$
0
0

After mssql-server package install trying to set up server.

it's failing with below message

Configuring SQL Server...

sqlservr: The configuration file '/var/opt/mssql/mssql.conf' failed to load (error: The INI file could not be opened. Errno [2] Filename [mssql.conf]).
Initial setup of Microsoft SQL Server failed. Please consult the ERRORLOG

No log files are generated.

Installed Packages
Name        : mssql-server
Arch        : x86_64
Version     : 14.0.3048.4
Release     : 1
Size        : 894 M
Repo        : installed

SQL Server 2016 data conversion

$
0
0

there is a KB https://support.microsoft.com/en-us/help/4010261/sql-server-and-azure-sql-database-improvements-in-handling-some-data-t

talking about data conversion precision improvement. in the page it mention the following

Starting with SQL Server 2016, both SQL Server and Azure SQL Database include improvements to the precision of the following operations:


  • Uncommon data type conversions. These include the following:

    • float/integer to/from datetime/smalldatetime
    • real/float to/from numeric/money/smallmoney
    • float to real
  • Some cases of DATEPART/DATEDIFF andDEGREES
  • CONVERT with aNULL style

But so far I can just see datetime2 has the improvement(enhancement ) in Compatible level 130 .

In CL 130 : datetime2 will show 2019-01-09 14:15:29.6833333

In CL < 130 : datetime2 will show 2019-01-09 14:15:29.6833000

But for other datatype conversion mentioned : float/real/money..... are there any example ?

1. And another problem is that the article mention recommend to validate after upgrade to SQL 2016 and before change to CL 130. The validation time maybe long(hard to estimate) as there are DBCC checktable. Is it possible to do before upgrade ?

2. It mention "Rebuild any structures that you identified in step 1" actually how to do it ? i.e. drop the computed column and add again ????? rebuild the view ??

 

deadlock count increase

$
0
0

how to reduce this deadlock.. it happen very frequently.

<deadlock><victim-list><victimProcess id="processd4fe015848" /></victim-list><process-list><process id="processd4fe015848" taskpriority="0" logused="1219420" waitresource="PAGE: 7:17:384615 " waittime="3550" ownerId="42364946100" transactionname="UPDATE" lasttranstarted="2018-12-31T16:30:37.147" XDES="0xd4f7c13a50" lockMode="IX" schedulerid="1" kpid="17264" status="suspended" spid="123" sbid="0" ecid="0" priority="0" trancount="2" lastbatchstarted="2018-12-31T16:30:00.253" lastbatchcompleted="2018-12-31T16:30:00.253" lastattention="1900-01-01T00:00:00.253" clientapp="SQLAgent - TSQL JobStep (Job 0x845F2BC7C95158469B934457A3F40B0E : Step 1)" hostname="server-1" hostpid="3236" loginname="NT SERVICE\SQLSERVERAGENT" isolationlevel="read committed (2)" xactid="42364946100" currentdb="7" currentdbname="ecommerce" lockTimeout="4294967295" clientoption1="671088672" clientoption2="128056"><executionStack><frame procname="ecommerce.dbo.sp_ecommerce_maintenance_pricing_amazon" line="71" stmtstart="3222" stmtend="3548" sqlhandle="0x030007004af05643ace4bb0021a9000001000000000000000000000000000000000000000000000000000000">
UPDATE d
	SET price = t.price
	FROM product_details d
	JOIN (
		SELECT *
		FROM #tmp AS T1
		WHERE IdentityID BETWEEN @StartID and @EndID
	) t ON d.id = t.i    </frame><frame procname="adhoc" line="10" stmtstart="426" stmtend="514" sqlhandle="0x01000700e8b7a908603e2ce81701000000000000000000000000000000000000000000000000000000000000">
exec sp_ecommerce_maintenance_pricing_amazo    </frame></executionStack><inputbuf>
         exec sp_ecommerce_maintenance_pricing_amazon;</inputbuf></process><process id="processd50e057848" taskpriority="0" logused="8871956" waitresource="KEY: 7:72057983830851584 (1d7e35ee8c1d)" waittime="3528" ownerId="42364945781" transactionname="UPDATE" lasttranstarted="2018-12-31T16:30:36.900" XDES="0x11863c46040" lockMode="U" schedulerid="8" kpid="13720" status="suspended" spid="102" sbid="0" ecid="0" priority="0" trancount="2" lastbatchstarted="2018-12-31T16:30:30.300" lastbatchcompleted="2018-12-31T16:30:30.300" lastattention="1900-01-01T00:00:00.300" clientapp="SQLAgent - TSQL JobStep (Job 0x769B7731D4C93E42A5C2D0804B6FB1DE : Step 1)" hostname="server-1" hostpid="3236" loginname="NT SERVICE\SQLSERVERAGENT" isolationlevel="read committed (2)" xactid="42364945781" currentdb="7" currentdbname="ecommerce" lockTimeout="4294967295" clientoption1="673185824" clientoption2="128056"><executionStack><frame procname="ecommerce.dbo.usp_ecommerceFileBulkProcess_Inventory_Batch_Process" line="362" stmtstart="43748" stmtend="44460" sqlhandle="0x03000700684e776dacbebd00a6a9000001000000000000000000000000000000000000000000000000000000">
UPDATE T1
                   SET
                       last_inventory_update = GETDATE()
                 FROM product_details AS T1
                      JOIN [ecommerce_BulkProcess].[dbo].staging_Inventory_Batch_Process AS T2 ON T1.id = T2.id
                 WHERE isnull(vendor_id, 0) IN (@vendorid, 0)
                 AND BatchUID = @batchGUI    </frame><frame procname="ecommerce_BulkProcess.dbo.usp__ecommerce_BulkProcess_Inventory_Batch_Process" line="91" stmtstart="10074" stmtend="10702" sqlhandle="0x03000f00f358af6290c913011ca9000001000000000000000000000000000000000000000000000000000000">
EXEC ecommerce.dbo.[usp_ecommerceFileBulkProcess_Inventory_Batch_Process]
                              @batchGUID = @pBatchGUID,
                              @vendorid = @vendorid,
                              @removemissing = @removemissing,
                              @processQueueID = @processQueueI    </frame><frame procname="adhoc" line="1" stmtend="110" sqlhandle="0x01000f00d936563380bca144e300000000000000000000000000000000000000000000000000000000000000">
EXEC usp__ecommerce_BulkProcess_Inventory_Batch_Proces    </frame></executionStack><inputbuf>
EXEC usp__ecommerce_BulkProcess_Inventory_Batch_Process   </inputbuf></process></process-list><resource-list><pagelock fileid="17" pageid="384615" dbid="7" subresource="FULL" objectname="ecommerce.dbo.product_details" id="lockd1298eaf00" mode="U" associatedObjectId="72058013127409664"><owner-list><owner id="processd50e057848" mode="U" /></owner-list><waiter-list><waiter id="processd4fe015848" mode="IX" requestType="wait" /></waiter-list></pagelock><keylock hobtid="72057983830851584" dbid="7" objectname="ecommerce.dbo.product_details" indexname="cx_product_details_id_pid" id="lock100d50dc180" mode="X" associatedObjectId="72057983830851584"><owner-list><owner id="processd4fe015848" mode="X" /></owner-list><waiter-list><waiter id="processd50e057848" mode="U" requestType="wait" /></waiter-list></keylock></resource-list></deadlock>




SQL SERVER RESTART - what commands / programs / others called internally before and after?

$
0
0
When SQL SERVER is restarted - what commands / programs / others called internally before and after please?

Raghavendra Narayana


sp_reset_connection - What and When it should be used

$
0
0

"sp_reset_connection"

Can you please help me understand this "sp_reset_connection" and when it should be used and anything to be taken care before using it.


Raghavendra Narayana

How to Restore only Selected Tables from Backup

$
0
0

How to Restore only Selected Tables from Backup please?

Want to avoid third party tools.


Raghavendra Narayana

Machine name longer than 15 characters

$
0
0

Hi all,

I've installed SQL Server 2014 Enterprise Edition on 4 servers which names are 16 characters long. I'm trying to configure an AlwaysOn Availability Group on these 4 servers (this is not my first AG Group...) but the operation fails creating the cluster group.

I've scanned the clusterlog messages and found that the creation of group fails at SqlInstToNodeMap, I suspect because the netbiosname of the server is 15 characters long but the dns name is 16.

I've not found anywhere that a 15-char name limits still exists in sql 2014 when it comes to create an AO Cluster.

Any help?

"SQL Native Client xx.0 Configuration" vs. "SQL Server Network COnfiguration"

$
0
0

In SSCM, I want to know the differences of "SQL Native Client xx.0 Configuration" vs. "SQL Sever Network Configuration".

Let's assume the SSCM installed on the same server as SQL Server Engine installed. Does the "SQL Native Client xx.0 Configuration"only work for applications installed on the machine that has SSCM? For the applications connecting to SQL remotely, does the "SQL Native Client" has any impact on it?

Thanks.

Find Table usage

$
0
0

need to find table usage (DML)... we can get this by sys.dm_db_index_usage_stats  ( by user scan,seek..)

but need to find who or which host hit this tables.  ( with out sql profiler)



I have a table that keeps getting used (select ), and no one can figure out where the statement are coming from. I suspect they are coming from Entity Framework, but I want to capture the SELECT and associated information via an Extended Event to prove this theory.

How to move msdb database from one physical server to another physical server ?

$
0
0
How to move msdb database from one physical server to another physical server ?

sunnybabu

Idea regarding index creation on an existing table

$
0
0

Dear All,

I want to create an non clustered index on two columns of a table . Any of the column can contain null values . The table has an existing row count of 50 crores. Will it be feasible to create the index on exsiting table or  create a new table, create index on it and then populate data from existing tables and rename it as per old table .

Version is SQL server 2016 Standard Edition .

Which approach will be better ?

Best Regards,
Sandy



Extended Event sqlserver.error_reported não traz o SQLText

$
0
0

Pessoal, boa tarde. 

Estou com uma dificuldade com a ação sqlserver.error_reported do Extended Events, onde 95% dos erros capturados não informam o valor do SQL_Text, que retorna NULL. 

O comando para iniciar o XE é esse:

CREATE EVENT SESSION RelatorioErros ON SERVER  
   ADD EVENT sqlserver.error_reported   
   (ACTION ( sqlserver.sql_text  
            ,sqlserver.username  
            ,sqlserver.database_name  
            ,sqlserver.client_app_name  
            ,sqlserver.session_id  
            ,sqlserver.query_hash
            ,sqlserver.query_plan_hash
            ,sqlserver.tsql_stack
            ,package0.last_error)   
     WHERE ([severity]> 10))  
   ADD TARGET package0.asynchronous_file_target (set filename = 'Y:\Ferramentas\RelatorioErros.xel')  
WITH (MAX_MEMORY=4096 KB,  
      EVENT_RETENTION_MODE=ALLOW_SINGLE_EVENT_LOSS,  
      MAX_DISPATCH_LATENCY=10 SECONDS,  
      MAX_EVENT_SIZE=0 KB,  
      MEMORY_PARTITION_MODE=NONE,  
      TRACK_CAUSALITY=ON,  
      STARTUP_STATE=ON)  

Eu implantei o evento num servidor com 5 bancos de dados. Destes, 4 executam todas as instruções de aplicação via procedure, e apenas 1 envia comandos CRUD. Meu problema está nos 4 BDs que enviam procedures. Nenhuma delas é capturada. Mas todos os comandos CRUD do outro BD são capturados. Montei outro XE com error_reported e rpc_starting. E, neste caso, o RPC_starting capturou todas as procedures.

Pensei em deixar os 2 ligados para combiná-los e conseguir os comandos que geraram erro, mas o volume de informações para importação torna o processo inviável.

O servidor está com SQL 2014 Enterprise Edition: Core-based Licensing (64-bit) SP2.

Podem me ajudar?

Collation conflict

$
0
0

i updated the sql server 2012 to the sp3 ,

after that i getting the error as "

Cannot resolve the collation conflict between "Latin1_General_CI_AS" and "SQL_Latin1_General_CP1_CI_AS" in the equal to operation " in most of the tables.

how to rectify the collation overall by database wise 


GOVINDARAJ P

MSSQLSERVER FAILS TO START

$
0
0

Good day

I am running MS SQL Server 2014 and the services will not start and asked to look at the event viewer or contacts administrator.

I cant start it on the configuration and tools folder as well.Please advice

Backup throughput is not consistent in idle SQL Server

$
0
0

Hi Guys,

My SQL Server environment details

OS : Windows Server 2016 Standard 64 bit

SQL Server : SQL Server 2012 Web edition

Storage : SSD 

This is a dedicated DB server and Since its in POC , server is idle all the time. 

I am running SQL server full backup 

Backup database tpccnew to disk='F:\backup\tpccnew.bak' with stats=10

At the end of backup completion, I could see the throughput 

BACKUP DATABASE successfully processed 19708298 pages in 577.555 seconds (266.591 MB/sec)

And again when run the same statement, i am getting a lesser throughput

BACKUP DATABASE successfully processed 19708298 pages in 606.383 seconds (253.917 MB/sec)

Why is this behavior? The backup throughput comes down after the first backup and i am not getting the throughput that i got when i run the full backup for the first time

Thanks

Retrieve orphan record from S3 Bucket that does not exist in Database

$
0
0

Hello, 

I am trying to retrieve information from AWS S3 bucket, the way we have the setup right now EC2 for DBs. When file attachments are deleted using the Website UI only the database record is removed, the actual file in S3 record is orphaned, I am trying to find out those record and delete it later on. here is the snippet but keep getting <g class="gr_ gr_304 gr-alert gr_gramm gr_inline_cards gr_run_anim Grammar only-ins doubleReplace replaceWithoutSep" data-gr-id="304" id="304">error</g>:

Use master
declare @S3Bucket <g class="gr_ gr_320 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling" data-gr-id="320" id="320">nvarchar</g>(50), @S3rootfolder <g class="gr_ gr_321 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling" data-gr-id="321" id="321">nvarchar</g>(50), @filelocation  <g class="gr_ gr_322 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling" data-gr-id="322" id="322">nvarchar</g> (50)
Set @S3Bucket= 'BUcket name'
Set @S3rootfolder = 'Rootfolder name'
set @filelocation= 'E:\'-- connected to S3

set nocount on 
declare @directorylocation sysname= @filelocation 
drop table if exists #temp

--create temp table
Create Table #temp
(FAFilesID int , 
subdirctory varchar (50), 
depth int,
isfile int
)
-- inserting into the temp table 
insert into  #temp
(
FAFilesID,
subdirctory,
depth,
isfile
)

exec master..xp_dirtree
@filelocation, 1,1

select 
*
from #temp
where FAFilesID=1 
and @filelocation not in (select FAFilesID from sys.databases where name like 'database%')
order by FAFilesID ASC 

*****

Sometimes <g class="gr_ gr_358 gr-alert gr_tiny gr_spell gr_inline_cards gr_run_anim ContextualSpelling multiReplace" data-gr-id="358" id="358">i</g> get thisColumn name or number of supplied values does not match table definition. 

other time different error.

Viewing all 15889 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>