Quantcast
Channel: SQL Server Database Engine forum
Viewing all 5123 articles
Browse latest View live

Intent lock blocked (blocked process report)

$
0
0

I have those queries which lasts 2 or 3 minutes causing shared locks in read committed mode.

The goal of intent lock is to indicate a lower level lock exists on a table or a page to prevent other locks from happening at the page or table level.

What I don't get is why the opposite is also true, why does an intent exclusive lock waits on shared locks? The intent lock is just an indication to prevent other pages or table locks from happening.  It is not an actual lock, the database does not require to lock the whole table to update a single row...

Why would the "blocked process report" report an intent exclusive lock blocked by shared locks?

I have those blockings reported by the blocked process report using extended event sessions under SQL server 2012 in read committed isolation.


enable dedicated admin connection

$
0
0

HI

Enable dedicated admin connection but getting like below error please advice me

TITLE: Connect to Server
------------------------------

Cannot connect to ADMIN:DBSERVER.

------------------------------
ADDITIONAL INFORMATION:

Dedicated administrator connections are not supported via SSMS as it establishes multiple connections by design. (Microsoft.SqlServer.Management.SqlStudio.Explorer)

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

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


baskarlakshmi

sys.dm_exec_describe_first_result_set returns wrong metadata for inline table-valued functions and identity columns

$
0
0

Hello everybody,

i came across a strange behavior.

Suppose to have a table (MyTable) with an identity column and then to create a simple function (MyFunction) that only returns "select *" from that table.

now run sys.dm_exec_describe_first_result_set on both "SELECT * FROM MyTable" and "SELECT * FROM MyFunction"

I got that is_identity_column and is_updateable are wrong for the function

P.S.

It is not documented, but the result of a TVF is, in fact, updatable..

see wrong metadata returned for table valued functions and identity columns for detailed ticket and examples

Has anyone had the same problem?





SQL 2016 data collections Server Activity report charts showing no data

$
0
0

On a SQL 2016 server the Server Activity History report from Data Collections is only returning data for some charts (Wait stats and memory usage). The other charts such as "SQL Server Activity" show "no data available". I have restarted and uploaded the system collection sets and cleared the MDW cache, also checked the logs and there are no errors. When running the query below from the server activity history.rdl it returns no data because the [snapshots.performance_counters] view contains no rows:

SELECT SUBSTRING(pc.path, CHARINDEX(N'\', pc.path, 2)+1, LEN(pc.path) - CHARINDEX(N'\', pc.path, 2)) as series,
s.snapshot_time_id,
CONVERT (datetime, SWITCHOFFSET (CAST (s.snapshot_time AS datetimeoffset(7)), '+00:00')) AS snapshot_time,
CONVERT (datetime, SWITCHOFFSET (CAST (pc.collection_time AS datetimeoffset(7)), '+00:00')) AS collection_time,
pc.formatted_value
FROM snapshots.performance_counters pc
JOIN core.snapshots s ON (s.snapshot_id = pc.snapshot_id)

-- change SQL instance to your server
WHERE s.instance_name = '<SQL instance>'

AND s.snapshot_time_id BETWEEN @snapshot_start_time_ID AND @snapshot_end_time_ID
AND (pc.performance_object_name LIKE '%SQL%:General Statistics' OR pc.performance_object_name LIKE '%SQL%:SQL Statistics')
AND pc.performance_counter_name IN ('Logins/sec', 'Logouts/sec', 'Batch Requests/sec', 'Transactions',
'User Connections', 'SQL Compilations/sec', 'SQL Re-Compilations/sec')

Any ideas?

Thanks,

Matt


Matt

Best possible ways to disable index before insert operation and enable back Index after insert

$
0
0

Hi I'm planning to create a Non-clustered columnstore index on SQL Server 2014.

But non clustered column store index is ready only and cannot perform DML operations, we need to disable before insert  and enable back after insert.

What are the best possible ways to perform this task?  

MSSQL Server Generic

$
0
0

Hi,

When i try to install SSL certificate on SQL Server 2012 i am getting this error:

It was working fine before. Please help me what to do?

Computing minimum and maximum for each id

$
0
0

Dear all

I have a table in which for each record i have 3 or more rows of date time like below.how can i compute minimum and maximum of all times for each id? 

Table1

id     datetime

1      x1

1      x2

1      x3

2      c1

2      c2

3

.

.

Database Engine Tuning Advisor

$
0
0
What is the purpose of "Database Engine Tuning Advisor" and how to use it?

SQL Server Service Pack not finding instance name and any features

$
0
0

I am trying to install SQL Server 2008 R2 service pack 3 but setup is not able to find any sql features installed.

I also run SQL discovery report but it also comes blank.

1) I have downloaded setup twice, If setup is having issue discovery report should work.

2) I checked current version is SP2

