hi,
every time I try to install any software I get this message
hi,
every time I try to install any software I get this message
What is the BmkToPage (Intrinsic FunctionName) in the Compute Scalar operator that follows a nonclustered index seek and precedes the RID Lookup?
It does not seem to occur for unique indexes (single key) or in smaller tables. The presence of this about doubles the cost of the query
Below is the XML detail inside the Compute Scalar
Note:
I am not trying to suppress the RID Lookup. The nonclustered index of a heap table has the full file and row id to find the data page. There should not a be function call.
Below is an index seek to the same table, but referencing a unique index
below is an index seek to an identical but smaller table using a non-unique index
jchang
Hello all, we have a high fragmentation on tables, reason for it was that jobs for reorg/rebuild were failing because of deadlocks. After a bit of investigation I found out it is probably because of MAXDOP parameter set to 4. So I created new maintenance plan just basic:
1STEP, set MAXDOP to "1"
2STEP, Rebuild on all User DBs
3STEP, UPDATE statistics on All User DBs
4STEP set MAXDOP back to "4"
Job completed successfully after 4h 25min.
But problem is that fragmentation after index rebuild is still same why? How it is possible?
Hi all,
Working with a Microsoft SQL Server 2017 (RTM-CU17) instance, we had a system (non SQL Server related) failure. After that, we recovered the machines but still have a big issue with one SQL instance (we have three instances on the same virtual machine).
The backups of one instance run very slow. In the past days we need just three hours for both the databases of the instance, now looks like we need about three days. Both databases are not so big (3/5 GB) but have lots of Filestream documents.
I tried to change backup parameters, to backup on a Nul disk, to create a new, small db and backup it (with no issue) , to check the configuration and so on.
Just I noticed an high CPU consumption and the fact that the backup hangs more than 10 minutes with ASYNC_IO_COMPLETION wait, and then starts (very very slow) with BACKUPTHREAD wait. Performance dashboard shows the cache hit ratio collapsing.
Any idea?
Thanks in advance.
Luca SQL DBA
Hi All,
The MSDB database is in suspect mode, I want to restore the database with the backup available.
Let me know steps to perform the restore, It is same like the normal DB restore??
Please advise. Thanks.
Vinai Kumar Gandla
(SQL Server 2017 EE)
I have a partioned table called LogPartitions with 219M rows. The table is partioned by month based on a date column called EventDate. The table has a clustered index that was created with
CREATE CLUSTERED INDEX CCI_LogPartitions ON dbo.LogPartitions(EventDate) ON log_byMonth_PS(EventDate)
Now I want to create a columnstore index for this partiotined table, so I ran
CREATE CLUSTERED COLUMNSTORE INDEX CCI_LogPartitions
ON dbo.LogPartitions
WITH (DROP_EXISTING = ON)
ON log_byMonth_PS(EventDate)
It ran for over an hour then failed with the error:
“The instance of the SQL Server Database Engine cannot obtain a LOCK resource at this time. Rerun your statement when there are fewer active users. Ask the database administrator to check the lock and memory configuration for this instance, or to check for long-running transactions.”
I was the only user on the server and this index creation was the only job at the time. The server’s ‘locks’ parameter has default value of 0.
I checked the lock use with “SELECT
request_session_id,COUNT(*) num_locksFROMsys.dm_tran_locksGROUPBY request_session_id“and it was acquiring over 60M locks before crashing.
I had the RAM upgraded from 16G to 24G. Ran the columnstore index creation again and ran into the same ‘cannot obtain LOCK resource’ issue.
There is no TABLOCK/PAGLOCK hint available with CREATE COLUMNSTORE INDEX statement, so I can not instruct server to escalate locks.
I just wonder if acquiring a huge number of locks when creating columnstore index is a normal sql engine behavior for large tables like mine.
If so, is there a way to tackle this issue beside adding more RAM to the server? Would dropping the normal clustered index before creating the columnstore index helps?
Thanks
Hi All,
Please share the steps to switch DC1 (Production) to DC2 (DR). We have configured Distributed SQL Always-On from DC1 to DC2 on WSFC.
Currently Application is using DC1 availability group listener to connect DC1-DB. After switch from DC1 to DC2, application need to connect DC2-DB availability group listener.
DC1: Hosted VM_DB1 and VM-DB2
DC2: Hosted VM_DB3 and VM_DB4
Current setup:
I am using SQL server management studio 2012. All was working fine but just few hrs before deployement it stopped working. when i open SQL server management studio it does not loads any database inside it and shows and error
TITLE: Microsoft SQL Server Management Studio
------------------------------
Service 'Microsoft.SqlServer.Management.IRegistrationService' not found (Microsoft.SqlServer.Management.SDK.SqlStudio)
------------------------------
BUTTONS:
OK
------------------------------
Please tell me how can i fix this
Sajid
Kiran
Hi guys, I am able to connect to a remote default instance (Sql2k16) from my client but when I try to connect to the second one (Sql2k19) it fails with the typical error:
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: SQL Network Interfaces, error: 28 - Server doesn't support requested protocol) (Microsoft SQL Server, Error: -1)
-The outbound and inbound rules are enabled both 1433-1434
-Sql Service Browser is up and running and using Local Service
-Allow remote connections is ON
-Remote Login is 60 sec instead of 10 by default
What am I missing here?
Both instances are running in the same VM
Thanks for your inputs,
Enric
Hi,
I configured the Basic Alwayson setup in two of the test SQL standard 2017 test servers(A,B).
As per basic configuration only one db i am able to add it in group. Configuration everything went well with automatic failover from primary-A to secondary-B once i off the sql services in primary server. Now secondary-B is primary became primary.
I started the sql services in previous A server and off the services in B services.But here instead of failover both servers went to Resolving mode. To resolve this i on the sql service in B server i waited for whole night whether dbs will sync.I even
tried force failover but Nothing worked.
Now both servers are in resolving state. Not able to understand what to do now.
The error i am getting as below
the availability replica for availability group xyz on this instance of sql server can not become the primary replica because the wsfc cluster was started in force quorum mode.consider performing a forced manua failover (with possible data loss) error
41125.
I check the WSFC - Ag Role XYZ failed.
Both nodes are up.
Now both replicas went to resolve state..:(
Anything i need to check? Please suggest.
pols
Hi All: I am not able to connect SQL Server instance due to below error. I am herewith attaching SQL log.
Named Pipes, TCP/IP protocols are enabled. SQL Services including Browser, Agent are up and running. SQL services and DB server rebooted multiple times, still getting same below error. Please help me to fix below error.
Our stage table holds 130 + columns with 1 billion 430 million rows with partition with service date. we created non clustered column store index, it took 36 hours for its completion. after creating the index the select count_big(col_name) from table shows 40 billion as row count, we tested this by sp_space used, sys.indexex table, right click and properties the table all shows the 1 billion 430 million rows. Before index creation also we count the table after 45 minutes execution it says the 1 billion 430 million. estimated number of rows in non clustered column store also shows 1 billion 430 million rows, but count shows very strange result.
Below are the execution plan details
Column store index scan (Non clustered)
scan columnstore index, entirely or only a range.
Physical operation : columnstore index scan
logical operation : index scan
Estimated execution mode : Batch
Storage : ColumnStore
Estimated I/O Cost:0.05625
Estimated Operator Cost : 8.74159(41%)
Estimated SubtreeCost : 8.74159
Estimated CPU Cost:8.68534
Estimated Number Of Executions:1
Estimated Number Of Rows: 1262930000
Estimated Row Size: 27B
Partitioned : True
Ordered: False
Node ID : 5
In the GUI it is displayed like this
select cost 0% <———Parallelism(Gather Streams) Cost 0% <——-Compute Scalar Cost : 0% <—— Hash Match Aggregate Cost(59%) <——- Columnstore index scan cost 55%.
Hi All,
We have a sql backup job which usually takes less than 10 min to complete. But today it has taken more than 2 hours to complete. How to find the root cause & how to fix it.
We have backup job scheduled every night to take backup user and system databases and it's runs fine every night bit sometimes it shows backup job successfully runs but log shows that it has taken only one database backup out of 7 database (user and system DBs). Event viewer or sql server logs not showing any error and sql batch scheduler also not showing any failed backup or other errors but only shows job succeed.
We are using cursor (FORWARD_ONLY) to read each database excluding Temp Db from system table and taking Backup and storing database to shared folder.
Any thoughts?
I am trying setup automatic job using the windows task scheduler to notify when Sql Agent service stopped but somehow i am not getting alert when i am manually stopping but when i run the job manually then i am getting the email notification.
I think it should be right windows event trigger setting bu i am not sure which one i should setup the triggering action.
I need notification when sql agent service stopped.
If someone can help me out?
I am calling PowerShell script using batch script. Batch Script: powershell.exe -command C:\Users\ServiceCheck.ps1 Powershell Script (ServiceCheck.ps1): $servers=get-content "C:\Users\servers.txt" foreach($server in $servers) { # go to each server and return the name and state of services # that are like "SQLAgent" and where their state is stopped # return the output as a string $body=get-wmiobject win32_service -computername $server | select name,state | where {($_.name -like "SQLAGENT*" -or $_.name -like "SQL*AGENT") ` -and $_.state -match "Stopped"} | Out-String if ($body.Length -gt 0) { #Create a .net mail client $smtp = new-object Net.Mail.SmtpClient("mail.myinc.com") $subject="SQL Agent is down on " + $server $smtp.Send("pds0809@myinc.com", "pds0809@myinc.com", $subject, $body)"message sent" } }
Hi All,
Can you please help understand what the below command is trying to do:
------------------------
BACKUP DATABASE [DB1] TO DISK = N'G:\Backups\FULL\DB1\DB1_backup_2019_11_13_025507_9184071.bak' WITH NOFORMAT, NOINIT, NAME = N'ILS_backup_2019_11_13_025507_9184071', SKIP, REWIND, NOUNLOAD, STATS = 10
GO
declare @backupSetId as int
select @backupSetId = position from msdb..backupset where database_name=N'DB1' and backup_set_id=(select max(backup_set_id) from msdb..backupset where database_name=N'DB1' )
if @backupSetId is null begin raiserror(N'Verify failed. Backup information for database ''DB1'' not found.', 16, 1) end
RESTORE VERIFYONLY FROM DISK = N'G:\Backups\FULL\DB1\DB1_backup_2019_11_13_025507_9184071.bak' WITH FILE = @backupSetId, NOUNLOAD, NOREWIND
GO
-------------------------------------
Our backup job is taking around 8-9 hrs to complete. On checking could see that the backup is running for only for 2 hrs, but 'restore verifyonly' opreration is taking the max time. Whats the purpose of running this ' restore verifyonly opearation' immediately after backup.
Folks,
We recently got converted from NTFS format to Refs on our huge volume disks on our Warehousing DB server
Looking for free space percentage to be maintained on an REFS formatted DB disks
SQL DATA\SQL LOG\SQLTEMPDB sits on dedicated disks on REFS file system so we need to know if there is an journal or an tech net from MSDN recommending an mark like 30% free space has to be maintained on the disk hosting the DB files ?
Since Refs does automated disk checks and is capable of self healing do we have any documentation or article form Microsoft that an DBCC CHECK DB need not be run on my 7TB +database ? ( currently i am in argument that check DB has to happen on DB
level consistency to be checked is totally different form drive level check disk that happens)
Regards
Eben
Dear friends,
I have the following error when I want to test my linked server:
Cannot create an instance of OLE DB provider "OraOLEDB.Oracle" for linked server (Error Number: 7302).
I followed the instructions posted on this URL:
https://www.mssqltips.com/sqlservertip/4396/creating-a-sql-server-2014-linked-server-for-an-oracle-11g-database/
My situation
2 W2012R2 servers, 1 with SQL2016dev and 1 with Ora11g as mentioned on the URL.
On the SQL server I installed as well the ODAC122010 x64. So the provider OraOLEDB.Oracle came available.
Both servers are not part of any domain, they both live in the WORKGROUP.
After creating the linked server I get the mentioned error.
I just want to connect via SSMS.
I searched for a solution, but did not find one.
So I was wondering if somebody can help me?
Thanks in advance
Marco
I have a sql2012 server on windows 2012R2, 16GB ram, 4 cores on vmware, SQL Max 13GB, min 6GB
sqlservr.exe : no hard faults/sec, commit 12gb , workingset 9GB, reads 8k/sec from pagefile, 0 writes /sec to pagefile. I am wondering what info it reads from page file, why?