Viewing 15 posts - 871 through 885 (of 5,393 total)
With that query you created a stored procedure. To execute it and see the results just issue:
EXEC sp_whoisactive
-- Gianluca Sartori
December 12, 2014 at 3:38 am
If you want to export a whole result set to Excel, the easiest way I know of is a small ad free Management Studio add-in called ssmsboost. It can export...
-- Gianluca Sartori
December 12, 2014 at 3:12 am
Don't use activity monitor, it falls short in many areas.
I suggest that you use Adam Machanic's sp_WhoIsActive.
-- Gianluca Sartori
December 12, 2014 at 3:10 am
Which flavour of replication? Merge? Transactional? Snapshot? P2P?
Also, if Merge or Transactional, is subscriber updateable (two-way or one-way replication)?
-- Gianluca Sartori
December 12, 2014 at 2:39 am
andrew gothard (12/10/2014)
spaghettidba (12/10/2014)
SQLRNNR (12/10/2014)
andrew gothard (12/10/2014)
Aye - I've got one of those too. Even better - unless I've completely misread the trace, someone - somewhere read that "SQL...
-- Gianluca Sartori
December 11, 2014 at 1:32 am
It's the NULL value that breaks the function.
Try this:
DECLARE @val nvarchar(max)
SELECT TOP(LEN(@val)) 1 AS one
Results:
Msg 1014, Level 15, State 1, Line 3
A TOP or FETCH clause contains an invalid value.
-- Gianluca Sartori
December 10, 2014 at 10:12 am
It's a crosstab:
SELECT SUM(CASE WHEN prt_created = lastMonth THEN 1 ELSE 0 END) as lastMonthData,
SUM(CASE WHEN prt_created = currentMonth THEN 1 ELSE 0 END) as currentMonthData
FROM PARTICIPLES
Hope this helps
-- Gianluca Sartori
December 10, 2014 at 8:56 am
snomadj (12/10/2014)
Thank you both, but aren't you both saying different things?M&W unavailable. Does the P stay online?
My bad, I totally misread the question.
Gazareth and Perry are right:...
-- Gianluca Sartori
December 10, 2014 at 8:23 am
SQLRNNR (12/10/2014)
andrew gothard (12/10/2014)
Aye - I've got one of those too. Even better - unless I've completely misread the trace, someone - somewhere read that "SQL Server works better...
-- Gianluca Sartori
December 10, 2014 at 8:00 am
When P is P, nothing happens.
When M is P, no automatic failover occurs.
-- Gianluca Sartori
December 10, 2014 at 7:53 am
It doesn't appear there is much to do to convert from varbinary(max) to XML;
DECLARE @test-2 TABLE (
varbincol varbinary(max)
)
INSERT INTO @test-2 VALUES ( CAST(N'<XML><!-- A comment --></XML>' AS varbinary(MAX)))
SELECT CAST(varbincol AS...
-- Gianluca Sartori
December 10, 2014 at 3:58 am
Use the Data Collector.
It's available in all editions (express excluded for lack of SQLAgent) and it's the evolution of all the tools you mentioned. Vast parts of SQLDiag and...
-- Gianluca Sartori
December 8, 2014 at 9:30 am
Duplicate post. Replies here please: http://www.sqlservercentral.com/Forums/FindPost1641725.aspx
-- Gianluca Sartori
December 5, 2014 at 2:15 am
This should do the trick:
WITH SampleData (AccountNo, OpenDate, CloseDate) AS(
SELECT 1361677, '20121203', '20140102'
UNION ALL SELECT 1361771, '20121205', '20130219'
UNION ALL SELECT...
-- Gianluca Sartori
December 4, 2014 at 7:06 am
Viewing 15 posts - 871 through 885 (of 5,393 total)