I am setting up SQL 2005 server. We are using SQL Mail. I have defined the
email operator and defined notifications on a job to send out emails when job
completes.
The issue is the my outlook client on the server gets locked once sql server
agent is started and no emails get sent out when the job is executed.
I get the message - Unable to open your default email folders....when
opening outlook.
It is outlook 2003, we are using POP as email and sql is 2005 standard.
The email notifications are only sent out when I stop the sql server agent,
open outlook, close it and then start sql server agent again.Jack wrote:
> I am setting up SQL 2005 server. We are using SQL Mail. I have defined the
> email operator and defined notifications on a job to send out emails when job
> completes.
> The issue is the my outlook client on the server gets locked once sql server
> agent is started and no emails get sent out when the job is executed.
> I get the message - Unable to open your default email folders....when
> opening outlook.
> It is outlook 2003, we are using POP as email and sql is 2005 standard.
> The email notifications are only sent out when I stop the sql server agent,
> open outlook, close it and then start sql server agent again.
>
Dump Outlook and POP3, use DBMail as provided by SQL 2005. Why are you
using POP3? Do you not have an in-house mail server?|||No, we do not have one.
"Tracy McKibben" wrote:
> Jack wrote:
> > I am setting up SQL 2005 server. We are using SQL Mail. I have defined the
> > email operator and defined notifications on a job to send out emails when job
> > completes.
> >
> > The issue is the my outlook client on the server gets locked once sql server
> > agent is started and no emails get sent out when the job is executed.
> >
> > I get the message - Unable to open your default email folders....when
> > opening outlook.
> >
> > It is outlook 2003, we are using POP as email and sql is 2005 standard.
> >
> > The email notifications are only sent out when I stop the sql server agent,
> > open outlook, close it and then start sql server agent again.
> >
> Dump Outlook and POP3, use DBMail as provided by SQL 2005. Why are you
> using POP3? Do you not have an in-house mail server?
>|||Jack wrote:
> No, we do not have one.
>
Ok, well, I assume you have access to an SMTP server and can send email
- point DBMail to that server and forget Outlook.
Showing posts with label job. Show all posts
Showing posts with label job. Show all posts
Friday, March 30, 2012
Outlook locked when using sql 2005 - please help
Jack wrote:
> I am setting up SQL 2005 server. We are using SQL Mail. I have defined the
> email operator and defined notifications on a job to send out emails when
job
> completes.
> The issue is the my outlook client on the server gets locked once sql serv
er
> agent is started and no emails get sent out when the job is executed.
> I get the message - Unable to open your default email folders....when
> opening outlook.
> It is outlook 2003, we are using POP as email and sql is 2005 standard.
> The email notifications are only sent out when I stop the sql server agent
,
> open outlook, close it and then start sql server agent again.
>
Dump Outlook and POP3, use DBMail as provided by SQL 2005. Why are you
using POP3? Do you not have an in-house mail server?No, we do not have one.
"Tracy McKibben" wrote:
> Jack wrote:
> Dump Outlook and POP3, use DBMail as provided by SQL 2005. Why are you
> using POP3? Do you not have an in-house mail server?
>|||Jack wrote:
> No, we do not have one.
>
Ok, well, I assume you have access to an SMTP server and can send email
- point DBMail to that server and forget Outlook.|||I am setting up SQL 2005 server. We are using SQL Mail. I have defined the
email operator and defined notifications on a job to send out emails when jo
b
completes.
The issue is the my outlook client on the server gets locked once sql server
agent is started and no emails get sent out when the job is executed.
I get the message - Unable to open your default email folders....when
opening outlook.
It is outlook 2003, we are using POP as email and sql is 2005 standard.
The email notifications are only sent out when I stop the sql server agent,
open outlook, close it and then start sql server agent again.|||Jack wrote:
> I am setting up SQL 2005 server. We are using SQL Mail. I have defined the
> email operator and defined notifications on a job to send out emails when
job
> completes.
> The issue is the my outlook client on the server gets locked once sql serv
er
> agent is started and no emails get sent out when the job is executed.
> I get the message - Unable to open your default email folders....when
> opening outlook.
> It is outlook 2003, we are using POP as email and sql is 2005 standard.
> The email notifications are only sent out when I stop the sql server agent
,
> open outlook, close it and then start sql server agent again.
>
Dump Outlook and POP3, use DBMail as provided by SQL 2005. Why are you
using POP3? Do you not have an in-house mail server?|||No, we do not have one.
"Tracy McKibben" wrote:
> Jack wrote:
> Dump Outlook and POP3, use DBMail as provided by SQL 2005. Why are you
> using POP3? Do you not have an in-house mail server?
>|||Jack wrote:
> No, we do not have one.
>
Ok, well, I assume you have access to an SMTP server and can send email
- point DBMail to that server and forget Outlook.
> I am setting up SQL 2005 server. We are using SQL Mail. I have defined the
> email operator and defined notifications on a job to send out emails when
job
> completes.
> The issue is the my outlook client on the server gets locked once sql serv
er
> agent is started and no emails get sent out when the job is executed.
> I get the message - Unable to open your default email folders....when
> opening outlook.
> It is outlook 2003, we are using POP as email and sql is 2005 standard.
> The email notifications are only sent out when I stop the sql server agent
,
> open outlook, close it and then start sql server agent again.
>
Dump Outlook and POP3, use DBMail as provided by SQL 2005. Why are you
using POP3? Do you not have an in-house mail server?No, we do not have one.
"Tracy McKibben" wrote:
> Jack wrote:
> Dump Outlook and POP3, use DBMail as provided by SQL 2005. Why are you
> using POP3? Do you not have an in-house mail server?
>|||Jack wrote:
> No, we do not have one.
>
Ok, well, I assume you have access to an SMTP server and can send email
- point DBMail to that server and forget Outlook.|||I am setting up SQL 2005 server. We are using SQL Mail. I have defined the
email operator and defined notifications on a job to send out emails when jo
b
completes.
The issue is the my outlook client on the server gets locked once sql server
agent is started and no emails get sent out when the job is executed.
I get the message - Unable to open your default email folders....when
opening outlook.
It is outlook 2003, we are using POP as email and sql is 2005 standard.
The email notifications are only sent out when I stop the sql server agent,
open outlook, close it and then start sql server agent again.|||Jack wrote:
> I am setting up SQL 2005 server. We are using SQL Mail. I have defined the
> email operator and defined notifications on a job to send out emails when
job
> completes.
> The issue is the my outlook client on the server gets locked once sql serv
er
> agent is started and no emails get sent out when the job is executed.
> I get the message - Unable to open your default email folders....when
> opening outlook.
> It is outlook 2003, we are using POP as email and sql is 2005 standard.
> The email notifications are only sent out when I stop the sql server agent
,
> open outlook, close it and then start sql server agent again.
>
Dump Outlook and POP3, use DBMail as provided by SQL 2005. Why are you
using POP3? Do you not have an in-house mail server?|||No, we do not have one.
"Tracy McKibben" wrote:
> Jack wrote:
> Dump Outlook and POP3, use DBMail as provided by SQL 2005. Why are you
> using POP3? Do you not have an in-house mail server?
>|||Jack wrote:
> No, we do not have one.
>
Ok, well, I assume you have access to an SMTP server and can send email
- point DBMail to that server and forget Outlook.
Outlook locked when using sql 2005
I am setting up SQL 2005 server. We are using SQL Mail. I have defined the
email operator and defined notifications on a job to send out emails when jo
b
completes.
The issue is the my outlook client on the server gets locked once sql server
agent is started and no emails get sent out when the job is executed.
I get the message - Unable to open your default email folders....when
opening outlook.
It is outlook 2003, we are using POP as email and sql is 2005 standard.
The email notifications are only sent out when I stop the sql server agent,
open outlook, close it and then start sql server agent again.Is there any reason why you are not using Database Mail? You would not need
Outlook with Database Mail.
Ben Nevarez, MCDBA, OCP
Database Administrator
"Jack" wrote:
> I am setting up SQL 2005 server. We are using SQL Mail. I have defined the
> email operator and defined notifications on a job to send out emails when
job
> completes.
> The issue is the my outlook client on the server gets locked once sql serv
er
> agent is started and no emails get sent out when the job is executed.
> I get the message - Unable to open your default email folders....when
> opening outlook.
> It is outlook 2003, we are using POP as email and sql is 2005 standard.
> The email notifications are only sent out when I stop the sql server agent
,
> open outlook, close it and then start sql server agent again.|||Yes, our IT department does not want to go the SMTP route.
"Ben Nevarez" wrote:
[vbcol=seagreen]
> Is there any reason why you are not using Database Mail? You would not nee
d
> Outlook with Database Mail.
> Ben Nevarez, MCDBA, OCP
> Database Administrator
>
> "Jack" wrote:
>|||Is there any reason why you are not using Database Mail? You would not need
Outlook with Database Mail.
Ben Nevarez, MCDBA, OCP
Database Administrator
"Jack" wrote:
> I am setting up SQL 2005 server. We are using SQL Mail. I have defined the
> email operator and defined notifications on a job to send out emails when
job
> completes.
> The issue is the my outlook client on the server gets locked once sql serv
er
> agent is started and no emails get sent out when the job is executed.
> I get the message - Unable to open your default email folders....when
> opening outlook.
> It is outlook 2003, we are using POP as email and sql is 2005 standard.
> The email notifications are only sent out when I stop the sql server agent
,
> open outlook, close it and then start sql server agent again.|||Yes, our IT department does not want to go the SMTP route.
"Ben Nevarez" wrote:
[vbcol=seagreen]
> Is there any reason why you are not using Database Mail? You would not nee
d
> Outlook with Database Mail.
> Ben Nevarez, MCDBA, OCP
> Database Administrator
>
> "Jack" wrote:
>sql
email operator and defined notifications on a job to send out emails when jo
b
completes.
The issue is the my outlook client on the server gets locked once sql server
agent is started and no emails get sent out when the job is executed.
I get the message - Unable to open your default email folders....when
opening outlook.
It is outlook 2003, we are using POP as email and sql is 2005 standard.
The email notifications are only sent out when I stop the sql server agent,
open outlook, close it and then start sql server agent again.Is there any reason why you are not using Database Mail? You would not need
Outlook with Database Mail.
Ben Nevarez, MCDBA, OCP
Database Administrator
"Jack" wrote:
> I am setting up SQL 2005 server. We are using SQL Mail. I have defined the
> email operator and defined notifications on a job to send out emails when
job
> completes.
> The issue is the my outlook client on the server gets locked once sql serv
er
> agent is started and no emails get sent out when the job is executed.
> I get the message - Unable to open your default email folders....when
> opening outlook.
> It is outlook 2003, we are using POP as email and sql is 2005 standard.
> The email notifications are only sent out when I stop the sql server agent
,
> open outlook, close it and then start sql server agent again.|||Yes, our IT department does not want to go the SMTP route.
"Ben Nevarez" wrote:
[vbcol=seagreen]
> Is there any reason why you are not using Database Mail? You would not nee
d
> Outlook with Database Mail.
> Ben Nevarez, MCDBA, OCP
> Database Administrator
>
> "Jack" wrote:
>|||Is there any reason why you are not using Database Mail? You would not need
Outlook with Database Mail.
Ben Nevarez, MCDBA, OCP
Database Administrator
"Jack" wrote:
> I am setting up SQL 2005 server. We are using SQL Mail. I have defined the
> email operator and defined notifications on a job to send out emails when
job
> completes.
> The issue is the my outlook client on the server gets locked once sql serv
er
> agent is started and no emails get sent out when the job is executed.
> I get the message - Unable to open your default email folders....when
> opening outlook.
> It is outlook 2003, we are using POP as email and sql is 2005 standard.
> The email notifications are only sent out when I stop the sql server agent
,
> open outlook, close it and then start sql server agent again.|||Yes, our IT department does not want to go the SMTP route.
"Ben Nevarez" wrote:
[vbcol=seagreen]
> Is there any reason why you are not using Database Mail? You would not nee
d
> Outlook with Database Mail.
> Ben Nevarez, MCDBA, OCP
> Database Administrator
>
> "Jack" wrote:
>sql
Wednesday, March 28, 2012
Outlook locked when using sql 2005
I am setting up SQL 2005 server. We are using SQL Mail. I have defined the
email operator and defined notifications on a job to send out emails when job
completes.
The issue is the my outlook client on the server gets locked once sql server
agent is started and no emails get sent out when the job is executed.
I get the message - Unable to open your default email folders....when
opening outlook.
It is outlook 2003, we are using POP as email and sql is 2005 standard.
The email notifications are only sent out when I stop the sql server agent,
open outlook, close it and then start sql server agent again.Is there any reason why you are not using Database Mail? You would not need
Outlook with Database Mail.
Ben Nevarez, MCDBA, OCP
Database Administrator
"Jack" wrote:
> I am setting up SQL 2005 server. We are using SQL Mail. I have defined the
> email operator and defined notifications on a job to send out emails when job
> completes.
> The issue is the my outlook client on the server gets locked once sql server
> agent is started and no emails get sent out when the job is executed.
> I get the message - Unable to open your default email folders....when
> opening outlook.
> It is outlook 2003, we are using POP as email and sql is 2005 standard.
> The email notifications are only sent out when I stop the sql server agent,
> open outlook, close it and then start sql server agent again.|||Yes, our IT department does not want to go the SMTP route.
"Ben Nevarez" wrote:
> Is there any reason why you are not using Database Mail? You would not need
> Outlook with Database Mail.
> Ben Nevarez, MCDBA, OCP
> Database Administrator
>
> "Jack" wrote:
> > I am setting up SQL 2005 server. We are using SQL Mail. I have defined the
> > email operator and defined notifications on a job to send out emails when job
> > completes.
> >
> > The issue is the my outlook client on the server gets locked once sql server
> > agent is started and no emails get sent out when the job is executed.
> >
> > I get the message - Unable to open your default email folders....when
> > opening outlook.
> >
> > It is outlook 2003, we are using POP as email and sql is 2005 standard.
> >
> > The email notifications are only sent out when I stop the sql server agent,
> > open outlook, close it and then start sql server agent again.
email operator and defined notifications on a job to send out emails when job
completes.
The issue is the my outlook client on the server gets locked once sql server
agent is started and no emails get sent out when the job is executed.
I get the message - Unable to open your default email folders....when
opening outlook.
It is outlook 2003, we are using POP as email and sql is 2005 standard.
The email notifications are only sent out when I stop the sql server agent,
open outlook, close it and then start sql server agent again.Is there any reason why you are not using Database Mail? You would not need
Outlook with Database Mail.
Ben Nevarez, MCDBA, OCP
Database Administrator
"Jack" wrote:
> I am setting up SQL 2005 server. We are using SQL Mail. I have defined the
> email operator and defined notifications on a job to send out emails when job
> completes.
> The issue is the my outlook client on the server gets locked once sql server
> agent is started and no emails get sent out when the job is executed.
> I get the message - Unable to open your default email folders....when
> opening outlook.
> It is outlook 2003, we are using POP as email and sql is 2005 standard.
> The email notifications are only sent out when I stop the sql server agent,
> open outlook, close it and then start sql server agent again.|||Yes, our IT department does not want to go the SMTP route.
"Ben Nevarez" wrote:
> Is there any reason why you are not using Database Mail? You would not need
> Outlook with Database Mail.
> Ben Nevarez, MCDBA, OCP
> Database Administrator
>
> "Jack" wrote:
> > I am setting up SQL 2005 server. We are using SQL Mail. I have defined the
> > email operator and defined notifications on a job to send out emails when job
> > completes.
> >
> > The issue is the my outlook client on the server gets locked once sql server
> > agent is started and no emails get sent out when the job is executed.
> >
> > I get the message - Unable to open your default email folders....when
> > opening outlook.
> >
> > It is outlook 2003, we are using POP as email and sql is 2005 standard.
> >
> > The email notifications are only sent out when I stop the sql server agent,
> > open outlook, close it and then start sql server agent again.
Friday, March 9, 2012
OSQL query command
I am trying to execute a job through the OSQL command but
the job never executes. Can anyone help me with the
syntax ?. I am executing it on the server:
C:\osql -E -d msdb -q "sp_start_job @.job_name = 'DB Backup
Job for DB Maintenance Plan TEST'"
If there is a way, I would also like to execute this
remote.
Thanks for any help.Hi,
Try firing the below query from Query analyzer .
msdb..sp_start_job @.job_name = 'DB Backup Job for DB Maintenance Plan TEST'"
Thanks
Hari
MCDBA
"Rick" <anonymous@.discussions.microsoft.com> wrote in message
news:b6e101c4377f$989bfb30$a601280a@.phx.gbl...
> I am trying to execute a job through the OSQL command but
> the job never executes. Can anyone help me with the
> syntax ?. I am executing it on the server:
> C:\osql -E -d msdb -q "sp_start_job @.job_name = 'DB Backup
> Job for DB Maintenance Plan TEST'"
> If there is a way, I would also like to execute this
> remote.
> Thanks for any help.|||Thanks. I found what was wrong. This syntax works:
osql -S MYSERVER -E -d msdb -Q "sp_start_job @.job_name
= 'DB Backup Job for DB Maintenance Plan TEST'
But now I have another problem. The job name actually is:
DB Backup Job for DB Maintenance Plan 'TEST' (Microsoft
Default when you create a maintenance plan)
so when I enter
'DB Backup Job for DB Maintenance Plan 'TEST''
it doesn't work.
How do I deal with the single quotes. Should I just rename
the jobs without single quotes ?
Thanks.
>--Original Message--
>Hi,
>Try firing the below query from Query analyzer .
>msdb..sp_start_job @.job_name = 'DB Backup Job for DB
Maintenance Plan TEST'"
>Thanks
>Hari
>MCDBA
>"Rick" <anonymous@.discussions.microsoft.com> wrote in
message
>news:b6e101c4377f$989bfb30$a601280a@.phx.gbl...
>> I am trying to execute a job through the OSQL command
but
>> the job never executes. Can anyone help me with the
>> syntax ?. I am executing it on the server:
>> C:\osql -E -d msdb -q "sp_start_job @.job_name = 'DB
Backup
>> Job for DB Maintenance Plan TEST'"
>> If there is a way, I would also like to execute this
>> remote.
>> Thanks for any help.
>
>.
>|||I got that too: ''TEST''' would do it.
Thanks.
>--Original Message--
>Thanks. I found what was wrong. This syntax works:
>osql -S MYSERVER -E -d msdb -Q "sp_start_job @.job_name
>= 'DB Backup Job for DB Maintenance Plan TEST'
>
>But now I have another problem. The job name actually is:
>DB Backup Job for DB Maintenance Plan 'TEST' (Microsoft
>Default when you create a maintenance plan)
>so when I enter
>'DB Backup Job for DB Maintenance Plan 'TEST''
>it doesn't work.
>How do I deal with the single quotes. Should I just
rename
>the jobs without single quotes ?
>Thanks.
>
>>--Original Message--
>>Hi,
>>Try firing the below query from Query analyzer .
>>msdb..sp_start_job @.job_name = 'DB Backup Job for DB
>Maintenance Plan TEST'"
>>Thanks
>>Hari
>>MCDBA
>>"Rick" <anonymous@.discussions.microsoft.com> wrote in
>message
>>news:b6e101c4377f$989bfb30$a601280a@.phx.gbl...
>> I am trying to execute a job through the OSQL command
>but
>> the job never executes. Can anyone help me with the
>> syntax ?. I am executing it on the server:
>> C:\osql -E -d msdb -q "sp_start_job @.job_name = 'DB
>Backup
>> Job for DB Maintenance Plan TEST'"
>> If there is a way, I would also like to execute this
>> remote.
>> Thanks for any help.
>>
>>.
>.
>
the job never executes. Can anyone help me with the
syntax ?. I am executing it on the server:
C:\osql -E -d msdb -q "sp_start_job @.job_name = 'DB Backup
Job for DB Maintenance Plan TEST'"
If there is a way, I would also like to execute this
remote.
Thanks for any help.Hi,
Try firing the below query from Query analyzer .
msdb..sp_start_job @.job_name = 'DB Backup Job for DB Maintenance Plan TEST'"
Thanks
Hari
MCDBA
"Rick" <anonymous@.discussions.microsoft.com> wrote in message
news:b6e101c4377f$989bfb30$a601280a@.phx.gbl...
> I am trying to execute a job through the OSQL command but
> the job never executes. Can anyone help me with the
> syntax ?. I am executing it on the server:
> C:\osql -E -d msdb -q "sp_start_job @.job_name = 'DB Backup
> Job for DB Maintenance Plan TEST'"
> If there is a way, I would also like to execute this
> remote.
> Thanks for any help.|||Thanks. I found what was wrong. This syntax works:
osql -S MYSERVER -E -d msdb -Q "sp_start_job @.job_name
= 'DB Backup Job for DB Maintenance Plan TEST'
But now I have another problem. The job name actually is:
DB Backup Job for DB Maintenance Plan 'TEST' (Microsoft
Default when you create a maintenance plan)
so when I enter
'DB Backup Job for DB Maintenance Plan 'TEST''
it doesn't work.
How do I deal with the single quotes. Should I just rename
the jobs without single quotes ?
Thanks.
>--Original Message--
>Hi,
>Try firing the below query from Query analyzer .
>msdb..sp_start_job @.job_name = 'DB Backup Job for DB
Maintenance Plan TEST'"
>Thanks
>Hari
>MCDBA
>"Rick" <anonymous@.discussions.microsoft.com> wrote in
message
>news:b6e101c4377f$989bfb30$a601280a@.phx.gbl...
>> I am trying to execute a job through the OSQL command
but
>> the job never executes. Can anyone help me with the
>> syntax ?. I am executing it on the server:
>> C:\osql -E -d msdb -q "sp_start_job @.job_name = 'DB
Backup
>> Job for DB Maintenance Plan TEST'"
>> If there is a way, I would also like to execute this
>> remote.
>> Thanks for any help.
>
>.
>|||I got that too: ''TEST''' would do it.
Thanks.
>--Original Message--
>Thanks. I found what was wrong. This syntax works:
>osql -S MYSERVER -E -d msdb -Q "sp_start_job @.job_name
>= 'DB Backup Job for DB Maintenance Plan TEST'
>
>But now I have another problem. The job name actually is:
>DB Backup Job for DB Maintenance Plan 'TEST' (Microsoft
>Default when you create a maintenance plan)
>so when I enter
>'DB Backup Job for DB Maintenance Plan 'TEST''
>it doesn't work.
>How do I deal with the single quotes. Should I just
rename
>the jobs without single quotes ?
>Thanks.
>
>>--Original Message--
>>Hi,
>>Try firing the below query from Query analyzer .
>>msdb..sp_start_job @.job_name = 'DB Backup Job for DB
>Maintenance Plan TEST'"
>>Thanks
>>Hari
>>MCDBA
>>"Rick" <anonymous@.discussions.microsoft.com> wrote in
>message
>>news:b6e101c4377f$989bfb30$a601280a@.phx.gbl...
>> I am trying to execute a job through the OSQL command
>but
>> the job never executes. Can anyone help me with the
>> syntax ?. I am executing it on the server:
>> C:\osql -E -d msdb -q "sp_start_job @.job_name = 'DB
>Backup
>> Job for DB Maintenance Plan TEST'"
>> If there is a way, I would also like to execute this
>> remote.
>> Thanks for any help.
>>
>>.
>.
>
OSQL query command
I am trying to execute a job through the OSQL command but
the job never executes. Can anyone help me with the
syntax ?. I am executing it on the server:
C:\osql -E -d msdb -q "sp_start_job @.job_name = 'DB Backup
Job for DB Maintenance Plan TEST'"
If there is a way, I would also like to execute this
remote.
Thanks for any help.
Hi,
Try firing the below query from Query analyzer .
msdb..sp_start_job @.job_name = 'DB Backup Job for DB Maintenance Plan TEST'"
Thanks
Hari
MCDBA
"Rick" <anonymous@.discussions.microsoft.com> wrote in message
news:b6e101c4377f$989bfb30$a601280a@.phx.gbl...
> I am trying to execute a job through the OSQL command but
> the job never executes. Can anyone help me with the
> syntax ?. I am executing it on the server:
> C:\osql -E -d msdb -q "sp_start_job @.job_name = 'DB Backup
> Job for DB Maintenance Plan TEST'"
> If there is a way, I would also like to execute this
> remote.
> Thanks for any help.
|||Thanks. I found what was wrong. This syntax works:
osql -S MYSERVER -E -d msdb -Q "sp_start_job @.job_name
= 'DB Backup Job for DB Maintenance Plan TEST'
But now I have another problem. The job name actually is:
DB Backup Job for DB Maintenance Plan 'TEST' (Microsoft
Default when you create a maintenance plan)
so when I enter
'DB Backup Job for DB Maintenance Plan 'TEST''
it doesn't work.
How do I deal with the single quotes. Should I just rename
the jobs without single quotes ?
Thanks.
>--Original Message--
>Hi,
>Try firing the below query from Query analyzer .
>msdb..sp_start_job @.job_name = 'DB Backup Job for DB
Maintenance Plan TEST'"
>Thanks
>Hari
>MCDBA
>"Rick" <anonymous@.discussions.microsoft.com> wrote in
message[vbcol=seagreen]
>news:b6e101c4377f$989bfb30$a601280a@.phx.gbl...
but[vbcol=seagreen]
Backup
>
>.
>
|||I got that too: ''TEST''' would do it.
Thanks.
>--Original Message--
>Thanks. I found what was wrong. This syntax works:
>osql -S MYSERVER -E -d msdb -Q "sp_start_job @.job_name
>= 'DB Backup Job for DB Maintenance Plan TEST'
>
>But now I have another problem. The job name actually is:
>DB Backup Job for DB Maintenance Plan 'TEST' (Microsoft
>Default when you create a maintenance plan)
>so when I enter
>'DB Backup Job for DB Maintenance Plan 'TEST''
>it doesn't work.
>How do I deal with the single quotes. Should I just
rename
>the jobs without single quotes ?
>Thanks.
>
>Maintenance Plan TEST'"
>message
>but
>Backup
>.
>
the job never executes. Can anyone help me with the
syntax ?. I am executing it on the server:
C:\osql -E -d msdb -q "sp_start_job @.job_name = 'DB Backup
Job for DB Maintenance Plan TEST'"
If there is a way, I would also like to execute this
remote.
Thanks for any help.
Hi,
Try firing the below query from Query analyzer .
msdb..sp_start_job @.job_name = 'DB Backup Job for DB Maintenance Plan TEST'"
Thanks
Hari
MCDBA
"Rick" <anonymous@.discussions.microsoft.com> wrote in message
news:b6e101c4377f$989bfb30$a601280a@.phx.gbl...
> I am trying to execute a job through the OSQL command but
> the job never executes. Can anyone help me with the
> syntax ?. I am executing it on the server:
> C:\osql -E -d msdb -q "sp_start_job @.job_name = 'DB Backup
> Job for DB Maintenance Plan TEST'"
> If there is a way, I would also like to execute this
> remote.
> Thanks for any help.
|||Thanks. I found what was wrong. This syntax works:
osql -S MYSERVER -E -d msdb -Q "sp_start_job @.job_name
= 'DB Backup Job for DB Maintenance Plan TEST'
But now I have another problem. The job name actually is:
DB Backup Job for DB Maintenance Plan 'TEST' (Microsoft
Default when you create a maintenance plan)
so when I enter
'DB Backup Job for DB Maintenance Plan 'TEST''
it doesn't work.
How do I deal with the single quotes. Should I just rename
the jobs without single quotes ?
Thanks.
>--Original Message--
>Hi,
>Try firing the below query from Query analyzer .
>msdb..sp_start_job @.job_name = 'DB Backup Job for DB
Maintenance Plan TEST'"
>Thanks
>Hari
>MCDBA
>"Rick" <anonymous@.discussions.microsoft.com> wrote in
message[vbcol=seagreen]
>news:b6e101c4377f$989bfb30$a601280a@.phx.gbl...
but[vbcol=seagreen]
Backup
>
>.
>
|||I got that too: ''TEST''' would do it.
Thanks.
>--Original Message--
>Thanks. I found what was wrong. This syntax works:
>osql -S MYSERVER -E -d msdb -Q "sp_start_job @.job_name
>= 'DB Backup Job for DB Maintenance Plan TEST'
>
>But now I have another problem. The job name actually is:
>DB Backup Job for DB Maintenance Plan 'TEST' (Microsoft
>Default when you create a maintenance plan)
>so when I enter
>'DB Backup Job for DB Maintenance Plan 'TEST''
>it doesn't work.
>How do I deal with the single quotes. Should I just
rename
>the jobs without single quotes ?
>Thanks.
>
>Maintenance Plan TEST'"
>message
>but
>Backup
>.
>
OSQL query command
I am trying to execute a job through the OSQL command but
the job never executes. Can anyone help me with the
syntax ?. I am executing it on the server:
C:\osql -E -d msdb -q "sp_start_job @.job_name = 'DB Backup
Job for DB Maintenance Plan TEST'"
If there is a way, I would also like to execute this
remote.
Thanks for any help.Hi,
Try firing the below query from Query analyzer .
msdb..sp_start_job @.job_name = 'DB Backup Job for DB Maintenance Plan TEST'"
Thanks
Hari
MCDBA
"Rick" <anonymous@.discussions.microsoft.com> wrote in message
news:b6e101c4377f$989bfb30$a601280a@.phx.gbl...
> I am trying to execute a job through the OSQL command but
> the job never executes. Can anyone help me with the
> syntax ?. I am executing it on the server:
> C:\osql -E -d msdb -q "sp_start_job @.job_name = 'DB Backup
> Job for DB Maintenance Plan TEST'"
> If there is a way, I would also like to execute this
> remote.
> Thanks for any help.|||Thanks. I found what was wrong. This syntax works:
osql -S MYSERVER -E -d msdb -Q "sp_start_job @.job_name
= 'DB Backup Job for DB Maintenance Plan TEST'
But now I have another problem. The job name actually is:
DB Backup Job for DB Maintenance Plan 'TEST' (Microsoft
Default when you create a maintenance plan)
so when I enter
'DB Backup Job for DB Maintenance Plan 'TEST''
it doesn't work.
How do I deal with the single quotes. Should I just rename
the jobs without single quotes ?
Thanks.
>--Original Message--
>Hi,
>Try firing the below query from Query analyzer .
>msdb..sp_start_job @.job_name = 'DB Backup Job for DB
Maintenance Plan TEST'"
>Thanks
>Hari
>MCDBA
>"Rick" <anonymous@.discussions.microsoft.com> wrote in
message
>news:b6e101c4377f$989bfb30$a601280a@.phx.gbl...
but[vbcol=seagreen]
Backup[vbcol=seagreen]
>
>.
>|||I got that too: ''TEST''' would do it.
Thanks.
>--Original Message--
>Thanks. I found what was wrong. This syntax works:
>osql -S MYSERVER -E -d msdb -Q "sp_start_job @.job_name
>= 'DB Backup Job for DB Maintenance Plan TEST'
>
>But now I have another problem. The job name actually is:
>DB Backup Job for DB Maintenance Plan 'TEST' (Microsoft
>Default when you create a maintenance plan)
>so when I enter
>'DB Backup Job for DB Maintenance Plan 'TEST''
>it doesn't work.
>How do I deal with the single quotes. Should I just
rename
>the jobs without single quotes ?
>Thanks.
>
>Maintenance Plan TEST'"
>message
>but
>Backup
>.
>
the job never executes. Can anyone help me with the
syntax ?. I am executing it on the server:
C:\osql -E -d msdb -q "sp_start_job @.job_name = 'DB Backup
Job for DB Maintenance Plan TEST'"
If there is a way, I would also like to execute this
remote.
Thanks for any help.Hi,
Try firing the below query from Query analyzer .
msdb..sp_start_job @.job_name = 'DB Backup Job for DB Maintenance Plan TEST'"
Thanks
Hari
MCDBA
"Rick" <anonymous@.discussions.microsoft.com> wrote in message
news:b6e101c4377f$989bfb30$a601280a@.phx.gbl...
> I am trying to execute a job through the OSQL command but
> the job never executes. Can anyone help me with the
> syntax ?. I am executing it on the server:
> C:\osql -E -d msdb -q "sp_start_job @.job_name = 'DB Backup
> Job for DB Maintenance Plan TEST'"
> If there is a way, I would also like to execute this
> remote.
> Thanks for any help.|||Thanks. I found what was wrong. This syntax works:
osql -S MYSERVER -E -d msdb -Q "sp_start_job @.job_name
= 'DB Backup Job for DB Maintenance Plan TEST'
But now I have another problem. The job name actually is:
DB Backup Job for DB Maintenance Plan 'TEST' (Microsoft
Default when you create a maintenance plan)
so when I enter
'DB Backup Job for DB Maintenance Plan 'TEST''
it doesn't work.
How do I deal with the single quotes. Should I just rename
the jobs without single quotes ?
Thanks.
>--Original Message--
>Hi,
>Try firing the below query from Query analyzer .
>msdb..sp_start_job @.job_name = 'DB Backup Job for DB
Maintenance Plan TEST'"
>Thanks
>Hari
>MCDBA
>"Rick" <anonymous@.discussions.microsoft.com> wrote in
message
>news:b6e101c4377f$989bfb30$a601280a@.phx.gbl...
but[vbcol=seagreen]
Backup[vbcol=seagreen]
>
>.
>|||I got that too: ''TEST''' would do it.
Thanks.
>--Original Message--
>Thanks. I found what was wrong. This syntax works:
>osql -S MYSERVER -E -d msdb -Q "sp_start_job @.job_name
>= 'DB Backup Job for DB Maintenance Plan TEST'
>
>But now I have another problem. The job name actually is:
>DB Backup Job for DB Maintenance Plan 'TEST' (Microsoft
>Default when you create a maintenance plan)
>so when I enter
>'DB Backup Job for DB Maintenance Plan 'TEST''
>it doesn't work.
>How do I deal with the single quotes. Should I just
rename
>the jobs without single quotes ?
>Thanks.
>
>Maintenance Plan TEST'"
>message
>but
>Backup
>.
>
Saturday, February 25, 2012
OSQL - appending output to a file
I want to run a job every hour which calls a stored proc using osql and apppends the results to a text file.
But it always overwrites the previous results. Is there a way of getting osql to append the results instead?Originally posted by mwilkes
I want to run a job every hour which calls a stored proc using osql and apppends the results to a text file.
But it always overwrites the previous results. Is there a way of getting osql to append the results instead?
Good old DOS, you should use batch file to append OSQL results into existing text file, named differently than the one used in OSQL output, something like:
osql ... > Osql.Txt
Type Osql.Txt >> FinalResult.Txt
Where FinalResult.Txt contains all, appended results.
Cheers, Marin
But it always overwrites the previous results. Is there a way of getting osql to append the results instead?Originally posted by mwilkes
I want to run a job every hour which calls a stored proc using osql and apppends the results to a text file.
But it always overwrites the previous results. Is there a way of getting osql to append the results instead?
Good old DOS, you should use batch file to append OSQL results into existing text file, named differently than the one used in OSQL output, something like:
osql ... > Osql.Txt
Type Osql.Txt >> FinalResult.Txt
Where FinalResult.Txt contains all, appended results.
Cheers, Marin
Subscribe to:
Posts (Atom)