Viewing 15 posts - 2,536 through 2,550 (of 5,393 total)
Can you post some sample data, so that we can try to set up some code for you?
Read the first article linked in my signature line and you will find...
-- Gianluca Sartori
October 4, 2011 at 9:19 am
It's an "island" problem.
Try this:
--setup
DECLARE @test-2 TABLE
(
[Index] INT,
[Value] INT,
[Stamp] DATETIME
)
INSERT INTO @test-2 VALUES (1, 1, '2007-08-03 08:00:00.000');
INSERT INTO @test-2 VALUES (2, 1, '2007-08-05 08:00:00.000');
INSERT INTO @test-2 VALUES (3, 3,...
-- Gianluca Sartori
October 4, 2011 at 9:17 am
The command you posted comes from the "Details" window? Is the "Command" column empty or does something show up?
In the first case, it's the last command run from that connection...
-- Gianluca Sartori
October 4, 2011 at 8:44 am
You can use Database Mail. sp_send_dbmail can send query results as an attachment or inline e-mail body.
If you share more details, we could try to help.
-- Gianluca Sartori
October 4, 2011 at 8:30 am
Is it in sys.dm_exec_sessions?
-- Gianluca Sartori
October 4, 2011 at 8:25 am
Running? I suppose it's not.
What does
SELECT status FROM sys.dm_exec_requests WHERE session_id = [session_id of the process]
return?
-- Gianluca Sartori
October 4, 2011 at 7:50 am
Looks like application code. What are you worried about exactly?
-- Gianluca Sartori
October 4, 2011 at 7:26 am
It's a fun question!
This is the best I could come up with, but I'm sure there's a better/simpler way.
DECLARE @Table1 TABLE (
ItemID int,
ItemName nvarchar(100),
ItemPrice money
);
INSERT INTO @Table1 VALUES (101, 'McDonald''s',...
-- Gianluca Sartori
October 4, 2011 at 6:50 am
I suggest avoiding this kind of expression. It can easily bring performance issues as it's prone to bad parameter sniffing.
Use dynamic SQL instead:
DECLARE @sql nvarchar(max)
SET @sql = '
SELECT *
FROM User
WHERE...
-- Gianluca Sartori
October 4, 2011 at 6:12 am
serr4no (10/4/2011)
Database consists of 30+ files with a main .mdf and .ndf partitions.Total size: 3,7 TB
I know that my comment is totally useless now, but, hell, why don't you have...
-- Gianluca Sartori
October 4, 2011 at 6:07 am
I see no commit in this cose.
Take a look at my stored procedure code template[/url] for an example.
Hope this helps
Gianluca
-- Gianluca Sartori
October 4, 2011 at 4:15 am
You probably want to shrink the log to the size it was before the reindex started.
The reindex command can grow the log enormously. Be sure to take log backups during...
-- Gianluca Sartori
October 4, 2011 at 4:00 am
No, it's not mandatory. You can have a cluster without a MSDTC resource.
However, I would recommend it. You will find the reasons here: http://technet.microsoft.com/en-us/library/cc730992(WS.10).aspx?ppud=4
-- Gianluca Sartori
October 4, 2011 at 3:56 am
+1.
However, you could calculate the SUM on the whole column in advance and use the sum to decide whether displaying or hiding the column:
DECLARE @testData TABLE (
[Kagit Cinsi] nvarchar(10),
[Sari] int,
[Yesil]...
-- Gianluca Sartori
October 4, 2011 at 3:48 am
Viewing 15 posts - 2,536 through 2,550 (of 5,393 total)