Viewing 15 posts - 241 through 255 (of 5,394 total)
You can designate one of your servers as a Central Management Server.
It stores only the server registration, so nothing more than a server name. If you want to store...
January 11, 2016 at 11:16 am
It looks like a client formatting thing: I wouldn't bother doing that in T-SQL. Is there a particular reason why you need that?
January 11, 2016 at 5:13 am
dallas13 (12/4/2015)
And I put it in 2008 becuase 2005 and 2008 are still very...
December 4, 2015 at 9:31 am
Let's see if I understand correctly:
* you said you're on 2014
* you posted in the 2008 forums
* you are on 2005 instead
OK, makes sense now 🙂
December 4, 2015 at 7:33 am
Here is a quick and dirty example.
First, you need an event session:
CREATE EVENT SESSION [Audit_Logon] ON SERVER
ADD EVENT sqlserver.LOGIN (
SET collect_database_name = (1)
,collect_options_text = (0)
ACTION(sqlserver.client_app_name, sqlserver.client_hostname, sqlserver.server_principal_name)
)
WITH (
MAX_MEMORY...
December 4, 2015 at 2:11 am
I had to do something quite similar this year and I can share my experience with it.
Personally, I would avoid both logon triggers and service broker for this particular problem.
Logon...
December 4, 2015 at 1:48 am
My pleasure, Matija!
Was the query using a lot of tempdb space? I'm curious to know how OPTION RECOMPILE made it stop doing so. Maybe a wrong cached plan?
December 2, 2015 at 3:11 pm
You also need to specify the database where the query should run. It's one of the parameters.
As an alternative, you can qualify the object names in the query with three-part...
November 23, 2015 at 3:48 am
You need to escape the quotes inside the query: ' (single quote) has to be turned to '' (two single quotes, not double quote).
EXEC msdb.dbo.sp_send_dbmail
@profile_name = 'MailProfile1',
@recipients = 'someone@microsoft.com',
@subject =...
November 23, 2015 at 3:22 am
OK, so what's the problem?
November 20, 2015 at 4:35 am
SQL Server tries to use all the available RAM by default. This is expected and desirable in a dedicated SQL Server box.
If you have other applications running on the same...
November 20, 2015 at 4:22 am
SELECT id,
[Output] = ISNULL(STUFF(
CASE C1 WHEN 1 THEN ',A' ELSE '' END +
CASE C2 WHEN 1 THEN ',B' ELSE '' END +
CASE C3 WHEN 1 THEN ',C' ELSE ''...
November 20, 2015 at 2:46 am
My money is on port 1433. I often use this technique.
mark.williams 37494 (11/18/2015)
November 18, 2015 at 9:11 am
I suppose this should do:
INSERT INTO SurveyInterface.tblLoadISFNotification (OperatingEntityNumber, SDDS, SurveyCodeId, QuestionnaireTypeCodeId, ReferencePeriod, DataReplacementIndicator, PrecontactFlag, SampledUnitPriority)
SELECT
OperatingEntityNumber
,[SDDS]
,[SurveyCodeId]
,[QuestionnaireTypeCodeId]
,[ReferencePeriod]
,[DataReplacementIndicator]
,[PrecontactFlag]
,[SampledUnitPriority]
FROM (
SELECT
cnt = COUNT(*) OVER (PARTITION BY ISF.OperatingEntityNumber, ISF.QuestionnaireTypeCodeId),
ISF.OperatingEntityNumber
,[SDDS]
,[SurveyCodeId]
,[QuestionnaireTypeCodeId]
,[ReferencePeriod]
,[DataReplacementIndicator]
,[PrecontactFlag]
,[SampledUnitPriority]
FROM dbo.tblISF40201507 ISF
JOIN...
November 18, 2015 at 9:02 am
In a query that contains GROUP BY clause, all the columns in the select list must be in the GROUP BY clause on in an aggregate function.
Example:
SELECT ISF.OperatingEntityNumber, ISF.QuestionnaireTypeCodeId, COUNT(*)
FROM...
November 18, 2015 at 8:02 am
Viewing 15 posts - 241 through 255 (of 5,394 total)