3) I have using X64 SQL instance and using same setup

Anybody suggest something?


Regards,
Rohit Garg
(My Blog)
This posting is provided with no warranties and confers no rights.
Please remember to click Mark as Answer and Vote as Helpful on posts that help you. This can be beneficial to other community members reading the thread.

Not able to take Differential backups

$
0
0

Hi,

We have SQL 2008 R2 Enterprise edition. We have full DB/Txn log backups scheduled and they run fine. We have also scheduled differential backups which run at times and fails most of the time with the below error:

Cannot perform a differential backup for database "XXX", because a current database backup does not exist. Perform a full database backup by reissuing BACKUP DATABASE, omitting the WITH DIFFERENTIAL option.  BACKUP DATABASE is terminating abnormally.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly. 

Though we have full DB backup taken today morning we still get this error when tried to run now. I checked few posts and found that SQL Server VSS writer should be up and running which is already running in our server. But still this does not work.

This server is configured with Team foundation server. I am not sure if that has any impact on the DB differential failures. Can anyone help to fix this issue?

Thanks

fn_dump_dblog function causes system assertion check failure

$
0
0

Hi,

I am trying to utilize the undocumented fn_dump_dblog function as part of a replication implementation. It works as expected on SQL 2014. But SQL 2016 yields the  error below. Has anyone else encountered this issue?

Location:dumplog.cpp:11434
Expression:m_seqnum == BACKUPSET_DBLOG
SPID:72
Process ID:3319
Msg 3624, Level 20, State 1, Line 1
A system assertion check has failed. Check the SQL Server error log for details. Typically, an assertion failure is caused by a software bug or data corruption. To check for database corruption, consider running DBCC CHECKDB. If you agreed to send dumps to Microsoft during setup, a mini dump will be sent to Microsoft. An update might be available from Microsoft in the latest Service Pack or in a Hotfix from Technical Support.
Msg 596, Level 21, State 1, Line 0
Cannot continue the execution because the session is in the kill state.
Msg 0, Level 20, State 0, Line 0
A severe error occurred on the current command.  The results, if any, should be discarded.


SQL Server Clustering

$
0
0

Hi All,

I have two node cluster for SQL server  consider "A" - as active and "B"-as Passive

I have manually pause "B" From Failover Cluster Manager and reboot B Node
now in clustering got error Cluster resource got failed  with following errors in cluster manager 
I have manually Start Role for "A" now may question is why its happening all the time 

I think its happening because of cluster disk failed but don't know why cluster disk is failing as this disk present in Node "A".

'Cluster Disk 7 is Disk Witness Quorum

Error:

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

Cluster node 'A' was removed from the active failover cluster membership. The Cluster service on this node may have stopped. This could also be due to the node having lost communication with other active nodes in the failover cluster. Run the Validate a Configuration wizard to check your network configuration. If the condition persists, check for hardware or software errors related to the network adapters on this node. Also check for failures in any other network components to which the node is connected such as hubs, switches, or bridges.


Cluster resource 'Cluster Disk 7' of type 'Physical Disk' in clustered role 'Cluster Group' 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.


Asking for testing tool

$
0
0
hello guys,  is there any useful tool to test sql server

How to identify SQL Server data changes in Databases and SQL Agent job changes?

$
0
0

Hi All

We have SQL server 2014 BI version, and few databases on it.

I have one database which we use for data warehouse, and it update only once during the day by a SQL Agent job.

I want to find out a suitable mechanism to see any data changes happening any time after normal run of SQL server agent job and who and what data is involved?

Further is there any way that I could use to see

1. Database Index changes. ( Who change it and what is been modified )

2. Changes happen to SQL Server Agent jobs? ( Who change it and what is been modified )

Regards,

Mira

SQL Server on Linux

$
0
0
Installed SQL Server Vnext on Linux  

Microsoft SQL Server vNext (CTP1) - 14.0.1.246 (X64)   Nov  1 2016 23:24:39   Copyright (c) Microsoft Corporation  on Linux (Red Hat Enterprise Linux Server 7.2 (Maipo))

