Showing posts with label job. Show all posts
Showing posts with label job. Show all posts

Friday, March 30, 2012

how to auto restart the merge agent

I have a merge replication, the merge agent job failed with:
step 2 :
could not retrieve generation information at the 'Subscriber'. NOTE: The
step was retried the requested number of times (10) without succeeding. The
step failed.
step 3:
The merge agent job failed. The merge process could not retrieve generation
information at the 'Subscriber'. NOTE: The step was retried the requested
number of times (10) without succeeding. The step failed. [SQLSTATE 42000]
(Error 14151). The step failed.
I am not sure what had caused the merge agent to fail but after I restarted
the merge agent , it automatically caught up. I would like to know if there
is a way to automatically re-start the merge agent after the system restored.
Thanks in advance for any help.
Wen Chang
Wen,
I'm not too sure what you mean by setting it off when the system gets
restarted. If you mean have it keep trying, then you could loop the steps in
the merge agent's job. Alternatively you could have it run on a schedule and
not continuously - eg once each minute.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)

Wednesday, March 28, 2012

How to assign more Operators to a Job failure alert ?

Hello,
I'm using SQL Server 2000 and have defined 3 Operators that need to receive
alerts from shecduled jobs.
We have chosen to go with 'Net Send' type of alert.
Inside each scheduled job, under Notifications Tab, it doesn't give me a
choice to add more operators upon failure of this job, nor does it allow me
to run a script (a batch file that I would include Net send commands to 3
Operators).
Is there a quick way to resolve this without installing Notifications
Services ?
Thanks,
Sam.
Message posted via droptable.com
http://www.droptable.com/Uwe/Forums...erver/200603/1
Xref: TK2MSFTNGP08.phx.gbl microsoft.public.sqlserver.server:426602
We use netsend operators at work but rather than using seperate mail
accounts, we use a mail group, that way you can send to more users.
"Sameer via droptable.com" <u4996@.uwe> wrote in message
news:5d00a065a9839@.uwe...
> Hello,
> I'm using SQL Server 2000 and have defined 3 Operators that need to
receive
> alerts from shecduled jobs.
> We have chosen to go with 'Net Send' type of alert.
> Inside each scheduled job, under Notifications Tab, it doesn't give me a
> choice to add more operators upon failure of this job, nor does it allow
me
> to run a script (a batch file that I would include Net send commands to 3
> Operators).
> Is there a quick way to resolve this without installing Notifications
> Services ?
> Thanks,
> Sam.
> --
> Message posted via droptable.com
> http://www.droptable.com/Uwe/Forums...erver/200603/1
|||Where and how do you create the Mail Group ?
Message posted via http://www.droptable.com
|||In your mail server.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"spremji via droptable.com" <u4996@.uwe> wrote in message news:5d036a522f9fe@.uwe...
> Where and how do you create the Mail Group ?
> --
> Message posted via http://www.droptable.com
|||Would that mean that I have to setup MAPI on SQL Server for it to detect Mail
Groups ?
Message posted via droptable.com
http://www.droptable.com/Uwe/Forums...erver/200603/1
|||The built-in mail feature of SQL Server 2000 only supports MAPI. There are some workarounds
(http://www.karaszi.com/SQLServer/info_no_mapi.asp), but we finally got SMTP support in 2005.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"spremji via droptable.com" <u4996@.uwe> wrote in message news:5d0e98b1e5179@.uwe...
> Would that mean that I have to setup MAPI on SQL Server for it to detect Mail
> Groups ?
> --
> Message posted via droptable.com
> http://www.droptable.com/Uwe/Forums...erver/200603/1
|||The reason we went with Net Send was to avoid MAPI setup on the server. But I
guess, I'll develop custom-code to handle this.
Thanks for your advises. I appreciate it :-)
Message posted via droptable.com
http://www.droptable.com/Uwe/Forums...erver/200603/1

How to assign more Operators to a Job failure alert ?

