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

Finding Cause of Performance Issue

$
0
0
Hi All,

Running SQL Server 2008 R2 SP3 on two different servers, with (at a glance) identical configurations.

Both servers are virtual and have the same amount of resources assigned to them.  The data drives are on the same SAN and use the same performance tier.  Server A has a production database of 40+ GB, while Server B has a production database of 5+ GB.

Both databases have the same schema and indexing, and the activity levels on Server A are higher than Server B.  When running queries against Server B they are noticeably slower than executing the same queries against Server A.  I can confirm this isn't just activity-based because even in off-hours the issue still presents itself.

Is there anything in terms of configuration at either the server or database level I should be checking?  If so, what?

Thanks!

Query Running long time

$
0
0

Team,

below query running long time, when i rebuild below index then it complete.  why this happen?

query :

select @pstepid = pv.id    
from cs_ticket_progress_values pv  join cs_ticket_progress p on p.id = pv.progress_step_id    
where pv.field_id = @field_id and p.ticket_id = @ticket_id

Rebuild:

ALTER INDEX IX_cs_ticket_progress ON  Cs_ticket_progress  REBUILD with (ONLINE=ON)


Index:
CREATE NONCLUSTERED INDEX [IX_cs_ticket_progress] ON [dbo].[cs_ticket_progress]
(
[ticket_id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 80)
GO

but there is less fragmentation on that index.

Stolen Memory VS Tempdb Spill

$
0
0
Can anyone explain how to differentiate this two things. I believe this two things happened because of sort and hash operation and statistic also can cause tempdb spill. Is that this both stolen memory and tempdb spill are almost same. 

SQL Server 2019 snapshot agent error

$
0
0

Hello,

I was trying to configure an SQL Server 2019 transactional replication, but the snapshot agent returns the following error:

Error messages:
Message: An unspecified error had occurred in the native SQL Server connection component.
Stack:    at Microsoft.SqlServer.Replication.Snapshot.SqlServer.NativeBcpOutProvider.ThrowNativeBcpOutException(CConnection* pNativeConnectionWrapper)
   at Microsoft.SqlServer.Replication.Snapshot.SqlServer.NativeBcpOutProvider.ThrowConnectionFailureException(CConnection* pNativeConnectionWrapper)
   at Microsoft.SqlServer.Replication.Snapshot.SqlServer.NativeBcpOutProvider.InitializeNativeBcpOutProvider(LogMessageCallback logMessageCallback, String strName, String strApplication, String strHost, String strServer, String strNetwork, Int32 encryptionLevel, String strDatabase, SecurityMode securityMode, String strLogin, SecureString strPassword, Int32 bcpBatchSize, Int32 loginTimeout, Int32 queryTimeout, Int32 packetSize, DeadlockPriority deadlockPriority, String strRowDelimiter, String strFieldDelimiter, Byte syncMethod, Boolean forceOdbcBcp, Boolean forceOleDbBcp, Boolean enableMultipleActiveResultSets, Boolean useReadPastHint, Boolean usePageLockHint, Boolean securePassword)
   at Microsoft.SqlServer.Replication.Snapshot.TransSnapshotProvider.InstantiateBcpOutProviderWorker(String strBcpConnectionName)
   at Microsoft.SqlServer.Replication.Snapshot.SqlServerSnapshotProvider.InstantiateBcpOutProvider(String strBcpConnectionName)
   at Microsoft.SqlServer.Replication.Snapshot.SqlServer.BcpOutThreadProvider.Initialize()
   at Microsoft.SqlServer.Replication.WorkerThread.NonExceptionBasedAgentThreadProc()
   at Microsoft.SqlServer.Replication.AgentCore.BaseAgentThread.AgentThreadProcWrapper() (Source: MSSQL_REPL, Error number: MSSQL_REPL55012)
Get help: http://help/MSSQL_REPL55012

Any idea why?

Best regards,

José Cruz

Cannot enlist in the transaction because the transaction does not exist. Error: 3922, Severity: 16, State: 1.

$
0
0

Hi, we are having this error message in random times from random <g class="gr_ gr_99 gr-alert gr_spell gr_inline_cards gr_disable_anim_appear ContextualSpelling ins-del multiReplace" data-gr-id="99" id="99">spids</g>. 

I've done some research but with no luck so far, it seems to be related to FILESTREAM (Which is heavily used by this application )

2018-07-01 18:50:05.87 Error: 3922, Severity: 16, State: 1.
2018-07-01 18:50:05.87 Cannot enlist in the transaction because the transaction does not exist.
2018-07-01 18:50:05.87 Error: 3922, Severity: 16, State: 1.
2018-07-01 18:50:05.87 Cannot enlist in the transaction because the transaction does not exist.
2018-07-01 18:54:27.12 Error: 3922, Severity: 16, State: 1.
2018-07-01 18:54:27.12 Cannot enlist in the transaction because the transaction does not exist.
2018-07-01 18:54:27.12 Error: 3922, Severity: 16, State: 1.
2018-07-01 18:54:27.12 Cannot enlist in the transaction because the transaction does not exist.
2018-07-01 18:55:28.30 Error: 3922, Severity: 16, State: 1.
2018-07-01 18:55:28.30 Cannot enlist in the transaction because the transaction does not exist.
2018-07-01 18:55:28.30 Error: 3922, Severity: 16, State: 1.
2018-07-01 18:55:28.30 Cannot enlist in the transaction because the transaction does not exist.
2018-07-01 18:58:50.66 Error: 3922, Severity: 16, State: 1.
2018-07-01 18:58:50.66 Cannot enlist in the transaction because the transaction does not exist.
2018-07-01 18:58:50.66 Error: 3922, Severity: 16, State: 1.
2018-07-01 18:58:50.66 Cannot enlist in the transaction because the transaction does not exist.
2018-07-01 18:59:18.61 Error: 3922, Severity: 16, State: 1.
2018-07-01 18:59:18.61 Cannot enlist in the transaction because the transaction does not exist.
2018-07-01 18:59:18.61 Error: 3922, Severity: 16, State: 1.
2018-07-01 18:59:18.61 Cannot enlist in the transaction because the transaction does not exist.

Error: Resource for instance 'MSSQLSERVER' should not exist.

$
0
0

Hi All

I have 4 nodes into one WSFC. 2 nodes in each datacenter. Node 1&2 are in DC1, Node3&4 are in DC2. I have to install 2 SQL Server FCIs, one in DC1 and another in DC2. and then we have to configure AOAG between these two DC instances. A set of storages are shared to their respective nodes Node1&2 and similar set of storage is shared btw node3&4 in DC2.

So i installed default instance in DC1 between node1&2 and this set of cluster is working fine. Now i have to do the same btw node3&4. But here i am getting this error: "Resource for instance 'MSSQLSERVER' should not exist." and db engine is showing as failed during installation.

Although i can start sql server service manually from services.msc also i can connect to this instance but failed to bring it on cluster resource group. I kept cluster resource group name different then the DC1 cluster resource group name. The name of cluster resource group names are:

DC1-Node1&2- SQL Server (MSSQLSERVER)

DC2-Node3&4-SQL Server DR (MSSQLSERVERDR)

Versions: SQL Server 2014 SP2 running on Wind 2012 R2 OS.

Please help me to fix this issue.


Thanks & Regards Manvendra Deo Singh My Blog:- http://manvendradeosingh.blogspot.com/


SQL Server Licensing

$
0
0

I have SQL server that's being used for monitoring purposes. I have SSIS packages in SSIS catalog on that server that gets metadata from entire SQL fleet in my organization. For example, job failures, backup information, database status, disk drive status, SQL version etc..

At present this server is under MSDN licence. My team has 4 DBAs including me and we all have MSDN platforms. 

Do I need SQL server license for this monitor server or can it continue using MSDN licence ?

My point is, as data in monitoring server is not used by business and only by my team for performance planning/capacity planning/maintenance operations and my team have MSDN platforms for all team members (approx. $1500 per year per member), I don't have to buy separate SQL licence for this server. It can continue using MSDN licence. 

Can you advise. Thanks.

DBCC skipping one database during integrity check

$
0
0

Hi,

we are running DBCC Integrity command using for user databases and sometime it's skipping one database.

No error message.

last few days, user databases we have 6 DB and DBCC when running every night, one DB not running DBCC integrity check but other databases running so couldn't understand why one DB not checked by DBCC command.

There are no information or any error message in log.

This kind of behavior happens on another server also randomly during nightly backup, one or two DBs getting skipped sometimes and it's not happening everyday but sometimes. 


Which application using Database

$
0
0

Hello,

We have Sql 2008R2 and planning to move Sql 2012, we would like to know which application or any other connecting to the database/instance for last few days so we can have idea for migration.

Thanks,


SQL server installation interrupted due to lack of space in disk

$
0
0

Hi everyone,

I was installing a SQL 2012 sp4 in a virtual one, but unfortunately I ran out of space and the virtual one went out, once I recovered the disk space I needed, I see that the virtual one shows me an error message and I can't continue with the SQL installation, what should I do in a case like this?


Warm regards MeVs

SQL Server - Browser for Servers

$
0
0

(see attached image)

SQL Server - Connect to Server - Browse for Servers

This feature is locking up - cannot ESC, select a database, or use Task Manager to close the window(s).

I've updated via Check for Updates.

Is there something else that needs to be done?

Thanks,

Darryl

SQL Agent job becomes corrupted

$
0
0

I have a physical server running Windows Server 2019 Standard and SQL Server 2019 - both fully patched. The server had been running fine for some time, but then started rebooting at exactly the same time every night. I eventually tracked this down to the SQL Agent backup job. Every step in the job worked, but running the job on demand caused the server to reboot immediately. I deleted the job and recreated it (scheduled to run at a different time a few minuted earlier) and the problem went away.

A couple of weeks later, the same thing happened again, with the server rebooting at the new time for the agent job. I deleted the job and recreated it, again scheduled for a slightly different time. A couple of weeks later, the same thing has happened again. Fortunately, this is a development server so it doesn't have a big impact for us, but other people could find this business critical.

Log_reuse_wait_desc = ACTIVE_TRANSACTION

$
0
0

Hello,

I've a SQL Server 2016 - 130.4411 Standard Edition.

I've a database log that keeps filling up (log is 250GB), select log_reuse_wait_desc from sys.databases says that the log can't be reused because of "active_transacion".

One thing I'm missing is that a query on sys.dm_tran_database_transaction, summing the column database_transaction_log_bytes_used I've very few kilobytes used, so I can't say which transactions are guilty for the log that keeps filling up.

Any help is appreciated

Concurrent read and update

$
0
0

I am facing a scenario which may be common to others as well, in which I want simultaneous requests read a sequence value and update it by incrementing by 1, one after another. But it is possible that two requests read the same value of sequence and finally both will update it to the same value. I thought using serializable the whole process will run one after another for multiple requests. But unfortunately, even in serializable, two requests read the same value simultaneously and though they update it one after another, they update it to the same value.

How can I overcome this situation?

Log Shipping in SQLServer2019 error

$
0
0

Hi all,

I am trying to configure log shipping and getting following error in agent job history.(SQL Server 2019)

There was no problem with sql server 2017 and 2016 in same configuration.

The backup file was created normally but error message is logged.

----------------------------------------------------------------------------------------------------------------

2019-12-04 11:16:50.90 Starting transaction log backup. ID: '26c94b60-7380-4ddd-8dc7-ae2ae70630c7'

2019-12-04 11:16:50.90 *** ERROR: Unable to log history / error messages.(Microsoft.SqlServer.Management.LogShipping) ***

2019-12-04 11:16:50.90 *** error: Failed to convert parameter value fromSqlGuid to String.(System.Data) ***

2019-12-04 11:16:50.90 *** error: The object must implement IConvertible.(mscorlib) ***

2019-12-04 11:16:50.90 Retrieving backup settings ID: '26c94b60-7380-4ddd-8dc7-ae2ae70630c7'

2019-12-04 11:16:50.91 *** ERROR: Unable to log history / error messages.(Microsoft.SqlServer.Management.LogShipping) ***

2019-12-04 11:16:50.91 *** error: Failed to convert parameter value fromSqlGuid to String.(System.Data) ***

2019-12-04 11:16:50.91 *** error: The object must implement IConvertible.(mscorlib) ***

-----------------------------------------------------------------------------------------------------------------

Can anyone tell me what is the problem in this?

n addition, I found the following phenomena:

Column [last_backup_file], [last_backup_date] of msdb.dbo.log_shipping_primary_databases and msdb.dbo.log_shipping_monitor_primary table is not updated. It's NULL.

It seems to be related to the error message noted above.




MSDB Restore

$
0
0

We had a Microsoft SQL Server 2012 Basic Edition on one of our servers.  The Server crashed last week.  However our backups were not being maintained and we found out the Data had not been backed up since 2017.  We were able to recover the mdb and ldb files from the crashed hard drive.  I've re-attached all of the User databases and all is good.  However we had about 20 SQL Server Jobs that created tables from other servers on our domain.  Those jobs were lost and it's been 1 to 3 years since they were created.  We have the msdn.mdb and msdn.ldb from the old server I tried changing the name of those files so that I could attach them as I did the user databases and then I was going to run some queries and update the MSDN database on our rebuilt server but I'm still unable to attach that database.  Can anybody give me a clue on how to attach the old msdn database as a user database on our rebuilt server so I can Either run an update query to fix our jobs or print out the sql for the jobs and recreate them that way.

Thanks

SSMS shows different value for number of NUMA nodes than sql error log

$
0
0

So, i am trying to calculate MAXDOP on a new server and this is what i see:

SSMS - Processors - Shows 2 numa nodes (0 & 1) each having 10 cpu's

But when i look at the sql error log, i see entries which suggest # of NUMA nodes  = 4 (Numa 0,1,2,3)

select numa_node_count from sys.dm_os_sys_info

gives - 4

So i am a bit confused , Do i have 2 numa nodes with 10 cpu's each OR do i have 4 numa nodes with 5 CPU's each?


D

How to add new language to sys.languages

$
0
0

Hi

I to add hebrew language to sys.languages , to create a hebrew user to connect to SqlServer.

We have already tested hebrew strings for the managed errors, using a simple table for translations (correctly).
But some internal errors (not managed), obviously return to the operator using the language of the user connected.
So, to have all errors translated in hebrew, I need to add a language in syslanguages (doesn't include hebrew).
I have not found solutions online.
Could someone you me?
Thanks

Not able to restore a TDE encrypted database with error 'Cannot find server certificate with thumbprint'

$
0
0

Hi All,

I am trying to restore a database from 2008R2 to 2014 server. I am getting error 'Cannot find server certificate with thumbprint'.

Below are the steps i followed:

1. Backup certificate on Source

2. Master key already exists on target server

3. Created certificate/Key on destination with the backup ones.

4. While restoring the DB got error 'Cannot find server certificate with thumbprint XXXXXX'.

Please assist to resolve the issue.




Vinai Kumar Gandla

Problem with tempdb database

$
0
0

Hi,

I have a customer who has a clustered SQL server 2008 R2. The tempdb database is configured as follows:

Data files:

tempdev. Primary file group, row, initial size 18 MB, autogrowth 10% unrestricted.

tempdev01. Primary file group, row, initial size 847 MB, autogrowth 10% unrestricted.

tempdev02. Primary file group, row, initial size 1027 MB, autogrowth 10% unrestricted.

templog. logfile. Initial size 5940 MB autogrowg 10% unrestricted.

Some transactions has made tempdb log grow up to 50 GB. I have stopped the sql engine service, thinking that tempdb would be created again as I have read here and there in internet. But it is not the case. When service has started, tempdb was exactly as it was before stopping. Service stopped again, files manualy removed, start service doesn't work, sql instance doesn't start. 

So I have a 50 GB log file I cannot get rid of. Then I have shrinked both database and files one by one. Same result. 50 GB log file. Then, with commands:

select * from sys.database_FILES

DBCC SHRINKFILE (templog, EMPTYFILE);

ALTER DATABASE tempdb REMOVE FILE templog;

DBCC command executes, but doesn't empty the file. ALTER DATABASE throws the error: The primary data or log file cannot be removed from a database.

How do I get rid of those 50 GB?

Viewing all 15889 articles
Browse latest View live


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