Viewing 15 posts - 1 through 15 (of 254 total)
Try to find all connections to your database:
select d.name,
p.*
from sys.databases d join sys.sysprocesses p
...
August 28, 2012 at 8:35 pm
sysobjects view does not contain users. Use this script:
if exists (select * from sys.sysusers where name='test2')
drop user test2
GO
March 31, 2010 at 8:28 pm
Yes you can do conditional sorting. For example, to put 'dunlap' at the top and sort all the rest values:
select * from t1
order by case
when c1 <> 'dunlap' then c1...
March 15, 2010 at 7:00 pm
Yes, here it is:
---------------------------------------------------------------------Microsoft SQL Server 2005 - 9.00.1399.06 (Intel X86)
Oct 14 2005 00:33:37
Copyright (c) 1988-2005 Microsoft Corporation
Standard Edition on Windows NT 5.1 (Build 2600: Service Pack 2)
December 9, 2009 at 7:17 am
Thanks Lowel and Steve for your replies, but I am little bit confused.
I have my SQL Server 2005 Standard Edition (and it is properly licenced) installed on my home...
December 8, 2009 at 5:49 pm
Thanks a lot. This is exactly what I needed.
December 9, 2008 at 8:21 am
Yes, I use that drop-down, but I want to change it permanantly.
November 25, 2008 at 4:41 pm
Yes, I will use ALTER PARTITION FUNCTION.
November 21, 2008 at 2:32 pm
Thanks, John. sys.partition_range_values is what I wanted.
November 21, 2008 at 2:31 pm
When I pasted my code, this site changed removed all my brackets. I replaced them with quotes (") here.
Here is the code:
1. Alter "your_large_table" add surrogate_key not null int identity(1,1);
2....
November 11, 2008 at 1:10 pm
I think you can do it without looping through while/cursor. But you need to alter both details and lookup table.
Here is what I suggest:
1. Alter "your_large_table" add surrogate_key not...
November 11, 2008 at 1:08 pm
I think you can do it without looping through while/cursor. But you need to alter both details and lookup table.
Here is what I suggest:
1. Alter add surrogate_key...
November 11, 2008 at 1:06 pm
You can query sys.dm_db_session_space_usage system view.
It will show you number of pages allocated per each SPID in tempdb. Going from there, you can get the largest SPIDs are doing...
November 7, 2008 at 12:09 pm
Did you receive this error as a response to what ? Did you get it from SSMS or from your runninng application ? It is possible that developers used this...
October 23, 2008 at 11:36 am
If your system is 2005 you can also use this:
select
num = row_number() over (order by sum(f.size)*8/1024 desc),
database_name = left(d.name,30),
...
October 22, 2008 at 3:18 pm
Viewing 15 posts - 1 through 15 (of 254 total)