Hello,
I'm using SQL Server 2000 and have defined 3 Operators that need to receive
alerts from shecduled jobs.
We have chosen to go with 'Net Send' type of alert.
Inside each scheduled job, under Notifications Tab, it doesn't give me a
choice to add more operators upon failure of this job, nor does it allow me
to run a script (a batch file that I would include Net send commands to 3
Operators).
Is there a quick way to resolve this without installing Notifications
Services ?
Thanks,
Sam.
--
Message posted via SQLMonster.com
http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server/200603/1We use netsend operators at work but rather than using seperate mail
accounts, we use a mail group, that way you can send to more users.
"Sameer via SQLMonster.com" <u4996@.uwe> wrote in message
news:5d00a065a9839@.uwe...
> Hello,
> I'm using SQL Server 2000 and have defined 3 Operators that need to
receive
> alerts from shecduled jobs.
> We have chosen to go with 'Net Send' type of alert.
> Inside each scheduled job, under Notifications Tab, it doesn't give me a
> choice to add more operators upon failure of this job, nor does it allow
me
> to run a script (a batch file that I would include Net send commands to 3
> Operators).
> Is there a quick way to resolve this without installing Notifications
> Services ?
> Thanks,
> Sam.
> --
> Message posted via SQLMonster.com
> http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server/200603/1|||Where and how do you create the Mail Group ?
--
Message posted via http://www.sqlmonster.com|||In your mail server.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"spremji via SQLMonster.com" <u4996@.uwe> wrote in message news:5d036a522f9fe@.uwe...
> Where and how do you create the Mail Group ?
> --
> Message posted via http://www.sqlmonster.com|||Would that mean that I have to setup MAPI on SQL Server for it to detect Mail
Groups ?
--
Message posted via SQLMonster.com
http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server/200603/1|||The built-in mail feature of SQL Server 2000 only supports MAPI. There are some workarounds
(http://www.karaszi.com/SQLServer/info_no_mapi.asp), but we finally got SMTP support in 2005.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"spremji via SQLMonster.com" <u4996@.uwe> wrote in message news:5d0e98b1e5179@.uwe...
> Would that mean that I have to setup MAPI on SQL Server for it to detect Mail
> Groups ?
> --
> Message posted via SQLMonster.com
> http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server/200603/1|||The reason we went with Net Send was to avoid MAPI setup on the server. But I
guess, I'll develop custom-code to handle this.
Thanks for your advises. I appreciate it :-)
--
Message posted via SQLMonster.com
http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server/200603/1sql

How to assign more Operators to a Job failure alert ?

Hello,
I'm using SQL Server 2000 and have defined 3 Operators that need to receive
alerts from shecduled jobs.
We have chosen to go with 'Net Send' type of alert.
Inside each scheduled job, under Notifications Tab, it doesn't give me a
choice to add more operators upon failure of this job, nor does it allow me
to run a script (a batch file that I would include Net send commands to 3
Operators).
Is there a quick way to resolve this without installing Notifications
Services ?
Thanks,
Sam.
Message posted via droptable.com
http://www.droptable.com/Uwe/Forum...server/200603/1Xref: TK2MSFTNGP08.phx.gbl microsoft.public.sqlserver.server:426602
We use netsend operators at work but rather than using seperate mail
accounts, we use a mail group, that way you can send to more users.
"Sameer via droptable.com" <u4996@.uwe> wrote in message
news:5d00a065a9839@.uwe...
> Hello,
> I'm using SQL Server 2000 and have defined 3 Operators that need to
receive
> alerts from shecduled jobs.
> We have chosen to go with 'Net Send' type of alert.
> Inside each scheduled job, under Notifications Tab, it doesn't give me a
> choice to add more operators upon failure of this job, nor does it allow
me
> to run a script (a batch file that I would include Net send commands to 3
> Operators).
> Is there a quick way to resolve this without installing Notifications
> Services ?
> Thanks,
> Sam.
> --
> Message posted via droptable.com
> http://www.droptable.com/Uwe/Forum...server/200603/1|||Where and how do you create the Mail Group ?
Message posted via http://www.droptable.com|||In your mail server.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"spremji via droptable.com" <u4996@.uwe> wrote in message news:5d036a522f9fe@.uwe...agreen">
> Where and how do you create the Mail Group ?
> --
> Message posted via http://www.droptable.com|||Would that mean that I have to setup MAPI on SQL Server for it to detect Mai
l
Groups ?
Message posted via droptable.com
http://www.droptable.com/Uwe/Forum...server/200603/1|||The built-in mail feature of SQL Server 2000 only supports MAPI. There are s
ome workarounds
(http://www.karaszi.com/SQLServer/info_no_mapi.asp), but we finally got SMTP
support in 2005.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"spremji via droptable.com" <u4996@.uwe> wrote in message news:5d0e98b1e5179@.uwe...agreen">
> Would that mean that I have to setup MAPI on SQL Server for it to detect M
ail
> Groups ?
> --
> Message posted via droptable.com
> http://www.droptable.com/Uwe/Forum...server/200603/1|||The reason we went with Net Send was to avoid MAPI setup on the server. But
I
guess, I'll develop custom-code to handle this.
Thanks for your advises. I appreciate it :-)
Message posted via droptable.com
http://www.droptable.com/Uwe/Forum...server/200603/1

