Viewing 15 posts - 136 through 150 (of 1,479 total)
Could it be that someone cycled the log since the time that the deadlock happened? If you create deadlock on purpose from SSMS do you see the deadlock's details...
--------------------------------------------------------------
To know how to ask questions and increase the chances of getting asnwers:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
March 26, 2014 at 10:11 am
Can you check if the trace flag is still turned on? You can do it with this statement:
DBCC TRACESTATUS(-1)
Adi
--------------------------------------------------------------
To know how to ask questions and increase the chances of getting asnwers:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
March 26, 2014 at 8:45 am
One more way:
declare @test varchar(1000)
set @test = 'alksjdfhkalsdhf update a;slkfjdlakjsdf where sadlkfjak!sdlfj people_table asdjfadsf'
Select case when @test like '%update%people_table%' and @test not like '%update%where%people_table%' then 1 else 0 end
Adi
--------------------------------------------------------------
To know how to ask questions and increase the chances of getting asnwers:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
March 26, 2014 at 5:43 am
You should configure the maximum amount of memory that the server should use. You can do it with the GUI or with sp_configure and the max server memory (MB)...
--------------------------------------------------------------
To know how to ask questions and increase the chances of getting asnwers:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
March 26, 2014 at 2:29 am
The parentheses have to be used when you have a none standard name. For example if you have space in the constraint's name. In other cases it has...
--------------------------------------------------------------
To know how to ask questions and increase the chances of getting asnwers:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
March 24, 2014 at 10:20 am
The main difference is that in the first statement you don't assign a name to the default constraint, so SQL Server will assign a name for it. In the...
--------------------------------------------------------------
To know how to ask questions and increase the chances of getting asnwers:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
March 24, 2014 at 10:07 am
Why would you need something like that? In any case here is one way of doing it, can you pleas explain why do you need it?
create table t (abcd1234...
--------------------------------------------------------------
To know how to ask questions and increase the chances of getting asnwers:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
March 24, 2014 at 8:00 am
Do you mean something like this?
select ABCD1234 as ABCD from #TEMP2
Adi
--------------------------------------------------------------
To know how to ask questions and increase the chances of getting asnwers:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
March 24, 2014 at 7:46 am
Yes, that helps. Here is the code that is based on your code:
create table sampletable (
apptid int not null,
starttime datetime,
duration int,
ESO int,
LSO int
)
insert into sampletable values (1,'20130112 09:45:00.000', 10,15,15)
select...
--------------------------------------------------------------
To know how to ask questions and increase the chances of getting asnwers:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
March 24, 2014 at 3:34 am
If you have the data as columns in table, you can use the column's names instead of variables. If you want to get an accurate example for your case,...
--------------------------------------------------------------
To know how to ask questions and increase the chances of getting asnwers:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
March 24, 2014 at 3:06 am
You can use the datediff function. Here is an example:
declare @StartTime datetime
declare @Duration int
declare @ESO int
declare @LSO int
SELECT @StartTime = '20130112 09:45:00', @Duration = 10,
@ESO = 15, @LSO =...
--------------------------------------------------------------
To know how to ask questions and increase the chances of getting asnwers:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
March 24, 2014 at 2:54 am
The first one need more work to be maintained by the server. It will be modified each time that one of the 4 column will be modified. The...
--------------------------------------------------------------
To know how to ask questions and increase the chances of getting asnwers:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
March 19, 2014 at 5:12 am
I'm trying to get use to put semicolons in my code, but I have to admit that most of the times I still don't put them. I remember to...
--------------------------------------------------------------
To know how to ask questions and increase the chances of getting asnwers:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
March 19, 2014 at 4:45 am
The only way to do it is to make it as dynamic SQL. Notice that this will cause concerns about security (permissions issues and SQL injection). If you'll...
--------------------------------------------------------------
To know how to ask questions and increase the chances of getting asnwers:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
March 19, 2014 at 4:39 am
I think that this one does the trick:
With DistinctPer as (
select distinct i, j from num),
NumOfJs as (
select count(*) as CountOfJs, j
from DistinctPer
group by j)
select j
from NumOfJs
where CountOfJs =...
--------------------------------------------------------------
To know how to ask questions and increase the chances of getting asnwers:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
March 18, 2014 at 8:20 am
Viewing 15 posts - 136 through 150 (of 1,479 total)