select * from sys.master_file returns incorrect result format.

 sqlcmd -S localhost -U sa -p
Password:
1> select physical_name from sys.master_files;
2> go
physical_name                                                                                                                                                          
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
C:\var\opt\mssql\data\master.mdf                                                                                                                                       
C:\var\opt\mssql\data\mastlog.ldf                                                                                                                                      
C:\var\opt\mssql\data\tempdb.mdf                                                                                                                                       
C:\var\opt\mssql\data\templog.ldf                                                                                                                                      
C:\var\opt\mssql\data\model.mdf                                                                                                                                        
C:\var\opt\mssql\data\modellog.ldf                                                                                                                                     
C:\var\opt\mssql\data\MSDBData.mdf                                                                                                                                     
C:\var\opt\mssql\data\MSDBLog.ldf                                                                                                                                      
C:\var\opt\mssql\data\db1.mdf                                                                                                                                          
C:\var\opt\mssql\data\db1_log.ldf                                                                                                                                      

(10 rows affected)

Network packet size (bytes): 4096
1 xact[s]:
Clock Time (ms.): total         7  avg   7.0 (142.9 xacts per sec.)
 
Is this a known issue  ?

Database exception: SMux Provider: Physical connection is not usable [xFFFFFFFF]

$
0
0

Hello,

In my application some time i will get below error message:

Database exception: SMux Provider: Physical connection is not usable [xFFFFFFFF]. Unable to open a logical session State:08S02,Native:-1,Origin:[Microsoft][SQL Server Native Client 11.0] State:08S02,Native:-1,Origin:[Microsoft][SQL Server Native Client 11.0]

It seems to be DB connection is getting lost in between. But I didn't find root cause why DB connection is failing.

SQL Server is installed on Virtual machine.

Any idea why application is getting lost DB connection?

Regards,

Narasimhulu


Understanding moving primary key clustered index to a new file group.

$
0
0

Hello,

we are planning to move primary key clustered index to a new file group to save some space on primary file group. We are planning to use following command to move it to the new file group,

CREATE UNIQUE CLUSTERED INDEX PK_sales_sales_id ON sales(sales_id)WITH (DROP_EXISTING =  ON )ON [Sales_Index_File_Group]

Questions:
1) As per my understanding the cluster index holds actual data, will the actual data will move to new file group ? how it internally works ? Appreciate if you can provide any other useful internals on this.

Thanks.

R In-Database scripting available on linux?

$
0
0

Is R In-Database scripting available on linux? I could successfully enable

"Exec sp_configure  'external scripts enabled', 1",

but on server restart the log says:

2016-11-17 15:07:08.99 spid21s     Error: 26024, Severity: 16, State: 1.
2016-11-17 15:07:08.99 spid21s     Server failed to listen on 127.0.0.1 <ipv4> 0. Error: 0x2726. To proceed, notify your system administrator.
2016-11-17 15:07:08.99 spid21s     Error: 39002, Severity: 16, State: 1.
2016-11-17 15:07:08.99 spid21s     SQL failed to boot extensibility for error code 0x2726.
2016-11-17 15:07:08.99 spid21s     SQL Server is now ready for client connections. This is an informational message; no user action is required.

Thank you!

Creating SQL Alias for Sharepoint2013 AFTER farm installed - documentations pls !!

$
0
0

Hello,

I've seen similar posts but have not seen complete procedures on how to go about it. 

My problem: I have an existing *new* SP2013 farm (single server). After installation of farm we realized we had to create the SQLAliases. 

Please can you propose an article detailing the steps to take including the possible problems encountered and its resolutions.

We have a 3-tier Sharepoint farm with SQL installed as a named instance. TCP/IP as dynamic ports. 

Please note the farm was configured by someone else, I am new on the team and am taking on this project ;-)

thanks in advance


Esperanza


SERVER= Property in an Excel Connection String

$
0
0

I have the following property in my Excel Connection String

SERVER=RPDDEV_RPT

This is referencing an alias I suppose. Is there any way I can tell what that alias is referencing?

I looked within SQL Server Configuration Manager and found no aliases at all.

I also checked within Data Sources (ODBC) and found nothing there as well

What am I missing here?

Thanks for your review and am hopeful for a reply.

Viewing all 5123 articles
Browse latest View live


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