Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

cmd job Expand / Collapse
Author
Message
Posted Wednesday, February 13, 2013 6:48 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Friday, April 26, 2013 11:23 AM
Points: 76, Visits: 188
Dear Experts

I am just trying to test this agent cmd job msg "%username%" "HI"
but an error said that this user is not existing or disconnected


Any idea to to solve this problem

I want to raise message box after an alert occured or job finished

Thanks lot
Post #1419479
Posted Wednesday, February 13, 2013 7:22 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 5:15 PM
Points: 6,720, Visits: 11,756
zi (2/13/2013)
Dear Experts

I am just trying to test this agent cmd job msg "%username%" "HI"
but an error said that this user is not existing or disconnected


Any idea to to solve this problem

I want to raise message box after an alert occured or job finished

Thanks lot

Are you talking about a SQL Server Agent Job? You cannot raise message boxes from Agent Jobs, they are unattended processes. What exactly are you wanting your users to see and when?


__________________________________________________________________________________________________
There are no special teachers of virtue, because virtue is taught by the whole community. --Plato

Believe you can and you're halfway there. --Theodore Roosevelt

Everything Should Be Made as Simple as Possible, But Not Simpler --Albert Einstein

The significant problems we face cannot be solved at the same level of thinking we were at when we created them. --Albert Einstein

1 apple is not exactly 1/8 of 8 apples. Because there are no absolutely identical apples. --Giordy
Post #1419504
Posted Wednesday, February 13, 2013 11:33 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Friday, April 26, 2013 11:23 AM
Points: 76, Visits: 188
Thanks

I am just trying to make a message box as an alert instead of operator email in case that the server has no connection to the internet to send email to the operator

The job agent has a cmd step, which it can be used to show a message box

any suggestion

Thanks
Post #1419670
Posted Wednesday, February 13, 2013 11:41 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 5:15 PM
Points: 6,720, Visits: 11,756
Agent Jobs are not built to generate popups on user's machines unless you consider NET SEND an option. The overall point however is that Jobs run on servers. If there is no connectivity to send an email why would there be connectivity to a user's workstation to invoke a popup?

I think you're barking up the wrong tree, honestly.


__________________________________________________________________________________________________
There are no special teachers of virtue, because virtue is taught by the whole community. --Plato

Believe you can and you're halfway there. --Theodore Roosevelt

Everything Should Be Made as Simple as Possible, But Not Simpler --Albert Einstein

The significant problems we face cannot be solved at the same level of thinking we were at when we created them. --Albert Einstein

1 apple is not exactly 1/8 of 8 apples. Because there are no absolutely identical apples. --Giordy
Post #1419672
Posted Thursday, February 14, 2013 1:42 AM


Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Thursday, May 16, 2013 2:23 PM
Points: 70, Visits: 54
You could use RAISERROR to write to the eventlog instead
Post #1419866
Posted Thursday, February 14, 2013 3:41 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Friday, April 26, 2013 11:23 AM
Points: 76, Visits: 188


How to use it please
Post #1419930
Posted Thursday, February 14, 2013 7:07 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 5:15 PM
Points: 6,720, Visits: 11,756
DBArrr! (2/14/2013)
You could use RAISERROR to write to the eventlog instead

I would not rely on RAISERROR writing to the event log. SQL Server no longer does that in SQL Server 2012. It only writes to the SQL Error Log.


__________________________________________________________________________________________________
There are no special teachers of virtue, because virtue is taught by the whole community. --Plato

Believe you can and you're halfway there. --Theodore Roosevelt

Everything Should Be Made as Simple as Possible, But Not Simpler --Albert Einstein

The significant problems we face cannot be solved at the same level of thinking we were at when we created them. --Albert Einstein

1 apple is not exactly 1/8 of 8 apples. Because there are no absolutely identical apples. --Giordy
Post #1420041
Posted Thursday, February 14, 2013 7:09 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 5:15 PM
Points: 6,720, Visits: 11,756
zi (2/14/2013)


How to use it please

It's part of the RAISERROR function, you say WITH LOG and SQL Server will additionally write the error to the SQL Error Log regardless of the flag in sys.messages. The SQL Error Log is what Agent Alerts take their cues from:

RAISERROR('Hello World', 16, 1) WITH LOG;

That said, none of this will help you raise a popup from a job.


__________________________________________________________________________________________________
There are no special teachers of virtue, because virtue is taught by the whole community. --Plato

Believe you can and you're halfway there. --Theodore Roosevelt

Everything Should Be Made as Simple as Possible, But Not Simpler --Albert Einstein

The significant problems we face cannot be solved at the same level of thinking we were at when we created them. --Albert Einstein

1 apple is not exactly 1/8 of 8 apples. Because there are no absolutely identical apples. --Giordy
Post #1420045
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse