what's the differences between the following locks ?
Intent Shared (IS) |
Intent Update (IU) |
Intent Exclusive (IX) |
Shared Intent Update (SIU) |
Shared Intent Exclusive (SIX) |
Update Intent Exclusive (UIX) |
what's the differences between the following locks ?
Intent Shared (IS) |
Intent Update (IU) |
Intent Exclusive (IX) |
Shared Intent Update (SIU) |
Shared Intent Exclusive (SIX) |
Update Intent Exclusive (UIX) |
If we set the database recovery option to bulk-logged before Rebuilding index, in-case during the rebuild index the system crash .
the rebuild index operation will be ROLLBACK ?
is there any way to make sure if the extent allocation (64KB) are continuously allocated (uniform extents) on the physical disk?
Pre allocate the data files size can do that ?
are there any calculation for column avg_fragmentation_in_percent ?
So avg_fragment_size_in_pages = Page_count/fragment_count.
I am having a SQL Server 2016 instance , and I found that update statistics with sample 10 percent not always works for small tables.
for example I have a table have 10000 rows , and update stats with sample 10 percent. Using dbcc show_statistics doesn't return sample 1000 rows.
For bigger table (larger than 1M and more) , this seems work .
Are there any threshold that SQL Engine will ignore the update stats with sample ?
Hello,
In my SQL instance I have 1 TempDB mdf and 7 ndf files which all grew to 63 gb and filled up the 500 gb drive.
I got permission to reboot server, however, TempDB files did not shrink.
What should I do?
I have the following 2 xevent, and I am just wondering how to query it using TSQL ?
CREATE EVENT SESSION [audit_login] ON SERVER
ADD EVENT sqlserver.error_reported(
ACTION(sqlserver.client_app_name,sqlserver.client_hostname,sqlserver.database_id,sqlserver.database_name,sqlserver.nt_username,sqlserver.session_id,sqlserver.session_nt_username,sqlserver.sql_text)
WHERE ([package0].[equal_int64]([severity],(14)) AND [package0].[equal_int64]([error_number],(18456)) AND [package0].[greater_than_int64]([state],(1)) OR [package0].[equal_int64]([error_number],(18470)))),
ADD EVENT sqlserver.login(
ACTION(sqlserver.client_app_name,sqlserver.client_hostname,sqlserver.database_id,sqlserver.database_name,sqlserver.nt_username,sqlserver.session_id))
ADD TARGET package0.event_file(SET filename=N'H:\db_audit\audit_login.xel',max_rollover_files=(30))
WITH (MAX_MEMORY=4096 KB,EVENT_RETENTION_MODE=ALLOW_SINGLE_EVENT_LOSS,MAX_DISPATCH_LATENCY=30 SECONDS,MAX_EVENT_SIZE=0 KB,MEMORY_PARTITION_MODE=NONE,TRACK_CAUSALITY=OFF,STARTUP_STATE=ON)
GO
CREATE EVENT SESSION [audit_dba] ON SERVER
ADD EVENT sqlserver.sql_statement_completed(SET collect_statement=(1)
ACTION(sqlserver.client_app_name,sqlserver.client_hostname,sqlserver.database_id,sqlserver.database_name,sqlserver.nt_username,sqlserver.session_id,sqlserver.sql_text)
WHERE ([sqlserver].[equal_i_sql_unicode_string]([sqlserver].[nt_user],N'user1') OR [sqlserver].[equal_i_sql_unicode_string]([sqlserver].[nt_user],N'user2')))
ADD TARGET package0.event_file(SET filename=N'H:\db_audit\audit_dba.xel',max_rollover_files=(30))
WITH (MAX_MEMORY=4096 KB,EVENT_RETENTION_MODE=ALLOW_SINGLE_EVENT_LOSS,MAX_DISPATCH_LATENCY=30 SECONDS,MAX_EVENT_SIZE=0 KB,MEMORY_PARTITION_MODE=NONE,TRACK_CAUSALITY=OFF,STARTUP_STATE=ON)
GO
Sql server A, Sql server B, oracle database server C
Now,
SQL server B load data from oracle database server C to sql server B's database BB, using store procedure Load_oracle
On SQL server A,
I create link server to connect SQL server B. Then run following T-sql to load from oracle database server C to sql server B's database BB
I use following t-sql on sql server A
DECLARE @RunStoredProcSQL VARCHAR(1000);
SET @RunStoredProcSQL = 'EXEC [B].[dbo].[Load_oracle]';
EXEC (@RunStoredProcSQL) AT [B];
It is successful. Takes 5 minutes to complete store procedure Load_oracle running on sql server B.I execute sql server query window under SSMS: paste those coding and execute
However, after I createed a job under sql server agent on server A, here is screenshot.
I ran the job on Server A
I get failure message:
Executed as user: domain\user. Cannot create an instance of OLE DB provider "OraOLEDB.Oracle" for linked server "xxxx"(oracle server name). [SQLSTATE 42000] (Error 7302). The step failed.
I checked providers under linked server: no OraOlEDB.oracle .
What's the problem? and how to fix it? It is successful under sql server query windows under sql server management studio?-- I past the code and run. But fail when I run these code though sql server agent job. Why?
Application team is facing intermittent connectivity issues to the database, they are facing below error, after multiple tries they are able to connect to the database.
Databases servers are configured with 3 node AlwaysON.
Application Servers are on Azure.
Could anyone help what could be the issue ?
Error:
System.Data.SqlClient.SqlException (0x80131904): 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) ---> System.ComponentModel.Win32Exception (0x80004005): Access is denied
hi we are running 2014 enterprise and the following alter command doesnt seem to work...i tried rowversion also. I know i've done something similar before but on later versions of sql most likely.
ALTER TABLE mytable ADD [RV] timestamp, RVcast bigint DEFAULT (CONVERT([bigint],[RV]))
i get the following error
Msg 128, Level 15, State 1, Line 1
Microsoft SQL: A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: TCP Provider, error: 0 - The specified network name is no longer available.)
Getting above error intermittently with some prod DB servers (2016) while connecting from SSMS.
there is article published from serverA to serverB (transaction Replication)
Table: product
datatype: varchar(50)
when am going to alter the table ,
alter table product alter column name nvarchar(50)
getting below error, & replication fails.
Msg 5074, Level 16, State 1, Line 32
The object 'v_fti_product' is dependent on column 'name'.
Msg 5074, Level 16, State 1, Line 32
The index 'is_product_site_id_vendor_id_includes__1' is dependent on column 'name'.
Msg 5074, Level 16, State 1, Line 32
The index 'IX_product_man__1' is dependent on column 'name'.
Msg 5074, Level 16, State 1, Line 32
The index 'IX_product_man___1' is dependent on column 'name'.
Msg 5074, Level 16, State 1, Line 32
The index 'NUNCLIX__56984' is dependent on column 'name'.
Msg 5074, Level 16, State 1, Line 32
The index 'ncls_Product_vendorid_incl_id_name' is dependent on column 'name'.
Msg 4922, Level 16, State 9, Line 32
ALTER TABLE ALTER COLUMN name failed because one or more objects access this column
Hello Experts,
SQL server is in windows cluster 2012 and it is in VM ware. Some times this server is going hung state and it is fail over to another node with out showing any error message.
And there was no activity in background to at least to assume there is something.
But last time i heard that it is because of Vmotion and holding sql server log files and trying to move to another vm node. But this time there is no error message but sql went to stopped state.
Is there any method to capture the information why sql server and windows server is going to hung state?
This is the large error message i found it before it went to stopped state.
Cluster resource 'SQL Server' of type 'SQL Server' in clustered role 'SQL Server (MSSQLSERVER)' failed.
Based on the failure policies for the resource and role, the cluster service may try to bring the resource online on this node or move the group to another node of the cluster and then restart it. Check the resource and group state using Failover Cluster Manager or the Get-ClusterResource Windows PowerShell cmdlet.
Hi All,
I am trying to access data in my azure cosmosdb using SQL Server PolyBase (cosmosdb was created using "Azure Cosmos DB for MongoDB API)
I am able to connect and access documents using mongo shell. However when trying to create external table, getting below error.
Searched though PolyBase logs and could not find any useful information which can help troubleshoot the issue.
Hence posting it here.
SQL Server version : Microsoft SQL Server 2019 (RTM-CU4) (KB4548597)
CREATE DATABASE SCOPED CREDENTIAL azure_cosmos_db_cred_using_mongodb_connect_stringAll,
I have to come up with a comparison for SQLServer 2019 BDC. What other softwares can it be compared with (both Vendor based and OpenSource)?
Thanks,
gopi
hi we run 2014 standard. does anybody know what this error means? its definitely related to a computed column i just added over which a non clustered unique index was built. the computed column is called RVcast which is simply a cast of another recently added rowversion column into bigint.
---> System.Data.SqlClient.SqlException: INSERT failed because the following SET options have incorrect settings: 'QUOTED_IDENTIFIER'. Verify that SET options are correct for use with indexed views and/or indexes on computed columns and/or filtered indexes and/or query notifications and/or XML data type methods and/or spatial index operations.
Hi All.
I have several sql server instances running SQL Server 2016, sp2
Microsoft SQL Server 2016 (SP2-GDR) (KB4532097) - 13.0.5102.14 (X64) Dec 31 2019 22:39:35 Copyright (c) Microsoft Corporation Enterprise Edition: Core-based Licensing (64-bit) on Windows Server 2016 Standard 10.0<X64> (Build 14393: ) (Hypervisor)
I have configured SQL Server Database mail but my mail is not sending to recipient.
As per some blogs there were mail issues with SP1 where it should have .NET 3.5 framework should installed but mine is SP2 and it has all the same sign like SP1 mail issue.
When I launch DatabaseMail.exe in binn folder I see this error
The following feature couldnt be installed
.NET Framework 3.5 (Include .NET 2.0 and 3.0)
As per this workaround
https://support.microsoft.com/en-gb/help/3186435/sql-server-2016-database-mail-doesn-t-work-when-net-framework-3-5
I opted for Workaround 1 and placed the DatabaseMail.exe.config to same bill folder and now when I launch DatabaseMail.exe Its is opening a black console window, I think that was expectation so I thought now my mail issue is gone but then I still have the issue.
Though the .NET 3.5 Framework issues was related to SP1 but I have the same symptom where as I have SP2.
Help me to get rid this issue.. There are few constraint though ..
I can not ask for install .NET 3.5 framework as I didn't fine any blog where it is saying the issue could be with SP2 also.
I can not ask for repair SQL Server.