Agent job executing proc fails with string or binary data truncated, runs without error when ran thru SSIS in agent job.
Error 9002 Log File Full' occurred on \\Server1
Here is the scenario on of the test servers. The transaction log is full. The database is in AG. Its SQL Server 2016 enterprise edition instance.
SQL Server Alert System: 'Error 9002 Log File Full' occurred on \\Server1
followed steps
=============
> The ldf file growth was limited to 100GB. There is lot of disk space available on drive though.
> DBCC SQLPERF(LOGSPACE); -- shows 100% usage
> Checked the recovery model and log reuse description from DMVs. it was Full and waiting ACTIVE transaction.
> dbcc loginfo --shows all VLFS are active i.e. status =2
> Taken consecutive 3 log backup and tried to check if there VLF status will change. nothing changed.
> I tried to increased the log file size using TSQL to 110GB. SQL still throws me an error message repeatedly
Msg 9002, Level 17, State 4, Line 3
The transaction log for database 'db1' is full due to 'ACTIVE_TRANSACTION'.
> I see multiple block chains as well.
Did anyone come across this situation? How to solve it without KILLing any sessions or restarting SQL Server ?
-Bob
SQL Server 2019 Performance Regression
Hi All,
We have recently upgraded our DEV environment from MSS 2016 (2012 Compatibility Level) to MSS 2019 (Native). We are seeing performance regressions across almost every query (approx. 12,000). Has anyone else seen performance hits when upgrading to MSS 2019?
Thanks in advance!
SQLServer configuration does not list service type for all services
Sqlserver server configuration module does not list Service type for all Sql services. I have installed sqlserver 2016
After upgrading client computer from W7 to W10 client cannot connect to SQL Server 2014 database on another computer using W10
After upgrading the client computer from W7 to W10 I now get the following error when trying to connect to the SQL Server 2014 database running on another computer where it is running and stable in windows 10 and has been for a couple of years. Wheras the client application (Windows Forms/VB.Net) was running on W7 and connecting to the database on the other computer without a problem, I now get the error:
"The target principal name is incorrect. Cannot generate SSPI context"...….there are no error numbers or any other information.
The Connection String consists of "<remote computer name>\<Instance name>;Initial Catalog=<database name>;Integrated security = True"
and uses Windows Authentication.
I have scoured the web for days attempting to resolve this issue, but cannot....can anyone help?
Table Partitioning on Daily Basis
Hi All,
Can we create the Table Partitions on Daily Basis. How can we delete the partitions with Getdate()-2 and just maintain Getdate() and Getdate()-1 data in the partitions.
Ex: Day one if we load the data, it will be in a partitioned table.
Day 2 : A new partition has to be created and , previous data will be also present with the Today-1 partition.
Day 3 : A new partition has to be created and Day1 partition has to be deleted. So in the table at any time we need to have only Today and yesterday data. (In the table, I have a column with the Getdate() value.)
Please suggest a way to try this. Thanks in advance.
SQL Server 2016 SP2 CU11 Patch failed.
HI Team,
We have applied CU11 on one of production server, post CU11, sql services was offline, then we bring online with T912 trace, post we ran msdb110_upgrade.sql on server. then we got below error massage. Please help me
Thanks in advance
------------------------------------------
Execution of POST_SQLAGENT100.SQL complete
------------------------------------------
------------------------------------
Moving 2005 SSIS Data to 2008 tables
------------------------------------
Mapping SSIS yukon roles to katmai roles...
Moving package folders...
Moving packages...
Moving logs...
Dropping yukon stored procedures...
Dropping yukon tables...
Creating sysdtslog90 view...
Database name 'tempdb' ignored, referencing object in tempdb.
Database name 'tempdb' ignored, referencing object in tempdb.
Configuration option 'show advanced options' changed from 1 to 1. Run the RECONFIGURE statement to install.
Msg 574, Level 16, State 0, Procedure #sp_enable_component____________________________________________________________________________________________________00000F59, Line 11 [Batch Start Line 64771]
CONFIG statement cannot be used inside a user transaction.
Configuration option 'Agent XPs' changed from 1 to 1. Run the RECONFIGURE statement to install.
Msg 574, Level 16, State 0, Procedure #sp_enable_component____________________________________________________________________________________________________00000F59, Line 13 [Batch Start Line 64771]
CONFIG statement cannot be used inside a user transaction.
Executing msdb.dbo.sp_syspolicy_create_purge_job
Configuration option 'Agent XPs' changed from 1 to 1. Run the RECONFIGURE statement to install.
Msg 574, Level 16, State 0, Procedure #sp_restore_component_state_____________________________________________________________________________________________00000F59, Line 9 [Batch Start Line 64771]
CONFIG statement cannot be used inside a user transaction.
Configuration option 'show advanced options' changed from 1 to 1. Run the RECONFIGURE statement to install.
Msg 574, Level 16, State 0, Procedure #sp_restore_component_state_____________________________________________________________________________________________00000F59, Line 11 [Batch Start Line 64771]
CONFIG statement cannot be used inside a user transaction.
post_dc100::Enabling Agent XPs before restoring data collector original state
Configuration option 'show advanced options' changed from 1 to 1. Run the RECONFIGURE statement to install.
Msg 574, Level 16, State 0, Procedure #sp_enable_component____________________________________________________________________________________________________00000F59, Line 11 [Batch Start Line 65039]
CONFIG statement cannot be used inside a user transaction.
Configuration option 'Agent XPs' changed from 1 to 1. Run the RECONFIGURE statement to install.
Msg 574, Level 16, State 0, Procedure #sp_enable_component____________________________________________________________________________________________________00000F59, Line 13 [Batch Start Line 65039]
CONFIG statement cannot be used inside a user transaction.
Data Collector Status
CollectorEnabled:0
Collection set status
Uid:7B191952-8ECF-4E12-AEB2-EF646EF79FEF, Name:Disk Usage, IsRunning:0
Uid:49268954-4FD4-4EB6-AA04-CD59D9BB5714, Name:Server Activity, IsRunning:0
Uid:2DC02BD6-E230-4C05-8516-4E8C0EF21F95, Name:Query Statistics, IsRunning:0
Uid:ABA37A22-8039-48C6-8F8F-39BFE0A195DF, Name:Utility Information, IsRunning:0
post_dc100::uploading instmdw.sql to msdb ...
Uploading instmdw.sql from disk: C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\Install\instmdw.sql
Loaded 1332276 bytes from 'C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\Install\instmdw.sql'
post_dc100::Checking if collection set status were captured in temp table...
post_dc100::Restoring collection set running status...
The state of the collection set has changed, but it will not start or stop until the collector is enabled.
post_dc100::Checking if Data collector was enabled before upgrade...
post_dc100::Current data collector state is same as pre-upgrade state
Data Collector Status
CollectorEnabled:0
Collection set status
Uid:7B191952-8ECF-4E12-AEB2-EF646EF79FEF, Name:Disk Usage, IsRunning:0
Uid:49268954-4FD4-4EB6-AA04-CD59D9BB5714, Name:Server Activity, IsRunning:0
Uid:2DC02BD6-E230-4C05-8516-4E8C0EF21F95, Name:Query Statistics, IsRunning:0
Uid:ABA37A22-8039-48C6-8F8F-39BFE0A195DF, Name:Utility Information, IsRunning:0
Configuration option 'Agent XPs' changed from 1 to 1. Run the RECONFIGURE statement to install.
Msg 574, Level 16, State 0, Procedure #sp_restore_component_state_____________________________________________________________________________________________00000F59, Line 9 [Batch Start Line 65039]
CONFIG statement cannot be used inside a user transaction.
Configuration option 'show advanced options' changed from 1 to 1. Run the RECONFIGURE statement to install.
Msg 574, Level 16, State 0, Procedure #sp_restore_component_state_____________________________________________________________________________________________00000F59, Line 11 [Batch Start Line 65039]
CONFIG statement cannot be used inside a user transaction.
Restored implicit transactions state to OFF
Upgrading Database Mail related objects...
Completed upgrade of Database Mail related objects...
Table Partitioning Switching
Hi All,
Can we switch the Nth partition to a non partitioned table , so that we can truncate this or archive this data later.
Ex: If I have Daily partitions on a SQL table,
On Day1, One partition will be created with Split Range.
On Day 2, Split Range will create another day partition
On Day 3, before creating the Day3 partition, I have to Switch the Day1 partition to a non partition table and just maintain 2 partitions any time in my target (that is Current Day and Previous Day)
Here, How can we identity Getdate()-2 partition to SWITCH to a non partitioned table?
ALTERTABLE Source SWITCHPARTITION1TO Target, Here how can we set Parititon = Getdate()-2.
Thanks in advance.
After Alter Store procedure, User lost access
Hi Team,
Very recently we had altered stored procedure, after that user lost execute permission on it. as per my understanding,user will not loos access after alter SP's. Can any one please help me
Can't attach database to SQL Management Studio - The log scan number passed to log scan in database in not valid - TESTDBUPGRADE
Hi,
I am trying to run TESTDBUPGRADE before an SCCM Site Server Upgrade and I can't attach the current database on a test VM.
Can someone please help?
Thanks
Error ID : 8623 The query processor ran out of internal resoureces and could not produce a query plan
I hit the error Error ID : 8623 The query processor ran out of internal resoureces and could not produce a query
in my SQL Server, but I don't know which Query is hitting this problem.
Are there anyway to trace what query is involved ?
How to Monitor MSSQL Server With Prometheus ?
Pivot
Linked server creation using "Be made using user's current security context"
Hi,
I am trying to create linked server using "Be made using user's current security context" from sql server to oracle database.
But I am getting below invalid password though password is valid. Please let us know the reason of the error-
Please let me know the workaround for this.
Restore Database getting failed SQL 2019
is CTP not support RTM version ?
when try to restore Production database (Microsoft SQL Server Enterprise 2019 (RTM-CU1) (KB4527376) - 15.0.4003.23 (X64) )
to testing server Microsoft SQL Server 2019 Developer (CTP2.5) - 15.0.1500.28 (X64) )
getting below msg , that shows the version not support for restore into Dev 15.**1500.
MSG:
The database was backed up on a server running version 15.00.4003. That version is incompatible with this server, which is running version 15.00.1500. Either restore the database on a server that supports the backup, or use a backup that is compatible with this server.Msg 3013, Level 16, State 1, Line 2 RESTORE DATABASE is terminating abnormally.
DBCC Shrinkfile is blocked by a background process
I am executing DBCC shrinkfile on a user database and it is getting blocked by a system process.
I am doing thins shrink as an onetime process as 90% data was removed from the database.
I am trying below command,
Available space in DB is 540 GB and used space is 60 GB.
dbcc shrinkfile (datafile,0, truncateonly)
or
dbcc shrinkfile (datafile,542720, truncateonly)
or
dbcc shrinkfile (datafile,542720)
Executing below command shows that the shrink operation reaches 100% in 1 or 2 minutes, after that it gets blocked by a system process. Shrinkfile waits on LCK_M_SCH_M
SELECT start_time, percent_complete, DATEADD (ss,DATEDIFF (ss,start_time,getdate()) / percent_complete * 100,start_time) AS Expected_end_time,
st.text as SQL, command as Current_Command,session_id FROM
sys.dm_exec_requests er
CROSS APPLY
sys.dm_exec_sql_text(er.sql_handle) st
WHERE percent_complete > 0
sp_whoisactive shows that system process as NULL and dbcc inputbuffer also shows as null.
Performance of Polybase
We've been experimenting with Polybase on a SQL Server 2019 (CU1) box and the performance is pretty awful. We've gone as far as scripting every statistic from the remote server onto the external tables in 2019, with no change. You can see the performance difference here (two runs of the same query back to back)(servers are setup identical resource wise - 32GBs of RAM, 8 vCPU, SSD disks - and the remote server is SQL Server 2016 with the latest CU):
SOURCE:
(313585rows affected)
SQL Server Execution Times:
CPU time =4019 ms, elapsed time =5160 ms.(313585rows affected)
SQL Server Execution Times:
CPU time =4063 ms, elapsed time =5048 ms.
POLYBASE with PUSHDOWN OFF:
(313585rows affected)
SQL Server Execution Times:
CPU time =2891 ms, elapsed time =132820 ms.(313585rows affected)
SQL Server Execution Times:
CPU time =2594 ms, elapsed time =52217 ms.
POLYBASE with PUSHDOWN ON:
SQL Server parse and compile time:
CPU time =0 ms, elapsed time =11 ms.(313585rows affected)
SQL Server Execution Times:
CPU time =2641 ms, elapsed time =131960 ms.
SQL Server parse and compile time:
CPU time =109 ms, elapsed time =126 ms.(313585rows affected)
SQL Server Execution Times:
CPU time =3906 ms, elapsed time =88548 ms.
That's roughly a 2100% increase in the time it takes for the two queries to run. What's confusing is that Microsoft is pushing Polybase (data virtualization) as an ETL replacement, but there is no way that's possible with this kind of performance.
Are other people seeing this kind of poor performance using Polybase with connections from SQL Server to SQL Server?
Thanks.
Restoring database from TDE enabled database in enterprise edition to standard edition
Thank you.
sharma priya
extracted high CPU consuming queries.
Good Morning Experts,
I have extracted high CPU consuming queries. Could you please advise on how to proceed. Should i tune them or look for something else?
Kiran
Database in emergency mode
We have an issue with a production database server that has 1,153 databases.
The issue is that a couple of the databases have gone into emergency mode where read queries worked fine but any update triggered the following error:
Msg 3908, Level 16, State 1, Line 11
Could not run BEGIN TRANSACTION in database 'XXXXXX' because the database is in emergency mode or is damaged and must be restarted.
The statement has been terminated.
If I go to the properties of the database the state shows it online and not in emergency mode.
If I run ALTER DATABASE XXX SET ONLINE it runs fine but does not fix the issue.
The only way to fix the database is to do a copy only backup and restore it using a new name.
The same database had this issue three times over a 6 weeks.
SQL Server Version Info
Microsoft SQL Server 2016 (SP2-GDR) (KB4505220) - 13.0.5101.9 (X64) Jun 15 2019 23:15:58 Copyright (c) Microsoft Corporation Standard Edition (64-bit) on Windows Server 2016 Datacenter 10.0 <X64> (Build 14393: ) (Hypervisor)
Issue for Enabling Polybase in SQLServer 2019 inside the Docker Container
I got the SQL server 2019 image in Docker container, I have created database too. But I cant enable the polybase:
SELECTSERVERPROPERTY('IsPolyBaseInstalled');
This is giving me error :
PolyBase feature is not installed. Please consult Books Online for more information on this feature.
Is there a way that I can enable polybase through commands. how can I enable the feature to SQL server 2019 inside the container.