Monday, March 26, 2012
Job Scheduling question
http://www.sqldev.net/sqlagent/SQLA...gJobsInSecs.htm
"Big Ern" wrote:
> I think I know the answer to my question, but I thought I would ask to be
> sure that I'm correct. I have a need to run a job every 30 seconds, but th
e
> Job Scheduler only gives the option of a frequency of 1 minute. Is there
> anyway to set this up that way?
>I think I know the answer to my question, but I thought I would ask to be
sure that I'm correct. I have a need to run a job every 30 seconds, but the
Job Scheduler only gives the option of a frequency of 1 minute. Is there
anyway to set this up that way?|||Try this link:
http://www.sqldev.net/sqlagent/SQLA...gJobsInSecs.htm
"Big Ern" wrote:
> I think I know the answer to my question, but I thought I would ask to be
> sure that I'm correct. I have a need to run a job every 30 seconds, but th
e
> Job Scheduler only gives the option of a frequency of 1 minute. Is there
> anyway to set this up that way?
>
Friday, March 23, 2012
Job runs for a long time in SQL Server Agent 2005
I have an exe in C# in .Net 1.1. This accesses an Oracle database and an SQL Server 2000 database. It is scheduled in SQL Server Agent. It runs for normally 30 seconds and stops
Recently we migrated the database to SQL Server 2005. We created this job manually in SQL Server Agent. Even after running for 3 minutes it never stops (abnormal)
However this exe runs normally in the Windows 2003 scheduler and the command prompt.
Am stumped for an answer.
Any help
Thanks and regards
jarathna
Do have relevant oracle client drivers installed on this SQL 2005 instance?
Ibelieve this is something related to the Operating system related process, if this is scheduled via SQLagent job then ensure SQLserver serivces do have relevant privileges on that C# & Oracle based components share.
Wednesday, March 21, 2012
Job Notification
ge allows to attach a command or batch file to do this job. It is just writing the Log to Application Event Log. Any feedback would be appreciated.
There're about three ways to email a notification for a job:
1. Install MAPI and Outlook to have SQLMAIL work together with Exchange.
2. Install xp_smtp_mail and it's dll to bypass MAPI.
3. Install sp_send_cdosysmail and use this stored procedure to send out
email.
I personally prefer sqlmail due to it's rich features. But be aware of its
total dependency on MS Exchange.
"Fraz" <Fraz@.discussions.microsoft.com> wrote in message
news:55D6ACD2-73BC-46F9-894B-8F1F9F4DC4C2@.microsoft.com...
> On our SQL 2000 server there is no MAPI client or Outlook installed. The
NET SEND command has been disabled on the server/network. The xp_sendmail
can not be used due to SQL Mail not started due to no Outlook profile. I
don't find that the Notification page allows to attach a command or batch
file to do this job. It is just writing the Log to Application Event Log.
Any feedback would be appreciated.
|||Hello Richard,
Thanks for your valuable feedback. I looked for xp_smtp_mail and sp_send_cdosysmail in the Master database but could find them. Could you please let me know where I can find these procedures. Thanks...Fraz
"Richard Ding" wrote:
> There're about three ways to email a notification for a job:
> 1. Install MAPI and Outlook to have SQLMAIL work together with Exchange.
> 2. Install xp_smtp_mail and it's dll to bypass MAPI.
> 3. Install sp_send_cdosysmail and use this stored procedure to send out
> email.
> I personally prefer sqlmail due to it's rich features. But be aware of its
> total dependency on MS Exchange.
>
> "Fraz" <Fraz@.discussions.microsoft.com> wrote in message
> news:55D6ACD2-73BC-46F9-894B-8F1F9F4DC4C2@.microsoft.com...
> NET SEND command has been disabled on the server/network. The xp_sendmail
> can not be used due to SQL Mail not started due to no Outlook profile. I
> don't find that the Notification page allows to attach a command or batch
> file to do this job. It is just writing the Log to Application Event Log.
> Any feedback would be appreciated.
>
>
|||Hello Richard: Thanks for your feedback. Will appreciate if you could let me know where I can find xp_smtp_mail and sp_send_cdosysmail procedures. Thanks...Fraz
"Richard Ding" wrote:
> There're about three ways to email a notification for a job:
> 1. Install MAPI and Outlook to have SQLMAIL work together with Exchange.
> 2. Install xp_smtp_mail and it's dll to bypass MAPI.
> 3. Install sp_send_cdosysmail and use this stored procedure to send out
> email.
> I personally prefer sqlmail due to it's rich features. But be aware of its
> total dependency on MS Exchange.
>
> "Fraz" <Fraz@.discussions.microsoft.com> wrote in message
> news:55D6ACD2-73BC-46F9-894B-8F1F9F4DC4C2@.microsoft.com...
> NET SEND command has been disabled on the server/network. The xp_sendmail
> can not be used due to SQL Mail not started due to no Outlook profile. I
> don't find that the Notification page allows to attach a command or batch
> file to do this job. It is just writing the Log to Application Event Log.
> Any feedback would be appreciated.
>
>
|||Below might be useful:
http://www.karaszi.com/SQLServer/info_no_mapi.asp
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Fraz" <Fraz@.discussions.microsoft.com> wrote in message
news:1858581C-7207-4788-B9D3-5C02874DB8A3@.microsoft.com...
> Hello Richard,
> Thanks for your valuable feedback. I looked for xp_smtp_mail and sp_send_cdosysmail in the Master database
but could find them. Could you please let me know where I can find these procedures. Thanks...Fraz[vbcol=seagreen]
> "Richard Ding" wrote:
sql
Job Notification
SEND command has been disabled on the server/network. The xp_sendmail can n
ot be used due to SQL Mail not started due to no Outlook profile. I don't fi
nd that the Notification pa
ge allows to attach a command or batch file to do this job. It is just writi
ng the Log to Application Event Log. Any feedback would be appreciated.There're about three ways to email a notification for a job:
1. Install MAPI and Outlook to have SQLMAIL work together with Exchange.
2. Install xp_smtp_mail and it's dll to bypass MAPI.
3. Install sp_send_cdosysmail and use this stored procedure to send out
email.
I personally prefer sqlmail due to it's rich features. But be aware of its
total dependency on MS Exchange.
"Fraz" <Fraz@.discussions.microsoft.com> wrote in message
news:55D6ACD2-73BC-46F9-894B-8F1F9F4DC4C2@.microsoft.com...
> On our SQL 2000 server there is no MAPI client or Outlook installed. The
NET SEND command has been disabled on the server/network. The xp_sendmail
can not be used due to SQL Mail not started due to no Outlook profile. I
don't find that the Notification page allows to attach a command or batch
file to do this job. It is just writing the Log to Application Event Log.
Any feedback would be appreciated.|||Hello Richard,
Thanks for your valuable feedback. I looked for xp_smtp_mail and sp_send_cdo
sysmail in the Master database but could find them. Could you please let me
know where I can find these procedures. Thanks...Fraz
"Richard Ding" wrote:
> There're about three ways to email a notification for a job:
> 1. Install MAPI and Outlook to have SQLMAIL work together with Exchange.
> 2. Install xp_smtp_mail and it's dll to bypass MAPI.
> 3. Install sp_send_cdosysmail and use this stored procedure to send out
> email.
> I personally prefer sqlmail due to it's rich features. But be aware of its
> total dependency on MS Exchange.
>
> "Fraz" <Fraz@.discussions.microsoft.com> wrote in message
> news:55D6ACD2-73BC-46F9-894B-8F1F9F4DC4C2@.microsoft.com...
> NET SEND command has been disabled on the server/network. The xp_sendmail
> can not be used due to SQL Mail not started due to no Outlook profile. I
> don't find that the Notification page allows to attach a command or batch
> file to do this job. It is just writing the Log to Application Event Log.
> Any feedback would be appreciated.
>
>|||Hello Richard: Thanks for your feedback. Will appreciate if you could let me
know where I can find xp_smtp_mail and sp_send_cdosysmail procedures. Thank
s...Fraz
"Richard Ding" wrote:
> There're about three ways to email a notification for a job:
> 1. Install MAPI and Outlook to have SQLMAIL work together with Exchange.
> 2. Install xp_smtp_mail and it's dll to bypass MAPI.
> 3. Install sp_send_cdosysmail and use this stored procedure to send out
> email.
> I personally prefer sqlmail due to it's rich features. But be aware of its
> total dependency on MS Exchange.
>
> "Fraz" <Fraz@.discussions.microsoft.com> wrote in message
> news:55D6ACD2-73BC-46F9-894B-8F1F9F4DC4C2@.microsoft.com...
> NET SEND command has been disabled on the server/network. The xp_sendmail
> can not be used due to SQL Mail not started due to no Outlook profile. I
> don't find that the Notification page allows to attach a command or batch
> file to do this job. It is just writing the Log to Application Event Log.
> Any feedback would be appreciated.
>
>|||Below might be useful:
http://www.karaszi.com/SQLServer/info_no_mapi.asp
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Fraz" <Fraz@.discussions.microsoft.com> wrote in message
news:1858581C-7207-4788-B9D3-5C02874DB8A3@.microsoft.com...
> Hello Richard,
> Thanks for your valuable feedback. I looked for xp_smtp_mail and sp_send_cdosysmai
l in the Master database
but could find them. Could you please let me know where I can find these procedures. Thanks.
.Fraz[vbcol=seagreen]
> "Richard Ding" wrote:
>
Job Notification
as a job step on failure, or create a job that is called
when an alert executes. I believe there is an example of
the latter on that website.
FYI, SQL 2005 is going to support both MAPI-based and SMTP-
based email notification.
>--Original Message--
>On our SQL 2000 server there is no MAPI client or Outlook
installed. The NET SEND command has been disabled on the
server/network. The xp_sendmail can not be used due to SQL
Mail not started due to no Outlook profile. I don't find
that the Notification page allows to attach a command or
batch file to do this job. It is just writing the Log to
Application Event Log. Any feedback would be appreciated.
>.
>|||There're about three ways to email a notification for a job:
1. Install MAPI and Outlook to have SQLMAIL work together with Exchange.
2. Install xp_smtp_mail and it's dll to bypass MAPI.
3. Install sp_send_cdosysmail and use this stored procedure to send out
email.
I personally prefer sqlmail due to it's rich features. But be aware of its
total dependency on MS Exchange.
"Fraz" <Fraz@.discussions.microsoft.com> wrote in message
news:55D6ACD2-73BC-46F9-894B-8F1F9F4DC4C2@.microsoft.com...
> On our SQL 2000 server there is no MAPI client or Outlook installed. The
NET SEND command has been disabled on the server/network. The xp_sendmail
can not be used due to SQL Mail not started due to no Outlook profile. I
don't find that the Notification page allows to attach a command or batch
file to do this job. It is just writing the Log to Application Event Log.
Any feedback would be appreciated.|||Hello Richard,
Thanks for your valuable feedback. I looked for xp_smtp_mail and sp_send_cdosysmail in the Master database but could find them. Could you please let me know where I can find these procedures. Thanks...Fraz
"Richard Ding" wrote:
> There're about three ways to email a notification for a job:
> 1. Install MAPI and Outlook to have SQLMAIL work together with Exchange.
> 2. Install xp_smtp_mail and it's dll to bypass MAPI.
> 3. Install sp_send_cdosysmail and use this stored procedure to send out
> email.
> I personally prefer sqlmail due to it's rich features. But be aware of its
> total dependency on MS Exchange.
>
> "Fraz" <Fraz@.discussions.microsoft.com> wrote in message
> news:55D6ACD2-73BC-46F9-894B-8F1F9F4DC4C2@.microsoft.com...
> > On our SQL 2000 server there is no MAPI client or Outlook installed. The
> NET SEND command has been disabled on the server/network. The xp_sendmail
> can not be used due to SQL Mail not started due to no Outlook profile. I
> don't find that the Notification page allows to attach a command or batch
> file to do this job. It is just writing the Log to Application Event Log.
> Any feedback would be appreciated.
>
>|||Hello Richard: Thanks for your feedback. Will appreciate if you could let me know where I can find xp_smtp_mail and sp_send_cdosysmail procedures. Thanks...Fraz
"Richard Ding" wrote:
> There're about three ways to email a notification for a job:
> 1. Install MAPI and Outlook to have SQLMAIL work together with Exchange.
> 2. Install xp_smtp_mail and it's dll to bypass MAPI.
> 3. Install sp_send_cdosysmail and use this stored procedure to send out
> email.
> I personally prefer sqlmail due to it's rich features. But be aware of its
> total dependency on MS Exchange.
>
> "Fraz" <Fraz@.discussions.microsoft.com> wrote in message
> news:55D6ACD2-73BC-46F9-894B-8F1F9F4DC4C2@.microsoft.com...
> > On our SQL 2000 server there is no MAPI client or Outlook installed. The
> NET SEND command has been disabled on the server/network. The xp_sendmail
> can not be used due to SQL Mail not started due to no Outlook profile. I
> don't find that the Notification page allows to attach a command or batch
> file to do this job. It is just writing the Log to Application Event Log.
> Any feedback would be appreciated.
>
>|||Below might be useful:
http://www.karaszi.com/SQLServer/info_no_mapi.asp
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Fraz" <Fraz@.discussions.microsoft.com> wrote in message
news:1858581C-7207-4788-B9D3-5C02874DB8A3@.microsoft.com...
> Hello Richard,
> Thanks for your valuable feedback. I looked for xp_smtp_mail and sp_send_cdosysmail in the Master database
but could find them. Could you please let me know where I can find these procedures. Thanks...Fraz
> "Richard Ding" wrote:
> > There're about three ways to email a notification for a job:
> > 1. Install MAPI and Outlook to have SQLMAIL work together with Exchange.
> > 2. Install xp_smtp_mail and it's dll to bypass MAPI.
> > 3. Install sp_send_cdosysmail and use this stored procedure to send out
> > email.
> >
> > I personally prefer sqlmail due to it's rich features. But be aware of its
> > total dependency on MS Exchange.
> >
> >
> > "Fraz" <Fraz@.discussions.microsoft.com> wrote in message
> > news:55D6ACD2-73BC-46F9-894B-8F1F9F4DC4C2@.microsoft.com...
> > > On our SQL 2000 server there is no MAPI client or Outlook installed. The
> > NET SEND command has been disabled on the server/network. The xp_sendmail
> > can not be used due to SQL Mail not started due to no Outlook profile. I
> > don't find that the Notification page allows to attach a command or batch
> > file to do this job. It is just writing the Log to Application Event Log.
> > Any feedback would be appreciated.
> >
> >
> >
Monday, March 19, 2012
Job from Local DTS Package not running
I created a DTS to run a VB.net exe from local packages dts.
If I execute the package, it would do what I want.
I scheduled it to be a job running every minute of every day to test out the schedule.
The job status only stays at "Excuting Job Step 1"...and this hangs there forever.
I've check my SQLServerAgent is started.
Some info:
my sqlserveragent service is run under a username specifically for SQLServer I call "SQLService".
I'm using SQL Server Developer Edition.
Anyone can explain why this is happenning? I'm running into dead alleys here.Why do you want to do that using SQL . Can It not be done through Windows task Scheduler ?|||Cause it needs to be refresh almost a few minutes...or hour..depending..
Windows Task shceduler...I'm using w2k...only details the time of the day, and repeats only on "daily" basis.
So...anything I should check?|||Try going to the advanced schedule properties in windows task scheduler ... you can schedule for every hour nad minute|||Thanks, I can see the detail settings from my home pc...(XP)...
Will try that once I'm at work.
Well...if it works...anything goes...but for knowledge sake, what could have possibly cause the job to just hang? Any ideas?|||I dont think you can call an external exe from a job or xp_cmdshell ... havent found out a way to do so yet.
Wednesday, March 7, 2012
Job Exe calling MAPI object, fails
I have got a VB.NET exe which is using MAPI object to read the emails.
Now, the exe works excellent if I execute it independently. However, my
requirement is, I have to call this exe through SQL Jobs (SQL Agent). Now,
when I do that way, the MAPI logon fails, everytime.
It is giving me this error:
[Collaboration Data Objects - [MAPI_E_LOGON_FAILED(80040111)]]
Please help!
Regards,
Sachin VaishnavThe SQL agent will use a MAPI profile associated with the SQL Agent service
login, not the currently logged-in console user. Log in to the console
using the SQL Agent service account and create the correct MAPI profile.
Geoff N. Hiten
Senior Database Administrator
Microsoft SQL Server MVP
"Sachin Vaishnav" <SachinVaishnav@.discussions.microsoft.com> wrote in
message news:01864869-CAC2-45C9-A88A-6E8102BF1F70@.microsoft.com...
> Hi!
> I have got a VB.NET exe which is using MAPI object to read the emails.
> Now, the exe works excellent if I execute it independently. However, my
> requirement is, I have to call this exe through SQL Jobs (SQL Agent). Now,
> when I do that way, the MAPI logon fails, everytime.
> It is giving me this error:
> [Collaboration Data Objects - [MAPI_E_LOGON_FAILED(80040111)]]
> Please help!
> Regards,
> Sachin Vaishnav
Job Exe calling MAPI object, fails
I have got a VB.NET exe which is using MAPI object to read the emails.
Now, the exe works excellent if I execute it independently. However, my
requirement is, I have to call this exe through SQL Jobs (SQL Agent). Now,
when I do that way, the MAPI logon fails, everytime.
It is giving me this error:
[Collaboration Data Objects - [MAPI_E_LOGON_FAILED(80040111)]]
Please help!
Regards,
Sachin VaishnavThe SQL agent will use a MAPI profile associated with the SQL Agent service
login, not the currently logged-in console user. Log in to the console
using the SQL Agent service account and create the correct MAPI profile.
--
Geoff N. Hiten
Senior Database Administrator
Microsoft SQL Server MVP
"Sachin Vaishnav" <SachinVaishnav@.discussions.microsoft.com> wrote in
message news:01864869-CAC2-45C9-A88A-6E8102BF1F70@.microsoft.com...
> Hi!
> I have got a VB.NET exe which is using MAPI object to read the emails.
> Now, the exe works excellent if I execute it independently. However, my
> requirement is, I have to call this exe through SQL Jobs (SQL Agent). Now,
> when I do that way, the MAPI logon fails, everytime.
> It is giving me this error:
> [Collaboration Data Objects - [MAPI_E_LOGON_FAILED(80040111)]]
> Please help!
> Regards,
> Sachin Vaishnav
Job Exe calling MAPI object, fails
I have got a VB.NET exe which is using MAPI object to read the emails.
Now, the exe works excellent if I execute it independently. However, my
requirement is, I have to call this exe through SQL Jobs (SQL Agent). Now,
when I do that way, the MAPI logon fails, everytime.
It is giving me this error:
[Collaboration Data Objects - [MAPI_E_LOGON_FAILED(80040111)]]
Please help!
Regards,
Sachin Vaishnav
The SQL agent will use a MAPI profile associated with the SQL Agent service
login, not the currently logged-in console user. Log in to the console
using the SQL Agent service account and create the correct MAPI profile.
Geoff N. Hiten
Senior Database Administrator
Microsoft SQL Server MVP
"Sachin Vaishnav" <SachinVaishnav@.discussions.microsoft.com> wrote in
message news:01864869-CAC2-45C9-A88A-6E8102BF1F70@.microsoft.com...
> Hi!
> I have got a VB.NET exe which is using MAPI object to read the emails.
> Now, the exe works excellent if I execute it independently. However, my
> requirement is, I have to call this exe through SQL Jobs (SQL Agent). Now,
> when I do that way, the MAPI logon fails, everytime.
> It is giving me this error:
> [Collaboration Data Objects - [MAPI_E_LOGON_FAILED(80040111)]]
> Please help!
> Regards,
> Sachin Vaishnav
jim hoffmans sql tutorial
it used to be at http://w3.one.net/~jhoffman/sqltut.htm
there are mirrors of it all over the web, and many older versions can still be found (some even saying that they are unofficial mirrors)
he also used to have an sql club on yahoo that's gone
anyone know what happened?
rudyWell, the latest version I found is 4.75 from Oct 19, 2001. See http://web.archive.org/web/20011019105950/http://w3.one.net/~jhoffman/sqltut.htm
peter|||thanks, corddogs, but that version is 3.31
;)