Monday, March 26, 2012

How to append only new records

What would be the steps to create a SSIS job to append records from an ODBC table to a SQL table, adding only the records from the source that do not already exist in the destination?

I have another post on this subject, with a good suggestion for the approach, but I need some more detailed instructions for implementing it:

Have you considered to use a Lookup task in your data flow to check if the row already exists in the destination table and then use the error output (no matches) for inserting only non existing rows? Notice that the error output of the lookup task needs to be set as 'redirect rows' in order to get this behavior

All details here:

Checking if a row exists and if it does, has it changed
(http://blogs.conchango.com/jamiethomson/archive/2006/09/12/SSIS_3A00_-Checking-if-a-row-exists-and-if-it-does_2C00_-has-it-changed.aspx)

(and in the various links from it)

-Jamie

|||

This is excellent. Just what I was looking for, and a little bit more...

Many thanks

|||

Jamie's answer did the trick Smile

All details here:

Checking if a row exists and if it does, has it changed
(http://blogs.conchango.com/jamiethomson/archive/2006/09/12/SSIS_3A00_-Checking-if-a-row-exists-and-if-it-does_2C00_-has-it-changed.aspx)

(and in the various links from it)

-Jamie

Edit: Can't mark this issue solved...

How to append only new records

What would be the steps to create a SSIS job to append records from an ODBC table to a SQL table, adding only the records from the source that do not already exist in the destination?

I have another post on this subject, with a good suggestion for the approach, but I need some more detailed instructions for implementing it:

Have you considered to use a Lookup task in your data flow to check if the row already exists in the destination table and then use the error output (no matches) for inserting only non existing rows? Notice that the error output of the lookup task needs to be set as 'redirect rows' in order to get this behavior

All details here:

Checking if a row exists and if it does, has it changed
(http://blogs.conchango.com/jamiethomson/archive/2006/09/12/SSIS_3A00_-Checking-if-a-row-exists-and-if-it-does_2C00_-has-it-changed.aspx)

(and in the various links from it)

-Jamie

|||

This is excellent. Just what I was looking for, and a little bit more...

Many thanks

|||

Jamie's answer did the trick Smile

All details here:

Checking if a row exists and if it does, has it changed
(http://blogs.conchango.com/jamiethomson/archive/2006/09/12/SSIS_3A00_-Checking-if-a-row-exists-and-if-it-does_2C00_-has-it-changed.aspx)

(and in the various links from it)

-Jamie

Edit: Can't mark this issue solved...

Wednesday, March 21, 2012

How to allow ExecQuery in VBScript Job Step?

What are the steps to authorize use of ExecQuery inside a MSSQL Server
VBScript Job Step? For example:
Set oDmoSqlServer=CreateObject("SQLDMO.SqlServer2")
With oDmoSqlServer
.LoginSecure=True
.Name="(local)"
.Connect
End With
sds_DbSrvName=oDmoSqlServer.HostName
Set oDb=oDmoSqlServer.Databases("SomeDatabase","dbo")
Set oWMIServer=GetObject("winmgmts://./root/cimv2")
strSQL="Select * from Win32_LogicalDisk WHERE DriveType=3"
Set colItems=oWMIServer.ExecQuery(strSQL,"WQL",48)
For Each oItem in colItems
With oItem
sds_cDeviceID=.DeviceID
sds_cFileSystem=.FileSystem
sds_cFreeSpace=.FreeSpace
sds_cSize=.Size
sds_cSystemName=.SystemName
sds_cVolumeName=.VolumeName
sds_cVolumeSerialNumber=.VolumeSerialNumber
End WithI neglected to mention: the applicable server and sql agent accounts have:
Act as part of the operating system
Bypass traverse checking
Increase quotas
Lock pages in memory
Logon as a batch job
Logon as a service
Replace a process level token
What is missing?
"Mongo" <nospam@.nospam.com> wrote in message
news:eJOoVbCUFHA.3312@.TK2MSFTNGP09.phx.gbl...
> What are the steps to authorize use of ExecQuery inside a MSSQL Server
> VBScript Job Step? For example:
> Set oDmoSqlServer=CreateObject("SQLDMO.SqlServer2")
> With oDmoSqlServer
> .LoginSecure=True
> .Name="(local)"
> .Connect
> End With
> sds_DbSrvName=oDmoSqlServer.HostName
> Set oDb=oDmoSqlServer.Databases("SomeDatabase","dbo")
> Set oWMIServer=GetObject("winmgmts://./root/cimv2")
> strSQL="Select * from Win32_LogicalDisk WHERE DriveType=3"
> Set colItems=oWMIServer.ExecQuery(strSQL,"WQL",48)
> For Each oItem in colItems
> With oItem
> sds_cDeviceID=.DeviceID
> sds_cFileSystem=.FileSystem
> sds_cFreeSpace=.FreeSpace
> sds_cSize=.Size
> sds_cSystemName=.SystemName
> sds_cVolumeName=.VolumeName
> sds_cVolumeSerialNumber=.VolumeSerialNumber
> End With
>|||Hi Mongo,
You may have try execute the script via xp_cmdshell instead of running it
from Job.
Sincerely yours,
Michael Cheng
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
========================================
=============
This posting is provided "AS IS" with no warranties, and confers no rights.sql

How to add/edit job in MSDE?

Hello
I would like to add/edit job in MSDE, is there any way to do this or any other third party tool like Enerprise Manager ?
Regards
Ashish Kanoongo
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.733 / Virus Database: 487 - Release Date: 08/02/2004
Learn the syntax of sp_add_job, sp_add_jobstep, sp_add_jobschedule, etc.
You can run these in the MSDB database from osql.
You're going to have a tough time getting by the license requirements of
using Enterprise Manager, but there are other graphical tools which may
handle SQL Server Agent, eliminating the need to learn all the syntax and
parameters of the msdb procs. See http://www.aspfaq.com/2442
http://www.aspfaq.com/
(Reverse address to reply.)
"Ashish Kanoongo" <ashishk@.armour.com> wrote in message
news:eAai$9heEHA.384@.TK2MSFTNGP10.phx.gbl...
Hello
I would like to add/edit job in MSDE, is there any way to do this or any
other third party tool like Enerprise Manager ?
Regards
Ashish Kanoongo
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.733 / Virus Database: 487 - Release Date: 08/02/2004
sql

Monday, March 12, 2012

how to add job to sqlserver

hi
i want to add job that runs on a specific time of the day in sqlserver 2005 how?

thanks in advance.

In SQL Server Express you cannot because the Agent that runs Jobs the automation subsystem is not included with Express. If you look you will find tools developed by other developer to do it, some for free others sell it, another option you can buy 2000 and use the Agent to run it. Hope this helps.

|||Yes, SQL Server Agent not included in SQL Server Express, look at these options for planing and starting jobs:

http://www.sqldbatips.com/showarticle.asp?ID=29
http://www.sqldbatips.com/showarticle.asp?ID=27
http://www.codeproject.com/useritems/SQLAgent.asp
http://www.lazycoding.com/products.aspx

You might see that these alternatives are driven by private projects and are not supported by Microsoft but do their job.

Jens K. Suessmeyer.

http://www.sqlserver2005.de