SQL Server Agent Job Notify multiple operators on failure

Question: Is it possible to setup a notification email being sent to multiple operators for that specific job? I don’t believe this is possible. Certainly looking at the structure of [msdb].[dbo].[sysjobs] the various operator_id columns are in this table itself which would support the idea that 1 to many is not possible. But some alternatives … Read more

How to execute function in SQL Server 2008

It looks like there’s something else called Afisho_rankimin in your DB so the function is not being created. Try calling your function something else. E.g. CREATE FUNCTION dbo.Afisho_rankimin1(@emri_rest int) RETURNS int AS BEGIN Declare @rankimi int Select @rankimi=dbo.RESTORANTET.Rankimi From RESTORANTET Where dbo.RESTORANTET.ID_Rest=@emri_rest RETURN @rankimi END GO Note that you need to call this only once, … Read more

Is there a SELECT … INTO OUTFILE equivalent in SQL Server Management Studio?

In SSMS, “Query” menu item… “Results to”… “Results to File” Shortcut = CTRL+shift+F You can set it globally too “Tools”… “Options”… “Query Results”… “SQL Server”.. “Default destination” drop down Edit: after comment In SSMS, “Query” menu item… “SQLCMD” mode This allows you to run “command line” like actions. A quick test in my SSMS 2008 … Read more