Showing posts with label define. Show all posts
Showing posts with label define. Show all posts

Wednesday, March 21, 2012

Job issue

Dear all,
I want to define a job which might be able to launch a .BAT where its
location is my local workstation. Is it possible? That .BAT call a .EXE and
we wish to keep out of our production server. That job will be scheduled fro
m
the server...
Thanks a lot,There are a couple of things to consider here. If you create the job on your
sql server, and have the first step be an OS Command (CmdExec) with a value
like
\\yourworkstation\c$\yourbatch.bat
-although the file resides on the machine yourworkstation, the program is
actually executed from the server (and since the exe that the bat file calls
won't be on the server, it will fail)
-if the sql server is running under the local system account, you won't be
able to connect over the network to your workstation anyway.
If you needed the program to physically reside and execute from your
workstation, you're best bet would be to create a scheduled task on your
workstation, and call the command from the sql server like
schtasks /run /tn YourTask /s yourworkstation
where YourTask is the name given to your task when you create it. If the sql
server is running under the local system account, you will need to specify a
user account that has local administrative priveledges on yourworkstation,
like so
schtasks /run /tn YourTask /s yourworkstation /u administrator /p password
The security implications here are that you have an administrator password
stored with the job on the sql server.
"Enric" wrote:

> Dear all,
> I want to define a job which might be able to launch a .BAT where its
> location is my local workstation. Is it possible? That .BAT call a .EXE an
d
> we wish to keep out of our production server. That job will be scheduled f
rom
> the server...
> Thanks a lot,

Monday, March 19, 2012

Job History

Hello all,
Is there a way to define how much history will be logged in the Job History
window?
I need to save history from the whole last week's run, but it keeps been
deleted.
Thanks
Liran
Take a look at sysjobhistory system table
"Liran" <Liran@.discussions.microsoft.com> wrote in message
news:C03C14C4-43ED-4E97-BE97-E71FD083F331@.microsoft.com...
> Hello all,
> Is there a way to define how much history will be logged in the Job
> History
> window?
> I need to save history from the whole last week's run, but it keeps been
> deleted.
> Thanks
|||Actually, I did, but the solution is to change the dafault log size in the
SQL Server Agent Property window.
"Uri Dimant" wrote:

> Liran
> Take a look at sysjobhistory system table
> "Liran" <Liran@.discussions.microsoft.com> wrote in message
> news:C03C14C4-43ED-4E97-BE97-E71FD083F331@.microsoft.com...
>
>
|||Liran
To modify the maximum number of records maintained in sysjobhistory open
Enterprise Manager and expand the Server to modify. Expand Managment and
Right Click SQL Server Agent and select Properties.
Under the Job System tab there is two text boxes. Maximum job history log
size (rows) and Maximum job hisory rows per job.
-rows per job is the maximum number of rows in sysjobhistory for a
partilcuar job
-log size (rows) is the maximum number rows in sysjobhistory for all jobs
Updating these values will modify how many rows are maintained.
-Peter Ward
WARDY IT Solutions
"Liran" wrote:
[vbcol=seagreen]
> Actually, I did, but the solution is to change the dafault log size in the
> SQL Server Agent Property window.
>
> "Uri Dimant" wrote:

Job History

Hello all,
Is there a way to define how much history will be logged in the Job History
window?
I need to save history from the whole last week's run, but it keeps been
deleted.
ThanksLiran
Take a look at sysjobhistory system table
"Liran" <Liran@.discussions.microsoft.com> wrote in message
news:C03C14C4-43ED-4E97-BE97-E71FD083F331@.microsoft.com...
> Hello all,
> Is there a way to define how much history will be logged in the Job
> History
> window?
> I need to save history from the whole last week's run, but it keeps been
> deleted.
> Thanks|||Actually, I did, but the solution is to change the dafault log size in the
SQL Server Agent Property window.
"Uri Dimant" wrote:

> Liran
> Take a look at sysjobhistory system table
> "Liran" <Liran@.discussions.microsoft.com> wrote in message
> news:C03C14C4-43ED-4E97-BE97-E71FD083F331@.microsoft.com...
>
>|||Liran
To modify the maximum number of records maintained in sysjobhistory open
Enterprise Manager and expand the Server to modify. Expand Managment and
Right Click SQL Server Agent and select Properties.
Under the Job System tab there is two text boxes. Maximum job history log
size (rows) and Maximum job hisory rows per job.
-rows per job is the maximum number of rows in sysjobhistory for a
partilcuar job
-log size (rows) is the maximum number rows in sysjobhistory for all jobs
Updating these values will modify how many rows are maintained.
-Peter Ward
WARDY IT Solutions
"Liran" wrote:
[vbcol=seagreen]
> Actually, I did, but the solution is to change the dafault log size in the
> SQL Server Agent Property window.
>
> "Uri Dimant" wrote:
>

Job History

Hello all,
Is there a way to define how much history will be logged in the Job History
window?
I need to save history from the whole last week's run, but it keeps been
deleted.
ThanksLiran
Take a look at sysjobhistory system table
"Liran" <Liran@.discussions.microsoft.com> wrote in message
news:C03C14C4-43ED-4E97-BE97-E71FD083F331@.microsoft.com...
> Hello all,
> Is there a way to define how much history will be logged in the Job
> History
> window?
> I need to save history from the whole last week's run, but it keeps been
> deleted.
> Thanks|||Actually, I did, but the solution is to change the dafault log size in the
SQL Server Agent Property window.
"Uri Dimant" wrote:
> Liran
> Take a look at sysjobhistory system table
> "Liran" <Liran@.discussions.microsoft.com> wrote in message
> news:C03C14C4-43ED-4E97-BE97-E71FD083F331@.microsoft.com...
> > Hello all,
> >
> > Is there a way to define how much history will be logged in the Job
> > History
> > window?
> > I need to save history from the whole last week's run, but it keeps been
> > deleted.
> >
> > Thanks
>
>|||Liran
To modify the maximum number of records maintained in sysjobhistory open
Enterprise Manager and expand the Server to modify. Expand Managment and
Right Click SQL Server Agent and select Properties.
Under the Job System tab there is two text boxes. Maximum job history log
size (rows) and Maximum job hisory rows per job.
-rows per job is the maximum number of rows in sysjobhistory for a
partilcuar job
-log size (rows) is the maximum number rows in sysjobhistory for all jobs
Updating these values will modify how many rows are maintained.
-Peter Ward
WARDY IT Solutions
"Liran" wrote:
> Actually, I did, but the solution is to change the dafault log size in the
> SQL Server Agent Property window.
>
> "Uri Dimant" wrote:
> > Liran
> > Take a look at sysjobhistory system table
> >
> > "Liran" <Liran@.discussions.microsoft.com> wrote in message
> > news:C03C14C4-43ED-4E97-BE97-E71FD083F331@.microsoft.com...
> > > Hello all,
> > >
> > > Is there a way to define how much history will be logged in the Job
> > > History
> > > window?
> > > I need to save history from the whole last week's run, but it keeps been
> > > deleted.
> > >
> > > Thanks
> >
> >
> >