Saturday, February 25, 2012

schedule job backup

Hi there
I want to implement a job command at SQL Server 2000 that should allow the
following:
1. Do a backup to "xpto" database
2. the name generated by the backup should be:
21112006xpto.bak
22112006xpto.bak
...
21022007xpto.bak
After archiving 3 months the first backup craeted "21112006xpto.bak" should
be replaced by "21022007xpto.bak"
once i just want to stay the earlier 3 months.
Actually i use the following command:
BACKUP DATABASE [xpto] TO DISK = N'C:\Microsoft SQL
Server\MSSQL\BACKUP\xpto.BAK' WITH INIT , NOUNLOAD , NAME = N'xpto
backup', SKIP , STATS = 10, NOFORMAT
Can somenone help me or give some tips?...
[]
Ricky
Hi
To create the file using a current date then you would need to use dynamic SQL
e.g.
DECLARE @.cmd varchar(1000)
SET @.cmd = 'BACKUP DATABASE [xpto] TO DISK = N''C:\Microsoft SQL
Server\MSSQL\BACKUP\' + CONVERT(char(8),GETDATE(),112) + 'xpto.BAK'' WITH
INIT , NOUNLOAD , NAME = N''xpto backup'', SKIP , STATS = 10, NOFORMAT'
EXEC (@.cmd)
This will give you are filename YYYYMMDDxpto.BAK. This is a better format as
the files can easily be sorted.
To delete older files check out:
http://realsqlguy.com/serendipity/archives/9-Out-With-The-Old.html
Alternatively a DTS package using an activeX script would be a way of
deleting old files see http://www.sqldts.com/default.aspx?292
John
"Ricky" wrote:

> Hi there
> I want to implement a job command at SQL Server 2000 that should allow the
> following:
> 1. Do a backup to "xpto" database
> 2. the name generated by the backup should be:
> 21112006xpto.bak
> 22112006xpto.bak
> ...
> 21022007xpto.bak
> After archiving 3 months the first backup craeted "21112006xpto.bak" should
> be replaced by "21022007xpto.bak"
> once i just want to stay the earlier 3 months.
> Actually i use the following command:
> BACKUP DATABASE [xpto] TO DISK = N'C:\Microsoft SQL
> Server\MSSQL\BACKUP\xpto.BAK' WITH INIT , NOUNLOAD , NAME = N'xpto
> backup', SKIP , STATS = 10, NOFORMAT
> Can somenone help me or give some tips?...
> []
> Ricky
>
>

schedule job backup

Hi there
I want to implement a job command at SQL Server 2000 that should allow the
following:
1. Do a backup to "xpto" database
2. the name generated by the backup should be:
21112006xpto.bak
22112006xpto.bak
..
21022007xpto.bak
After archiving 3 months the first backup craeted "21112006xpto.bak" should
be replaced by "21022007xpto.bak"
once i just want to stay the earlier 3 months.
Actually i use the following command:
BACKUP DATABASE [xpto] TO DISK = N'C:\Microsoft SQL
Server\MSSQL\BACKUP\xpto.BAK' WITH INIT , NOUNLOAD , NAME = N'xpto
backup', SKIP , STATS = 10, NOFORMAT
Can somenone help me or give some tips?...
[]
RickyHi
To create the file using a current date then you would need to use dynamic S
QL
e.g.
DECLARE @.cmd varchar(1000)
SET @.cmd = 'BACKUP DATABASE [xpto] TO DISK = N''C:\Microsoft SQL
Server\MSSQL\BACKUP' + CONVERT(char(8),GETDATE(),112) + 'xpto.BAK'' WITH
INIT , NOUNLOAD , NAME = N''xpto backup'', SKIP , STATS = 10, NOFORMAT'
EXEC (@.cmd)
This will give you are filename YYYYMMDDxpto.BAK. This is a better format as
the files can easily be sorted.
To delete older files check out:
http://realsqlguy.com/serendipity/a...th-The-Old.html
Alternatively a DTS package using an activeX script would be a way of
deleting old files see http://www.sqldts.com/default.aspx?292
John
"Ricky" wrote:

> Hi there
> I want to implement a job command at SQL Server 2000 that should allow the
> following:
> 1. Do a backup to "xpto" database
> 2. the name generated by the backup should be:
> 21112006xpto.bak
> 22112006xpto.bak
> ...
> 21022007xpto.bak
> After archiving 3 months the first backup craeted "21112006xpto.bak" shoul
d
> be replaced by "21022007xpto.bak"
> once i just want to stay the earlier 3 months.
> Actually i use the following command:
> BACKUP DATABASE [xpto] TO DISK = N'C:\Microsoft SQL
> Server\MSSQL\BACKUP\xpto.BAK' WITH INIT , NOUNLOAD , NAME = N'xpto
> backup', SKIP , STATS = 10, NOFORMAT
> Can somenone help me or give some tips?...
> []
> Ricky
>
>

schedule job

Is there a way in sql server to schedule a job for every 30 seconds.
At present the minimum I can set it to is every 1 minute.
Thanks
farshad
/*
select job_id
from msdb.dbo.sysjobs
where (name = N'sec')
*/
declare @.rc int
exec @.rc = msdb.dbo.sp_add_jobschedule
@.job_id = '68E41CE3-9020-425E-B851-76E758C86E98', -- ID
of job you create the schedule for
@.name = N'Sec', -- name of the schedule
@.enabled = 1, -- enable the schedule for use
@.freq_type = 4, -- daily frequency
@.active_start_date = 20030706, -- date from which schedule will be
active (July 6, 2003)
@.active_start_time = 0, -- time from which schedule will be
active (midnight)
@.freq_interval = 1, -- unused for daily
@.freq_subday_type = 2, -- seconds
@.freq_subday_interval = 10, -- every 10 seconds
@.freq_relative_interval = 0, -- unused for daily
@.freq_recurrence_factor = 0, -- unused for daily
@.active_end_date = 99991231, -- date which schedule becomes
inactive (Dec. 31, 9999)
@.active_end_time = 235959 -- time which schedule becomes
inactive (23:59:59)
if (@.@.error <> 0 or @.rc <> 0) raiserror('Error creating job schedule', 1,
16)
"farshad" <farshad@.discussions.microsoft.com> wrote in message
news:70D44BF7-689E-4ADF-9FE6-F9570C13F066@.microsoft.com...
> Is there a way in sql server to schedule a job for every 30 seconds.
> At present the minimum I can set it to is every 1 minute.
> Thanks
|||Thanks for the reply but I was wondering if there is an option in the
enterprise window for setting the schedule to seconds rather than minutes.
"Uri Dimant" wrote:

> farshad
> /*
> select job_id
> from msdb.dbo.sysjobs
> where (name = N'sec')
> */
> declare @.rc int
> exec @.rc = msdb.dbo.sp_add_jobschedule
> @.job_id = '68E41CE3-9020-425E-B851-76E758C86E98', -- ID
> of job you create the schedule for
> @.name = N'Sec', -- name of the schedule
> @.enabled = 1, -- enable the schedule for use
> @.freq_type = 4, -- daily frequency
> @.active_start_date = 20030706, -- date from which schedule will be
> active (July 6, 2003)
> @.active_start_time = 0, -- time from which schedule will be
> active (midnight)
> @.freq_interval = 1, -- unused for daily
> @.freq_subday_type = 2, -- seconds
> @.freq_subday_interval = 10, -- every 10 seconds
> @.freq_relative_interval = 0, -- unused for daily
> @.freq_recurrence_factor = 0, -- unused for daily
> @.active_end_date = 99991231, -- date which schedule becomes
> inactive (Dec. 31, 9999)
> @.active_end_time = 235959 -- time which schedule becomes
> inactive (23:59:59)
> if (@.@.error <> 0 or @.rc <> 0) raiserror('Error creating job schedule', 1,
> 16)
> "farshad" <farshad@.discussions.microsoft.com> wrote in message
> news:70D44BF7-689E-4ADF-9FE6-F9570C13F066@.microsoft.com...
>
>
|||Hi
No , there is no option in EM.
"farshad" <farshad@.discussions.microsoft.com> wrote in message
news:A53AD0DE-1378-43CA-90F6-3DC0A5D181FA@.microsoft.com...[vbcol=seagreen]
> Thanks for the reply but I was wondering if there is an option in the
> enterprise window for setting the schedule to seconds rather than minutes.
> "Uri Dimant" wrote:
5E-B851-76E758C86E98', -- ID[vbcol=seagreen]
be[vbcol=seagreen]
be[vbcol=seagreen]
1,[vbcol=seagreen]
|||Thanks
"Uri Dimant" wrote:

> Hi
> No , there is no option in EM.
>
> "farshad" <farshad@.discussions.microsoft.com> wrote in message
> news:A53AD0DE-1378-43CA-90F6-3DC0A5D181FA@.microsoft.com...
> 5E-B851-76E758C86E98', -- ID
> be
> be
> 1,
>
>

schedule job

Is there a way in sql server to schedule a job for every 30 seconds.
At present the minimum I can set it to is every 1 minute.
Thanksfarshad
/*
select job_id
from msdb.dbo.sysjobs
where (name = N'sec')
*/
declare @.rc int
exec @.rc = msdb.dbo.sp_add_jobschedule
@.job_id = '68E41CE3-9020-425E-B851-76E758C86E98', -- ID
of job you create the schedule for
@.name = N'Sec', -- name of the schedule
@.enabled = 1, -- enable the schedule for use
@.freq_type = 4, -- daily frequency
@.active_start_date = 20030706, -- date from which schedule will be
active (July 6, 2003)
@.active_start_time = 0, -- time from which schedule will be
active (midnight)
@.freq_interval = 1, -- unused for daily
@.freq_subday_type = 2, -- seconds
@.freq_subday_interval = 10, -- every 10 seconds
@.freq_relative_interval = 0, -- unused for daily
@.freq_recurrence_factor = 0, -- unused for daily
@.active_end_date = 99991231, -- date which schedule becomes
inactive (Dec. 31, 9999)
@.active_end_time = 235959 -- time which schedule becomes
inactive (23:59:59)
if (@.@.error <> 0 or @.rc <> 0) raiserror('Error creating job schedule', 1,
16)
"farshad" <farshad@.discussions.microsoft.com> wrote in message
news:70D44BF7-689E-4ADF-9FE6-F9570C13F066@.microsoft.com...
> Is there a way in sql server to schedule a job for every 30 seconds.
> At present the minimum I can set it to is every 1 minute.
> Thanks|||Thanks for the reply but I was wondering if there is an option in the
enterprise window for setting the schedule to seconds rather than minutes.
"Uri Dimant" wrote:

> farshad
> /*
> select job_id
> from msdb.dbo.sysjobs
> where (name = N'sec')
> */
> declare @.rc int
> exec @.rc = msdb.dbo.sp_add_jobschedule
> @.job_id = '68E41CE3-9020-425E-B851-76E758C86E98', --
ID
> of job you create the schedule for
> @.name = N'Sec', -- name of the schedule
> @.enabled = 1, -- enable the schedule for use
> @.freq_type = 4, -- daily frequency
> @.active_start_date = 20030706, -- date from which schedule will be
> active (July 6, 2003)
> @.active_start_time = 0, -- time from which schedule will be
> active (midnight)
> @.freq_interval = 1, -- unused for daily
> @.freq_subday_type = 2, -- seconds
> @.freq_subday_interval = 10, -- every 10 seconds
> @.freq_relative_interval = 0, -- unused for daily
> @.freq_recurrence_factor = 0, -- unused for daily
> @.active_end_date = 99991231, -- date which schedule becomes
> inactive (Dec. 31, 9999)
> @.active_end_time = 235959 -- time which schedule becomes
> inactive (23:59:59)
> if (@.@.error <> 0 or @.rc <> 0) raiserror('Error creating job schedule', 1,
> 16)
> "farshad" <farshad@.discussions.microsoft.com> wrote in message
> news:70D44BF7-689E-4ADF-9FE6-F9570C13F066@.microsoft.com...
>
>|||Hi
No , there is no option in EM.
"farshad" <farshad@.discussions.microsoft.com> wrote in message
news:A53AD0DE-1378-43CA-90F6-3DC0A5D181FA@.microsoft.com...[vbcol=seagreen]
> Thanks for the reply but I was wondering if there is an option in the
> enterprise window for setting the schedule to seconds rather than minutes.
> "Uri Dimant" wrote:
>
5E-B851-76E758C86E98', -- ID[vbcol=seagreen]
be[vbcol=seagreen]
be[vbcol=seagreen]
1,[vbcol=seagreen]|||Thanks
"Uri Dimant" wrote:

> Hi
> No , there is no option in EM.
>
> "farshad" <farshad@.discussions.microsoft.com> wrote in message
> news:A53AD0DE-1378-43CA-90F6-3DC0A5D181FA@.microsoft.com...
> 5E-B851-76E758C86E98', -- ID
> be
> be
> 1,
>
>

schedule job

Is there a way in sql server to schedule a job for every 30 seconds.
At present the minimum I can set it to is every 1 minute.
Thanksfarshad
/*
select job_id
from msdb.dbo.sysjobs
where (name = N'sec')
*/
declare @.rc int
exec @.rc = msdb.dbo.sp_add_jobschedule
@.job_id = '68E41CE3-9020-425E-B851-76E758C86E98', -- ID
of job you create the schedule for
@.name = N'Sec', -- name of the schedule
@.enabled = 1, -- enable the schedule for use
@.freq_type = 4, -- daily frequency
@.active_start_date = 20030706, -- date from which schedule will be
active (July 6, 2003)
@.active_start_time = 0, -- time from which schedule will be
active (midnight)
@.freq_interval = 1, -- unused for daily
@.freq_subday_type = 2, -- seconds
@.freq_subday_interval = 10, -- every 10 seconds
@.freq_relative_interval = 0, -- unused for daily
@.freq_recurrence_factor = 0, -- unused for daily
@.active_end_date = 99991231, -- date which schedule becomes
inactive (Dec. 31, 9999)
@.active_end_time = 235959 -- time which schedule becomes
inactive (23:59:59)
if (@.@.error <> 0 or @.rc <> 0) raiserror('Error creating job schedule', 1,
16)
"farshad" <farshad@.discussions.microsoft.com> wrote in message
news:70D44BF7-689E-4ADF-9FE6-F9570C13F066@.microsoft.com...
> Is there a way in sql server to schedule a job for every 30 seconds.
> At present the minimum I can set it to is every 1 minute.
> Thanks|||Thanks for the reply but I was wondering if there is an option in the
enterprise window for setting the schedule to seconds rather than minutes.
"Uri Dimant" wrote:
> farshad
> /*
> select job_id
> from msdb.dbo.sysjobs
> where (name = N'sec')
> */
> declare @.rc int
> exec @.rc = msdb.dbo.sp_add_jobschedule
> @.job_id = '68E41CE3-9020-425E-B851-76E758C86E98', -- ID
> of job you create the schedule for
> @.name = N'Sec', -- name of the schedule
> @.enabled = 1, -- enable the schedule for use
> @.freq_type = 4, -- daily frequency
> @.active_start_date = 20030706, -- date from which schedule will be
> active (July 6, 2003)
> @.active_start_time = 0, -- time from which schedule will be
> active (midnight)
> @.freq_interval = 1, -- unused for daily
> @.freq_subday_type = 2, -- seconds
> @.freq_subday_interval = 10, -- every 10 seconds
> @.freq_relative_interval = 0, -- unused for daily
> @.freq_recurrence_factor = 0, -- unused for daily
> @.active_end_date = 99991231, -- date which schedule becomes
> inactive (Dec. 31, 9999)
> @.active_end_time = 235959 -- time which schedule becomes
> inactive (23:59:59)
> if (@.@.error <> 0 or @.rc <> 0) raiserror('Error creating job schedule', 1,
> 16)
> "farshad" <farshad@.discussions.microsoft.com> wrote in message
> news:70D44BF7-689E-4ADF-9FE6-F9570C13F066@.microsoft.com...
> > Is there a way in sql server to schedule a job for every 30 seconds.
> > At present the minimum I can set it to is every 1 minute.
> > Thanks
>
>|||Hi
No , there is no option in EM.
"farshad" <farshad@.discussions.microsoft.com> wrote in message
news:A53AD0DE-1378-43CA-90F6-3DC0A5D181FA@.microsoft.com...
> Thanks for the reply but I was wondering if there is an option in the
> enterprise window for setting the schedule to seconds rather than minutes.
> "Uri Dimant" wrote:
> > farshad
> > /*
> > select job_id
> > from msdb.dbo.sysjobs
> > where (name = N'sec')
> > */
> > declare @.rc int
> > exec @.rc = msdb.dbo.sp_add_jobschedule
> > @.job_id =5E-B851-76E758C86E98', -- ID
> > of job you create the schedule for
> > @.name = N'Sec', -- name of the schedule
> > @.enabled = 1, -- enable the schedule for use
> > @.freq_type = 4, -- daily frequency
> > @.active_start_date = 20030706, -- date from which schedule will
be
> > active (July 6, 2003)
> > @.active_start_time = 0, -- time from which schedule will
be
> > active (midnight)
> > @.freq_interval = 1, -- unused for daily
> > @.freq_subday_type = 2, -- seconds
> > @.freq_subday_interval = 10, -- every 10 seconds
> > @.freq_relative_interval = 0, -- unused for daily
> > @.freq_recurrence_factor = 0, -- unused for daily
> > @.active_end_date = 99991231, -- date which schedule becomes
> > inactive (Dec. 31, 9999)
> > @.active_end_time = 235959 -- time which schedule becomes
> > inactive (23:59:59)
> > if (@.@.error <> 0 or @.rc <> 0) raiserror('Error creating job schedule',
1,
> > 16)
> > "farshad" <farshad@.discussions.microsoft.com> wrote in message
> > news:70D44BF7-689E-4ADF-9FE6-F9570C13F066@.microsoft.com...
> > > Is there a way in sql server to schedule a job for every 30 seconds.
> > > At present the minimum I can set it to is every 1 minute.
> > > Thanks
> >
> >
> >|||Thanks
"Uri Dimant" wrote:
> Hi
> No , there is no option in EM.
>
> "farshad" <farshad@.discussions.microsoft.com> wrote in message
> news:A53AD0DE-1378-43CA-90F6-3DC0A5D181FA@.microsoft.com...
> > Thanks for the reply but I was wondering if there is an option in the
> > enterprise window for setting the schedule to seconds rather than minutes.
> >
> > "Uri Dimant" wrote:
> >
> > > farshad
> > > /*
> > > select job_id
> > > from msdb.dbo.sysjobs
> > > where (name = N'sec')
> > > */
> > > declare @.rc int
> > > exec @.rc = msdb.dbo.sp_add_jobschedule
> > > @.job_id => 5E-B851-76E758C86E98', -- ID
> > > of job you create the schedule for
> > > @.name = N'Sec', -- name of the schedule
> > > @.enabled = 1, -- enable the schedule for use
> > > @.freq_type = 4, -- daily frequency
> > > @.active_start_date = 20030706, -- date from which schedule will
> be
> > > active (July 6, 2003)
> > > @.active_start_time = 0, -- time from which schedule will
> be
> > > active (midnight)
> > > @.freq_interval = 1, -- unused for daily
> > > @.freq_subday_type = 2, -- seconds
> > > @.freq_subday_interval = 10, -- every 10 seconds
> > > @.freq_relative_interval = 0, -- unused for daily
> > > @.freq_recurrence_factor = 0, -- unused for daily
> > > @.active_end_date = 99991231, -- date which schedule becomes
> > > inactive (Dec. 31, 9999)
> > > @.active_end_time = 235959 -- time which schedule becomes
> > > inactive (23:59:59)
> > > if (@.@.error <> 0 or @.rc <> 0) raiserror('Error creating job schedule',
> 1,
> > > 16)
> > > "farshad" <farshad@.discussions.microsoft.com> wrote in message
> > > news:70D44BF7-689E-4ADF-9FE6-F9570C13F066@.microsoft.com...
> > > > Is there a way in sql server to schedule a job for every 30 seconds.
> > > > At present the minimum I can set it to is every 1 minute.
> > > > Thanks
> > >
> > >
> > >
>
>

schedule into excel directly

Is it possible to schedule into excel directly, without choosing excel and
exporting once the report has been delployed onto the web in reporting
services.
--
shelYou can access the Excel-file via URL.
There may be other possibilities.
Ex:
http://server/ReportServer?%2fReportSolution%2fOperationalReport&datebegin=01.01.2004+00%3a00%3a00&dateend=01.01.2005+00%3a00%3a00&systemid=1&rs%3aCommand=Render&rs%3AFormat=EXCEL
You can find out the URL by copying it when u export the report as excel file.
Ya
"shel" wrote:
> Is it possible to schedule into excel directly, without choosing excel and
> exporting once the report has been delployed onto the web in reporting
> services.
> --
> shel|||--
shel
"Y. Adams" wrote:
> You can access the Excel-file via URL.
> There may be other possibilities.
> Ex:
> http://server/ReportServer?%2fReportSolution%2fOperationalReport&datebegin=01.01.2004+00%3a00%3a00&dateend=01.01.2005+00%3a00%3a00&systemid=1&rs%3aCommand=Render&rs%3AFormat=EXCEL
> You can find out the URL by copying it when u export the report as excel file.
> Ya
>
> "shel" wrote:
> > Is it possible to schedule into excel directly, without choosing excel and
> > exporting once the report has been delployed onto the web in reporting
> > services.
> > --
> > shel
Thanks for this - I have also worked out how to use the subscriptions.

Schedule for the sqlagent from the command line

hi
How do I set-up a schedule for the sqlagent from the command line
/ErikErik,
presumably you're referring to a particular job rather than the agent, so
for this you'd need to use "sp_update_jobschedule".
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com

Schedule for the sqlagent from the command line

hi
How do I set-up a schedule for the sqlagent from the command line
/Erik
Erik,
presumably you're referring to a particular job rather than the agent, so
for this you'd need to use "sp_update_jobschedule".
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com

Schedule for the sqlagent from the command line

hi
How do I set-up a schedule for the sqlagent from the command line
/ErikErik,
presumably you're referring to a particular job rather than the agent, so
for this you'd need to use "sp_update_jobschedule".
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com

Schedule for Backing up logs

How does one determine a reasonable interval for backing up transaction
logs? For example, we have one small db that is only 1.8GB and the
transaction log is consistently around 1GB even after backup. I suppose I'd
need to add the "truncate" option to make it shrink? We only get really
busy about 1/2 of the week but right now our DBA backs up tlogs once daily
with a full backup weekly. Is this really sufficient?"Tim Greenwood" <tim_greenwood A-T yahoo D-O-T com> wrote in message
news:%23j7aO2VaGHA.608@.TK2MSFTNGP02.phx.gbl...
> How does one determine a reasonable interval for backing up transaction
> logs? For example, we have one small db that is only 1.8GB and the
> transaction log is consistently around 1GB even after backup. I suppose
> I'd need to add the "truncate" option to make it shrink? We only get
> really busy about 1/2 of the week but right now our DBA backs up tlogs
> once daily with a full backup weekly. Is this really sufficient?
In case of a disaster is recovering to the beginning of the day acceptable?
In case of a disaster, is the recovery time to restore the weekly full and 5
days of transaction logs acceptable?
David|||Well, that's easy....HELL no and no...
Thanks that was quite simple. Doh
"David Browne" <davidbaxterbrowne no potted meat@.hotmail.com> wrote in
message news:u7N064VaGHA.4936@.TK2MSFTNGP05.phx.gbl...
> "Tim Greenwood" <tim_greenwood A-T yahoo D-O-T com> wrote in message
> news:%23j7aO2VaGHA.608@.TK2MSFTNGP02.phx.gbl...
> In case of a disaster is recovering to the beginning of the day
> acceptable?
> In case of a disaster, is the recovery time to restore the weekly full and
> 5 days of transaction logs acceptable?
> David
>|||"Tim Greenwood" <tim_greenwood A-T yahoo D-O-T com> wrote in message
news:%23j7aO2VaGHA.608@.TK2MSFTNGP02.phx.gbl...
> How does one determine a reasonable interval for backing up transaction
> logs? For example, we have one small db that is only 1.8GB and the
> transaction log is consistently around 1GB even after backup. I suppose
I'd
> need to add the "truncate" option to make it shrink?
No, you would need to do a DBCC shrinkfile.
I would highly suggest not to. If your log keeps growing to 1 gb between
backups, that's basically what you need. Leave it at that.
If you keep shrinking it, you run the risk of getting disk level
fragmentation.

> We only get really
> busy about 1/2 of the week but right now our DBA backs up tlogs once daily
> with a full backup weekly. Is this really sufficient?
Depends, what's your disaster recovery plan call for? Can you live with
losing a day's worth of data?
I have one system where we do transaction log backups every 20 minutes,
another we just keep the db in simple mode. Depends on your needs/desires.

>|||Well, what's an acceptable data loss window? Whatever it is, that
becomes your new tlog backup frequency. For example, if losing the last
30 minute's worth of data is acceptable (no data loss is desirable but
you've got to be realistic about it) then do transaction log backups
every 30 minutes. That will almost certainly keep the size of the log
file down (or rather it will use less of the log file and so if you're
tight on disk space it'd be OK to shrink it down to cater for about 30
minutes worth of transactions).
If the recovery time of restoring a full backup & up to 5 daily tlogs is
unacceptable then you may want to think about slipping in regular
differentials. For example, if you do a full weekly backup, a daily
differential and half-hourly log backups then the recovery time would be
the time it takes to restore the last full backup, the most recent
differential and every log backup done since then (which would be up to
48 log backups, but they're be much smaller than your current log
backups because they're only 30 minutes worth of changes rather than 24
hours worth of changes). The differentials will make it possible to
essentially skip ahead to a much more recent recovery point without
having to apply all the log backups since the full backup, which will
speed up the recovery time. If that's still too long, then maybe you
should do nightly full backups with the half-hourly log backups (and
maybe even slip in a differential every couple hours).
It's basically just a case of juggling the DB, diff & log backups to
cover your maximum acceptable data loss window and maximum acceptable
recovery time. The more often you do log backups the smaller those log
backups will be and hence the less physical log file you'll need to
store those transactions between log backups.
*mike hodgson*
http://sqlnerd.blogspot.com
Tim Greenwood wrote:

>Well, that's easy....HELL no and no...
>Thanks that was quite simple. Doh
>"David Browne" <davidbaxterbrowne no potted meat@.hotmail.com> wrote in
>message news:u7N064VaGHA.4936@.TK2MSFTNGP05.phx.gbl...
>
>
>

Schedule for Backing up logs

How does one determine a reasonable interval for backing up transaction
logs? For example, we have one small db that is only 1.8GB and the
transaction log is consistently around 1GB even after backup. I suppose I'd
need to add the "truncate" option to make it shrink? We only get really
busy about 1/2 of the week but right now our DBA backs up tlogs once daily
with a full backup weekly. Is this really sufficient?"Tim Greenwood" <tim_greenwood A-T yahoo D-O-T com> wrote in message
news:%23j7aO2VaGHA.608@.TK2MSFTNGP02.phx.gbl...
> How does one determine a reasonable interval for backing up transaction
> logs? For example, we have one small db that is only 1.8GB and the
> transaction log is consistently around 1GB even after backup. I suppose
> I'd need to add the "truncate" option to make it shrink? We only get
> really busy about 1/2 of the week but right now our DBA backs up tlogs
> once daily with a full backup weekly. Is this really sufficient?
In case of a disaster is recovering to the beginning of the day acceptable?
In case of a disaster, is the recovery time to restore the weekly full and 5
days of transaction logs acceptable?
David|||Well, that's easy....HELL no and no...
Thanks that was quite simple. Doh
"David Browne" <davidbaxterbrowne no potted meat@.hotmail.com> wrote in
message news:u7N064VaGHA.4936@.TK2MSFTNGP05.phx.gbl...
> "Tim Greenwood" <tim_greenwood A-T yahoo D-O-T com> wrote in message
> news:%23j7aO2VaGHA.608@.TK2MSFTNGP02.phx.gbl...
>> How does one determine a reasonable interval for backing up transaction
>> logs? For example, we have one small db that is only 1.8GB and the
>> transaction log is consistently around 1GB even after backup. I suppose
>> I'd need to add the "truncate" option to make it shrink? We only get
>> really busy about 1/2 of the week but right now our DBA backs up tlogs
>> once daily with a full backup weekly. Is this really sufficient?
> In case of a disaster is recovering to the beginning of the day
> acceptable?
> In case of a disaster, is the recovery time to restore the weekly full and
> 5 days of transaction logs acceptable?
> David
>|||"Tim Greenwood" <tim_greenwood A-T yahoo D-O-T com> wrote in message
news:%23j7aO2VaGHA.608@.TK2MSFTNGP02.phx.gbl...
> How does one determine a reasonable interval for backing up transaction
> logs? For example, we have one small db that is only 1.8GB and the
> transaction log is consistently around 1GB even after backup. I suppose
I'd
> need to add the "truncate" option to make it shrink?
No, you would need to do a DBCC shrinkfile.
I would highly suggest not to. If your log keeps growing to 1 gb between
backups, that's basically what you need. Leave it at that.
If you keep shrinking it, you run the risk of getting disk level
fragmentation.
> We only get really
> busy about 1/2 of the week but right now our DBA backs up tlogs once daily
> with a full backup weekly. Is this really sufficient?
Depends, what's your disaster recovery plan call for? Can you live with
losing a day's worth of data?
I have one system where we do transaction log backups every 20 minutes,
another we just keep the db in simple mode. Depends on your needs/desires.
>|||This is a multi-part message in MIME format.
--000900060703070102060205
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Well, what's an acceptable data loss window? Whatever it is, that
becomes your new tlog backup frequency. For example, if losing the last
30 minute's worth of data is acceptable (no data loss is desirable but
you've got to be realistic about it) then do transaction log backups
every 30 minutes. That will almost certainly keep the size of the log
file down (or rather it will use less of the log file and so if you're
tight on disk space it'd be OK to shrink it down to cater for about 30
minutes worth of transactions).
If the recovery time of restoring a full backup & up to 5 daily tlogs is
unacceptable then you may want to think about slipping in regular
differentials. For example, if you do a full weekly backup, a daily
differential and half-hourly log backups then the recovery time would be
the time it takes to restore the last full backup, the most recent
differential and every log backup done since then (which would be up to
48 log backups, but they're be much smaller than your current log
backups because they're only 30 minutes worth of changes rather than 24
hours worth of changes). The differentials will make it possible to
essentially skip ahead to a much more recent recovery point without
having to apply all the log backups since the full backup, which will
speed up the recovery time. If that's still too long, then maybe you
should do nightly full backups with the half-hourly log backups (and
maybe even slip in a differential every couple hours).
It's basically just a case of juggling the DB, diff & log backups to
cover your maximum acceptable data loss window and maximum acceptable
recovery time. The more often you do log backups the smaller those log
backups will be and hence the less physical log file you'll need to
store those transactions between log backups.
--
*mike hodgson*
http://sqlnerd.blogspot.com
Tim Greenwood wrote:
>Well, that's easy....HELL no and no...
>Thanks that was quite simple. Doh
>"David Browne" <davidbaxterbrowne no potted meat@.hotmail.com> wrote in
>message news:u7N064VaGHA.4936@.TK2MSFTNGP05.phx.gbl...
>
>>"Tim Greenwood" <tim_greenwood A-T yahoo D-O-T com> wrote in message
>>news:%23j7aO2VaGHA.608@.TK2MSFTNGP02.phx.gbl...
>>
>>How does one determine a reasonable interval for backing up transaction
>>logs? For example, we have one small db that is only 1.8GB and the
>>transaction log is consistently around 1GB even after backup. I suppose
>>I'd need to add the "truncate" option to make it shrink? We only get
>>really busy about 1/2 of the week but right now our DBA backs up tlogs
>>once daily with a full backup weekly. Is this really sufficient?
>>
>>In case of a disaster is recovering to the beginning of the day
>>acceptable?
>>In case of a disaster, is the recovery time to restore the weekly full and
>>5 days of transaction logs acceptable?
>>David
>>
>
>
--000900060703070102060205
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<tt>Well, what's an acceptable data loss window? Whatever it is, that
becomes your new tlog backup frequency. For example, if losing the
last 30 minute's worth of data is acceptable (no data loss is desirable
but you've got to be realistic about it) then do transaction log
backups every 30 minutes. That will almost certainly keep the size of
the log file down (or rather it will use less of the log file and so if
you're tight on disk space it'd be OK to shrink it down to cater for
about 30 minutes worth of transactions).<br>
<br>
If the recovery time of restoring a full backup & up to 5 daily
tlogs is unacceptable then you may want to think about slipping in
regular differentials. For example, if you do a full weekly backup, a
daily differential and half-hourly log backups then the recovery time
would be the time it takes to restore the last full backup, the most
recent differential and every log backup done since then (which would
be up to 48 log backups, but they're be much smaller than your current
log backups because they're only 30 minutes worth of changes rather
than 24 hours worth of changes). The differentials will make it
possible to essentially skip ahead to a much more recent recovery point
without having to apply all the log backups since the full backup,
which will speed up the recovery time. If that's still too long, then
maybe you should do nightly full backups with the half-hourly log
backups (and maybe even slip in a differential every couple hours).<br>
<br>
It's basically just a case of juggling the DB, diff & log backups
to cover your maximum acceptable data loss window and maximum
acceptable recovery time. The more often you do log backups the
smaller those log backups will be and hence the less physical log file
you'll need to store those transactions between log backups.<br>
</tt>
<div class="moz-signature">
<title></title>
<meta http-equiv="Content-Type" content="text/html; ">
<p><span lang="en-au"><font face="Tahoma" size="2">--<br>
</font></span> <b><span lang="en-au"><font face="Tahoma" size="2">mike
hodgson</font></span></b><span lang="en-au"><br>
<font face="Tahoma" size="2"><a href="http://links.10026.com/?link=http://sqlnerd.blogspot.com</a></font></span>">http://sqlnerd.blogspot.com">http://sqlnerd.blogspot.com</a></font></span>
</p>
</div>
<br>
<br>
Tim Greenwood wrote:
<blockquote cite="mid%2310nr4WaGHA.4780@.TK2MSFTNGP02.phx.gbl"
type="cite">
<pre wrap="">Well, that's easy....HELL no and no...
Thanks that was quite simple. Doh
"David Browne" <davidbaxterbrowne no potted <a class="moz-txt-link-abbreviated" href="http://links.10026.com/?link=mailto:meat@.hotmail.com">meat@.hotmail.com</a>> wrote in
message <a class="moz-txt-link-freetext" href="http://links.10026.com/?link=news:u7N064VaGHA.4936@.TK2MSFTNGP05.phx.gbl">news:u7N064VaGHA.4936@.TK2MSFTNGP05.phx.gbl</a>...
</pre>
<blockquote type="cite">
<pre wrap="">"Tim Greenwood" <tim_greenwood A-T yahoo D-O-T com> wrote in message
<a class="moz-txt-link-freetext" href="http://links.10026.com/?link=news:%23j7aO2VaGHA.608@.TK2MSFTNGP02.phx.gbl">news:%23j7aO2VaGHA.608@.TK2MSFTNGP02.phx.gbl</a>...
</pre>
<blockquote type="cite">
<pre wrap="">How does one determine a reasonable interval for backing up transaction
logs? For example, we have one small db that is only 1.8GB and the
transaction log is consistently around 1GB even after backup. I suppose
I'd need to add the "truncate" option to make it shrink? We only get
really busy about 1/2 of the week but right now our DBA backs up tlogs
once daily with a full backup weekly. Is this really sufficient?
</pre>
</blockquote>
<pre wrap="">In case of a disaster is recovering to the beginning of the day
acceptable?
In case of a disaster, is the recovery time to restore the weekly full and
5 days of transaction logs acceptable?
David
</pre>
</blockquote>
<pre wrap=""><!-->
</pre>
</blockquote>
</body>
</html>
--000900060703070102060205--

schedule export of report

What is the syntax (or process) to schedule a reporting services report to be
exported as and Excel spreadsheet and then emailed to recepients?
Are there any examples that I could refer to?
I would like to write some kind of script and schedule this for every day.its the UNC mapping, you dont use the drive letter. Example:
\\server\folder1\folder2\folder3\application
"john d" <johnd@.discussions.microsoft.com> wrote in message
news:9E9BAAB5-CD24-4CCC-A892-A424BBCA498F@.microsoft.com...
> What is the syntax (or process) to schedule a reporting services report to
> be
> exported as and Excel spreadsheet and then emailed to recepients?
> Are there any examples that I could refer to?
> I would like to write some kind of script and schedule this for every day.|||nevermind, I misread your post
"john d" <johnd@.discussions.microsoft.com> wrote in message
news:9E9BAAB5-CD24-4CCC-A892-A424BBCA498F@.microsoft.com...
> What is the syntax (or process) to schedule a reporting services report to
> be
> exported as and Excel spreadsheet and then emailed to recepients?
> Are there any examples that I could refer to?
> I would like to write some kind of script and schedule this for every day.

Schedule export from sql database to access

Hi
Can someone explain/help how can I create a schedule at SQL Server 2000 that
exports at X time of the day a SQL database into a access database without
exporting the views that the SQL database has.
Thanks
[]
Ricky
Take a look at the Import/Export wizard and sql agent in BooksOnLine.
Andrew J. Kelly SQL MVP
"Ricky" <newsgroupsmail@.gmail.com> wrote in message
news:OTItwJhVHHA.4872@.TK2MSFTNGP03.phx.gbl...
> Hi
> Can someone explain/help how can I create a schedule at SQL Server 2000
> that
> exports at X time of the day a SQL database into a access database without
> exporting the views that the SQL database has.
>
> Thanks
> []
> Ricky
>
>

Schedule export from sql database to access

Hi
Can someone explain/help how can I create a schedule at SQL Server 2000 that
exports at X time of the day a SQL database into a access database without
exporting the views that the SQL database has.
Thanks
[]
RickyTake a look at the Import/Export wizard and sql agent in BooksOnLine.
Andrew J. Kelly SQL MVP
"Ricky" <newsgroupsmail@.gmail.com> wrote in message
news:OTItwJhVHHA.4872@.TK2MSFTNGP03.phx.gbl...
> Hi
> Can someone explain/help how can I create a schedule at SQL Server 2000
> that
> exports at X time of the day a SQL database into a access database without
> exporting the views that the SQL database has.
>
> Thanks
> []
> Ricky
>
>

Schedule export from sql database to access

Hi
Can someone explain/help how can I create a schedule at SQL Server 2000 that
exports at X time of the day a SQL database into a access database without
exporting the views that the SQL database has.
Thanks
[]
RickyTake a look at the Import/Export wizard and sql agent in BooksOnLine.
--
Andrew J. Kelly SQL MVP
"Ricky" <newsgroupsmail@.gmail.com> wrote in message
news:OTItwJhVHHA.4872@.TK2MSFTNGP03.phx.gbl...
> Hi
> Can someone explain/help how can I create a schedule at SQL Server 2000
> that
> exports at X time of the day a SQL database into a access database without
> exporting the views that the SQL database has.
>
> Thanks
> []
> Ricky
>
>

schedule end of month

i'd like to schedule some reports to run just before midnight on the last day
of each month. it doesn't appear that the RS interface allows me to create
just one schedule that would do that (i end up creating 3 schedules: 1 for
months ending 30th, 1 for months ending 31st, 1 for February).
on the sql agent side of things, its interface allows scheduling on the last
day of the month, but you're not supposed to mess with that...
am i missing something? is there an easy workaround? thanksOn Jul 27, 9:12 am, burkecrosby
<burkecro...@.discussions.microsoft.com> wrote:
> i'd like to schedule some reports to run just before midnight on the last day
> of each month. it doesn't appear that the RS interface allows me to create
> just one schedule that would do that (i end up creating 3 schedules: 1 for
> months ending 30th, 1 for months ending 31st, 1 for February).
> on the sql agent side of things, its interface allows scheduling on the last
> day of the month, but you're not supposed to mess with that...
> am i missing something? is there an easy workaround? thanks
Took me a while to figure it out, but it works great. It might not be
exactly what you want, but who knows it may work out for you. I got a
request from a user that they get the previous month's report on the
first of the month at 7am (time doesn't matter here). So for example,
on August 1st at 7am, she will receive a report for July1-31st. You
can change the time to be 12:00am or whatever.
First in your report make two datasets with the following:
Dataset 1 (I called mine StartofMonth):
select DATEADD(mm, DATEDIFF(mm,0,getdate())-1, 0)
Dataset 2 (I called mine EndofMonth):
select dateadd(ms,-3,DATEADD(mm, DATEDIFF(mm,0,getdate() ), 0))
In my main dataset, the code looks for data between two parameters
@.startdate and @.enddate. Default these parameters (under
Report>Report Parameters...) to the corresponding datasets. The
"field" here should just be ID. Run the report, it should pull data
from the first to the last of last month.
Now go to your subscription and make your schedule. Under Schedule
Details (when you select to make your own schedule) click the Month
radio button. Pick all the month (using the check boxes) and then
select the radio labeled "On Calendar day(s):" and place a 1 in that
box. Now just adjust your start time as you see necessary. August
1st is coming soon, so you can see the result of your effort soon!!!
Only issue with this work around is that whenever your users open the
report (if they ever will) the dates will default to the first and
last day of the previous month. Oh well... they can change it
manually I guess or you can make a specific report (duplicate) that is
just for subscriptions. Also, for sanity, you might want to display
your parameters on the report so you see that it worked correctly.
Let me know if that works out for you!|||thanks Ayman. i can see and understand your method and may use that for
future reports. i was hoping not to have to redo the report query because of
the oddities of my source data.
i don't understand why MSFT has the difference between the scheduling
interfaces of RS vs SQL Server Agent. seems like RS could have just
inherited from SQL Agent...
burke
"Ayman" wrote:
> On Jul 27, 9:12 am, burkecrosby
> <burkecro...@.discussions.microsoft.com> wrote:
> > i'd like to schedule some reports to run just before midnight on the last day
> > of each month. it doesn't appear that the RS interface allows me to create
> > just one schedule that would do that (i end up creating 3 schedules: 1 for
> > months ending 30th, 1 for months ending 31st, 1 for February).
> >
> > on the sql agent side of things, its interface allows scheduling on the last
> > day of the month, but you're not supposed to mess with that...
> >
> > am i missing something? is there an easy workaround? thanks
> Took me a while to figure it out, but it works great. It might not be
> exactly what you want, but who knows it may work out for you. I got a
> request from a user that they get the previous month's report on the
> first of the month at 7am (time doesn't matter here). So for example,
> on August 1st at 7am, she will receive a report for July1-31st. You
> can change the time to be 12:00am or whatever.
> First in your report make two datasets with the following:
> Dataset 1 (I called mine StartofMonth):
> select DATEADD(mm, DATEDIFF(mm,0,getdate())-1, 0)
> Dataset 2 (I called mine EndofMonth):
> select dateadd(ms,-3,DATEADD(mm, DATEDIFF(mm,0,getdate() ), 0))
> In my main dataset, the code looks for data between two parameters
> @.startdate and @.enddate. Default these parameters (under
> Report>Report Parameters...) to the corresponding datasets. The
> "field" here should just be ID. Run the report, it should pull data
> from the first to the last of last month.
> Now go to your subscription and make your schedule. Under Schedule
> Details (when you select to make your own schedule) click the Month
> radio button. Pick all the month (using the check boxes) and then
> select the radio labeled "On Calendar day(s):" and place a 1 in that
> box. Now just adjust your start time as you see necessary. August
> 1st is coming soon, so you can see the result of your effort soon!!!
> Only issue with this work around is that whenever your users open the
> report (if they ever will) the dates will default to the first and
> last day of the previous month. Oh well... they can change it
> manually I guess or you can make a specific report (duplicate) that is
> just for subscriptions. Also, for sanity, you might want to display
> your parameters on the report so you see that it worked correctly.
> Let me know if that works out for you!
>|||On Jul 27, 10:44 am, burkecrosby
<burkecro...@.discussions.microsoft.com> wrote:
> thanks Ayman. i can see and understand your method and may use that for
> future reports. i was hoping not to have to redo the report query because of
> the oddities of my source data.
> i don't understand why MSFT has the difference between the scheduling
> interfaces of RS vs SQL Server Agent. seems like RS could have just
> inherited from SQL Agent...
> burke
> "Ayman" wrote:
> > On Jul 27, 9:12 am, burkecrosby
> > <burkecro...@.discussions.microsoft.com> wrote:
> > > i'd like to schedule some reports to run just before midnight on the last day
> > > of each month. it doesn't appear that the RS interface allows me to create
> > > just one schedule that would do that (i end up creating 3 schedules: 1 for
> > > months ending 30th, 1 for months ending 31st, 1 for February).
> > > on the sql agent side of things, its interface allows scheduling on the last
> > > day of the month, but you're not supposed to mess with that...
> > > am i missing something? is there an easy workaround? thanks
> > Took me a while to figure it out, but it works great. It might not be
> > exactly what you want, but who knows it may work out for you. I got a
> > request from a user that they get the previous month's report on the
> > first of the month at 7am (time doesn't matter here). So for example,
> > on August 1st at 7am, she will receive a report for July1-31st. You
> > can change the time to be 12:00am or whatever.
> > First in your report make two datasets with the following:
> > Dataset 1 (I called mine StartofMonth):
> > select DATEADD(mm, DATEDIFF(mm,0,getdate())-1, 0)
> > Dataset 2 (I called mine EndofMonth):
> > select dateadd(ms,-3,DATEADD(mm, DATEDIFF(mm,0,getdate() ), 0))
> > In my main dataset, the code looks for data between two parameters
> > @.startdate and @.enddate. Default these parameters (under
> > Report>Report Parameters...) to the corresponding datasets. The
> > "field" here should just be ID. Run the report, it should pull data
> > from the first to the last of last month.
> > Now go to your subscription and make your schedule. Under Schedule
> > Details (when you select to make your own schedule) click the Month
> > radio button. Pick all the month (using the check boxes) and then
> > select the radio labeled "On Calendar day(s):" and place a 1 in that
> > box. Now just adjust your start time as you see necessary. August
> > 1st is coming soon, so you can see the result of your effort soon!!!
> > Only issue with this work around is that whenever your users open the
> > report (if they ever will) the dates will default to the first and
> > last day of the previous month. Oh well... they can change it
> > manually I guess or you can make a specific report (duplicate) that is
> > just for subscriptions. Also, for sanity, you might want to display
> > your parameters on the report so you see that it worked correctly.
> > Let me know if that works out for you!
I'm not that knowledgeable but I can tell you, it doesn't matter what
datasource you use the code is universal across all SQL databases.
It's an easy fix to a tedious and annoying problem. I wish there was
an easier way too, but hey it was a good coding experience for me!! I
will be using the same method across any other reports that need
subscriptions.
You don't need to change any scripts at all, well... except the main
script where you need to add the data time filter. Hmmm... not sure
what to tell you now...

schedule email function

Hi all,
I am looking for scripts or method could use sql sever periodaically send
out emails to alert users according to the particular time log setting.
Thx in advance,
Fox NewbiewHi Fox,
What do you want to send ? Which version are you using ? (I am asking,
becasue there had been some changes within the SQL Mail in 2k5)
Are you able to install a MAPI profile on your server ? Is the server
running under the local system accoutn or a domain account ?
You see, you need to provide some more information first ;-)
HTH, Jens Suessmeyer.|||I would like to send out html format email to users to alert them in
periodically. I am using W2k sp4 and is running as domaint account.
I would go for with or without MAPI solution are both welcome.
Thx so much
"Jens" wrote:
> Hi Fox,
>
> What do you want to send ? Which version are you using ? (I am asking,
> becasue there had been some changes within the SQL Mail in 2k5)
> Are you able to install a MAPI profile on your server ? Is the server
> running under the local system accoutn or a domain account ?
> You see, you need to provide some more information first ;-)
> HTH, Jens Suessmeyer.
>|||I'd download and use xp_smtp_sendmail from www.sqldev.net.
In 2005, SMTP support and HTML are built-in to the new "Database Mail" functionality.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Fox newbiew" <Foxnewbiew@.discussions.microsoft.com> wrote in message
news:F09A5612-B171-4402-A213-08C91A4D1C8B@.microsoft.com...
>I would like to send out html format email to users to alert them in
> periodically. I am using W2k sp4 and is running as domaint account.
> I would go for with or without MAPI solution are both welcome.
> Thx so much
> "Jens" wrote:
>> Hi Fox,
>>
>> What do you want to send ? Which version are you using ? (I am asking,
>> becasue there had been some changes within the SQL Mail in 2k5)
>> Are you able to install a MAPI profile on your server ? Is the server
>> running under the local system accoutn or a domain account ?
>> You see, you need to provide some more information first ;-)
>> HTH, Jens Suessmeyer.
>>|||Does it possible not using SQL mail ? Since I have an retriction on not allow
install outlook, once outlook missing SQL mail is not workable.
"Tibor Karaszi" wrote:
> I'd download and use xp_smtp_sendmail from www.sqldev.net.
> In 2005, SMTP support and HTML are built-in to the new "Database Mail" functionality.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Fox newbiew" <Foxnewbiew@.discussions.microsoft.com> wrote in message
> news:F09A5612-B171-4402-A213-08C91A4D1C8B@.microsoft.com...
> >I would like to send out html format email to users to alert them in
> > periodically. I am using W2k sp4 and is running as domaint account.
> >
> > I would go for with or without MAPI solution are both welcome.
> >
> > Thx so much
> >
> > "Jens" wrote:
> >
> >> Hi Fox,
> >>
> >>
> >> What do you want to send ? Which version are you using ? (I am asking,
> >> becasue there had been some changes within the SQL Mail in 2k5)
> >>
> >> Are you able to install a MAPI profile on your server ? Is the server
> >> running under the local system accoutn or a domain account ?
> >>
> >> You see, you need to provide some more information first ;-)
> >>
> >> HTH, Jens Suessmeyer.
> >>
> >>
>
>|||Hi Fox,
Your are right. It is a SMTP based extended procedure to send emails.
The only restriction which perhaps might keep you away from using it,
is that i can=B4t autenticate at a SMTP server, so the smtp server has
to accept only non authenticated users. But as a workaround you can
also specify a virtual SMPT Server (which is part of every Windows 2k >
version), which relay the mails to the secure server WITH
authentication.
HTH, jens Suessmeyer.|||None of the two I mentioned uses MAPI, i.e., they do not require Outlook.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Fox newbiew" <Foxnewbiew@.discussions.microsoft.com> wrote in message
news:B52620EA-0055-4B0D-94E0-A597C2B19367@.microsoft.com...
> Does it possible not using SQL mail ? Since I have an retriction on not allow
> install outlook, once outlook missing SQL mail is not workable.
> "Tibor Karaszi" wrote:
>> I'd download and use xp_smtp_sendmail from www.sqldev.net.
>> In 2005, SMTP support and HTML are built-in to the new "Database Mail" functionality.
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>>
>> "Fox newbiew" <Foxnewbiew@.discussions.microsoft.com> wrote in message
>> news:F09A5612-B171-4402-A213-08C91A4D1C8B@.microsoft.com...
>> >I would like to send out html format email to users to alert them in
>> > periodically. I am using W2k sp4 and is running as domaint account.
>> >
>> > I would go for with or without MAPI solution are both welcome.
>> >
>> > Thx so much
>> >
>> > "Jens" wrote:
>> >
>> >> Hi Fox,
>> >>
>> >>
>> >> What do you want to send ? Which version are you using ? (I am asking,
>> >> becasue there had been some changes within the SQL Mail in 2k5)
>> >>
>> >> Are you able to install a MAPI profile on your server ? Is the server
>> >> running under the local system accoutn or a domain account ?
>> >>
>> >> You see, you need to provide some more information first ;-)
>> >>
>> >> HTH, Jens Suessmeyer.
>> >>
>> >>
>>|||Tibor,
Correct me if i got wrong, since I get down to www.sqldev.net and only find
xp_smtp_sendmail use xp_sendmail as well and xp_send mail from SQL mail and I
need to install outlook on production server and as admin acccount to send
out mails, which I am not allowing to install any outlook kind of programs on
production server.
Any alter suggestions on schdule a job to send out mail at periodically ?
Thx in advance !
Best Regards,
Fox
"Tibor Karaszi" wrote:
> None of the two I mentioned uses MAPI, i.e., they do not require Outlook.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "Fox newbiew" <Foxnewbiew@.discussions.microsoft.com> wrote in message
> news:B52620EA-0055-4B0D-94E0-A597C2B19367@.microsoft.com...
> > Does it possible not using SQL mail ? Since I have an retriction on not allow
> > install outlook, once outlook missing SQL mail is not workable.
> >
> > "Tibor Karaszi" wrote:
> >
> >> I'd download and use xp_smtp_sendmail from www.sqldev.net.
> >>
> >> In 2005, SMTP support and HTML are built-in to the new "Database Mail" functionality.
> >>
> >> --
> >> Tibor Karaszi, SQL Server MVP
> >> http://www.karaszi.com/sqlserver/default.asp
> >> http://www.solidqualitylearning.com/
> >>
> >>
> >> "Fox newbiew" <Foxnewbiew@.discussions.microsoft.com> wrote in message
> >> news:F09A5612-B171-4402-A213-08C91A4D1C8B@.microsoft.com...
> >> >I would like to send out html format email to users to alert them in
> >> > periodically. I am using W2k sp4 and is running as domaint account.
> >> >
> >> > I would go for with or without MAPI solution are both welcome.
> >> >
> >> > Thx so much
> >> >
> >> > "Jens" wrote:
> >> >
> >> >> Hi Fox,
> >> >>
> >> >>
> >> >> What do you want to send ? Which version are you using ? (I am asking,
> >> >> becasue there had been some changes within the SQL Mail in 2k5)
> >> >>
> >> >> Are you able to install a MAPI profile on your server ? Is the server
> >> >> running under the local system accoutn or a domain account ?
> >> >>
> >> >> You see, you need to provide some more information first ;-)
> >> >>
> >> >> HTH, Jens Suessmeyer.
> >> >>
> >> >>
> >>
> >>
> >>
>|||xp_smtp_sendmail does *not* use xp_sendmail. Where did you read that?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Fox newbiew" <Foxnewbiew@.discussions.microsoft.com> wrote in message
news:4FE4D1D2-EA6F-47A3-B8E4-178003E7BCEA@.microsoft.com...
> Tibor,
> Correct me if i got wrong, since I get down to www.sqldev.net and only find
> xp_smtp_sendmail use xp_sendmail as well and xp_send mail from SQL mail and I
> need to install outlook on production server and as admin acccount to send
> out mails, which I am not allowing to install any outlook kind of programs on
> production server.
> Any alter suggestions on schdule a job to send out mail at periodically ?
> Thx in advance !
> Best Regards,
> Fox
> "Tibor Karaszi" wrote:
>> None of the two I mentioned uses MAPI, i.e., they do not require Outlook.
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>> Blog: http://solidqualitylearning.com/blogs/tibor/
>>
>> "Fox newbiew" <Foxnewbiew@.discussions.microsoft.com> wrote in message
>> news:B52620EA-0055-4B0D-94E0-A597C2B19367@.microsoft.com...
>> > Does it possible not using SQL mail ? Since I have an retriction on not allow
>> > install outlook, once outlook missing SQL mail is not workable.
>> >
>> > "Tibor Karaszi" wrote:
>> >
>> >> I'd download and use xp_smtp_sendmail from www.sqldev.net.
>> >>
>> >> In 2005, SMTP support and HTML are built-in to the new "Database Mail" functionality.
>> >>
>> >> --
>> >> Tibor Karaszi, SQL Server MVP
>> >> http://www.karaszi.com/sqlserver/default.asp
>> >> http://www.solidqualitylearning.com/
>> >>
>> >>
>> >> "Fox newbiew" <Foxnewbiew@.discussions.microsoft.com> wrote in message
>> >> news:F09A5612-B171-4402-A213-08C91A4D1C8B@.microsoft.com...
>> >> >I would like to send out html format email to users to alert them in
>> >> > periodically. I am using W2k sp4 and is running as domaint account.
>> >> >
>> >> > I would go for with or without MAPI solution are both welcome.
>> >> >
>> >> > Thx so much
>> >> >
>> >> > "Jens" wrote:
>> >> >
>> >> >> Hi Fox,
>> >> >>
>> >> >>
>> >> >> What do you want to send ? Which version are you using ? (I am asking,
>> >> >> becasue there had been some changes within the SQL Mail in 2k5)
>> >> >>
>> >> >> Are you able to install a MAPI profile on your server ? Is the server
>> >> >> running under the local system accoutn or a domain account ?
>> >> >>
>> >> >> You see, you need to provide some more information first ;-)
>> >> >>
>> >> >> HTH, Jens Suessmeyer.
>> >> >>
>> >> >>
>> >>
>> >>
>> >>
>>|||You are right ! Thx
"Tibor Karaszi" wrote:
> xp_smtp_sendmail does *not* use xp_sendmail. Where did you read that?
>
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "Fox newbiew" <Foxnewbiew@.discussions.microsoft.com> wrote in message
> news:4FE4D1D2-EA6F-47A3-B8E4-178003E7BCEA@.microsoft.com...
> > Tibor,
> >
> > Correct me if i got wrong, since I get down to www.sqldev.net and only find
> > xp_smtp_sendmail use xp_sendmail as well and xp_send mail from SQL mail and I
> > need to install outlook on production server and as admin acccount to send
> > out mails, which I am not allowing to install any outlook kind of programs on
> > production server.
> >
> > Any alter suggestions on schdule a job to send out mail at periodically ?
> >
> > Thx in advance !
> >
> > Best Regards,
> > Fox
> >
> > "Tibor Karaszi" wrote:
> >
> >> None of the two I mentioned uses MAPI, i.e., they do not require Outlook.
> >>
> >> --
> >> Tibor Karaszi, SQL Server MVP
> >> http://www.karaszi.com/sqlserver/default.asp
> >> http://www.solidqualitylearning.com/
> >> Blog: http://solidqualitylearning.com/blogs/tibor/
> >>
> >>
> >> "Fox newbiew" <Foxnewbiew@.discussions.microsoft.com> wrote in message
> >> news:B52620EA-0055-4B0D-94E0-A597C2B19367@.microsoft.com...
> >> > Does it possible not using SQL mail ? Since I have an retriction on not allow
> >> > install outlook, once outlook missing SQL mail is not workable.
> >> >
> >> > "Tibor Karaszi" wrote:
> >> >
> >> >> I'd download and use xp_smtp_sendmail from www.sqldev.net.
> >> >>
> >> >> In 2005, SMTP support and HTML are built-in to the new "Database Mail" functionality.
> >> >>
> >> >> --
> >> >> Tibor Karaszi, SQL Server MVP
> >> >> http://www.karaszi.com/sqlserver/default.asp
> >> >> http://www.solidqualitylearning.com/
> >> >>
> >> >>
> >> >> "Fox newbiew" <Foxnewbiew@.discussions.microsoft.com> wrote in message
> >> >> news:F09A5612-B171-4402-A213-08C91A4D1C8B@.microsoft.com...
> >> >> >I would like to send out html format email to users to alert them in
> >> >> > periodically. I am using W2k sp4 and is running as domaint account.
> >> >> >
> >> >> > I would go for with or without MAPI solution are both welcome.
> >> >> >
> >> >> > Thx so much
> >> >> >
> >> >> > "Jens" wrote:
> >> >> >
> >> >> >> Hi Fox,
> >> >> >>
> >> >> >>
> >> >> >> What do you want to send ? Which version are you using ? (I am asking,
> >> >> >> becasue there had been some changes within the SQL Mail in 2k5)
> >> >> >>
> >> >> >> Are you able to install a MAPI profile on your server ? Is the server
> >> >> >> running under the local system accoutn or a domain account ?
> >> >> >>
> >> >> >> You see, you need to provide some more information first ;-)
> >> >> >>
> >> >> >> HTH, Jens Suessmeyer.
> >> >> >>
> >> >> >>
> >> >>
> >> >>
> >> >>
> >>
> >>
>

Schedule DTS to import data from Oracle to SQL

Hi, I am trying to schedule a DTS daily to get data from Oracle to SQL Serve
r
but the job are failing. It works if I manually run the DTS. I think it is
because the SQL Agent domain account doesn't have any access to Oracle
database. I don't have control over the Orcale DB. Any idea how I can solve
this problem? Any help will be greatly appreciated!
Thanks!
--
YuhongThat is most likely the problem. You could get away with
running the DTS in a task scheduler job and run that under
any windows account you want. Here's how to do run
a stored DTS package in SQL Server via VBScript.
http://www.eggheadcafe.com/articles/20030923.asp
2005 Microsoft MVP C#
Robbe Morris
http://www.robbemorris.com
http://www.mastervb.net/home/ng/for...st10017013.aspx
"Yuhong" <Yuhong@.discussions.microsoft.com> wrote in message
news:592FEB50-7009-4D18-B0E5-9B8583159110@.microsoft.com...
> Hi, I am trying to schedule a DTS daily to get data from Oracle to SQL
> Server
> but the job are failing. It works if I manually run the DTS. I think it is
> because the SQL Agent domain account doesn't have any access to Oracle
> database. I don't have control over the Orcale DB. Any idea how I can
> solve
> this problem? Any help will be greatly appreciated!
> Thanks!
> --
> Yuhong

Schedule DTS Packages to run sequentially

Hi,

I have eight DTS packages. I would like to schedule all of time to run every night. Can I do this in sequence like something similar to scheduling "Job" in SQL Server Agent, when package one finish, immediately execute package two, then package three...and so on.

Any ideas? Thanks in advance.

SnoopyCreate a job, each step in the job can be the next package.

Step1 = Package1
Step2 = Package2
ect.....|||SHICKS:
Thanks. Can you tell me how to do it? Can I do it through SQL Server Agent?
When I go to SQL Agent -> New Job -> steps -> New Job steps, I don't know where to specify my package. Or should I do in by other methods? Thanks in advance.|||If you are using SQL 2000 Client you can define a dts Package Run object at the end of each DTS Package.

SQL 7 CLient does not have this functionality

SCHEDULE DTS PACKAGE ERROR

I am having trouble scheduling a DTS package.
The error I receive is:
Executed as user: MAGIC-SQL-02\SYSTEM. DTSRun: Loading...
Error: -2147467259 (80004005); Provider Error: 17 (11) Error
string: [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or
access denied. Error source: Microsoft OLE DB Provider for SQL Server
Help file: Help context: 0. Process Exit Code 1. The step failed.
Any idea why
TIA
Grant
Check the SQL Server Agent startup account. It appears the system account
is being used. NOt sure which SQL Server is causing the SQL Server does not
exist or access denied error, but if it is a remote SQL Server then the
system account will not have access to it. Change teh SQL Server Agent
startup account to a domain account that has access to all SQL Servers
accessed by the package.
Rand
This posting is provided "as is" with no warranties and confers no rights.

SCHEDULE DTS PACKAGE ERROR

I am having trouble scheduling a DTS package.
The error I receive is:
Executed as user: MAGIC-SQL-02\SYSTEM. DTSRun: Loading...
Error: -2147467259 (80004005); Provider Error: 17 (11) Error
string: [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not
exist or
access denied. Error source: Microsoft OLE DB Provider for SQL Server
Help file: Help context: 0. Process Exit Code 1. The step failed.
Any idea why
TIA
GrantCheck the SQL Server Agent startup account. It appears the system account
is being used. NOt sure which SQL Server is causing the SQL Server does not
exist or access denied error, but if it is a remote SQL Server then the
system account will not have access to it. Change teh SQL Server Agent
startup account to a domain account that has access to all SQL Servers
accessed by the package.
Rand
This posting is provided "as is" with no warranties and confers no rights.

SCHEDULE DTS PACKAGE ERROR

I am having trouble scheduling a DTS package.
The error I receive is:
Executed as user: MAGIC-SQL-02\SYSTEM. DTSRun: Loading...
Error: -2147467259 (80004005); Provider Error: 17 (11) Error
string: [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or
access denied. Error source: Microsoft OLE DB Provider for SQL Server
Help file: Help context: 0. Process Exit Code 1. The step failed.
Any idea why
TIA
GrantCheck the SQL Server Agent startup account. It appears the system account
is being used. NOt sure which SQL Server is causing the SQL Server does not
exist or access denied error, but if it is a remote SQL Server then the
system account will not have access to it. Change teh SQL Server Agent
startup account to a domain account that has access to all SQL Servers
accessed by the package.
Rand
This posting is provided "as is" with no warranties and confers no rights.

Schedule DTS Package

I have MS SQL installed on my workstation at work. I am trying to use DTS to export data from our local network that uses a Pervasive DB to our web server that is hosted with another company.

If I go in and manually execute the DTS package from my workstation, it send the data to the web server.

If I try to schedule the DTS Package to automatically send the data, it fails. SQL Server Agent is running on my workstation and on the web server.

Is what I am trying to do possible? What am I doing wrong?This is a very frequent problem and it is related to permissions.

This is a KB article that describes the problem and the solution:INF: How to Run a DTS Package as a Scheduled Job

Terri

schedule dts at a remote server

Hi
Can somenone help me build a DTS in SQL Server 2000 that allows to schedule
the execution of a executable file in a remote server without sql server?...
[]
RickyRicky,
try to read up on xp_cmdshell in BOL.
--
Venkat
sql server admirer
"Ricky" wrote:

> Hi
> Can somenone help me build a DTS in SQL Server 2000 that allows to schedul
e
> the execution of a executable file in a remote server without sql server?.
.
> []
> Ricky
>
>
>|||Ricky,
try to read up on xp_cmdshell in BOL.
--
Venkat
sql server admirer
"Ricky" wrote:

> Hi
> Can somenone help me build a DTS in SQL Server 2000 that allows to schedul
e
> the execution of a executable file in a remote server without sql server?.
.
> []
> Ricky
>
>
>|||I didn't understand what "xp_cmdshell in BOL" is. Can you explain better.
Sorry but i'm a newbie on this matter.
Thanks
Ricky
"Venkat" <Venkat@.discussions.microsoft.com> wrote in message
news:39EFAD0A-689B-441E-A444-9CC7FCA660D8@.microsoft.com...[vbcol=seagreen]
> Ricky,
> try to read up on xp_cmdshell in BOL.
> --
> Venkat
> sql server admirer
>
> "Ricky" wrote:
>|||I didn't understand what "xp_cmdshell in BOL" is. Can you explain better.
Sorry but i'm a newbie on this matter.
Thanks
Ricky
"Venkat" <Venkat@.discussions.microsoft.com> wrote in message
news:39EFAD0A-689B-441E-A444-9CC7FCA660D8@.microsoft.com...[vbcol=seagreen]
> Ricky,
> try to read up on xp_cmdshell in BOL.
> --
> Venkat
> sql server admirer
>
> "Ricky" wrote:
>

schedule dts at a remote server

Hi
Can somenone help me build a DTS in SQL Server 2000 that allows to schedule
the execution of a executable file in a remote server without sql server?...
[]
RickyCan you access shared folders on the remote server? If so you could use
xp_cmdshell to run the command - mapping a Network Drive if necessary. You
will need to set appropriate permissions on the shared folder.
Alternatively if you are using the DTS package to unconditionally run the
executable then instead you could just schedule the executable on the remote
server using Windows Scheduled Tasks.
Chris
"Ricky" wrote:

> Hi
> Can somenone help me build a DTS in SQL Server 2000 that allows to schedul
e
> the execution of a executable file in a remote server without sql server?.
.
> []
> Ricky
>
>
>|||Thanks for the tip. But i must go with the first option once i've tried the
second option you advice but the excutable i want to run in the remote
server doesn't do an audit to the software and hardware of the remote
server.
The executable file is audit32.exe from www.itsolutions.intuit.com
Can you design for me the dts and send it to my email?.. Or give me the
right/direct way of doing that in DTS of SQL Server 2000.
Thanks
[]
Ricky
"Chris Howarth" <ChrisHowarth@.discussions.microsoft.com> wrote in message
news:193887B6-D869-45D2-A6DC-362A62009FBA@.microsoft.com...
> Can you access shared folders on the remote server? If so you could use
> xp_cmdshell to run the command - mapping a Network Drive if necessary. You
> will need to set appropriate permissions on the shared folder.
> Alternatively if you are using the DTS package to unconditionally run the
> executable then instead you could just schedule the executable on the
> remote
> server using Windows Scheduled Tasks.
> Chris
>
> "Ricky" wrote:
>|||Ricky wrote:
> Thanks for the tip. But i must go with the first option once i've tried th
e
> second option you advice but the excutable i want to run in the remote
> server doesn't do an audit to the software and hardware of the remote
> server.
> The executable file is audit32.exe from www.itsolutions.intuit.com
> Can you design for me the dts and send it to my email?.. Or give me the
> right/direct way of doing that in DTS of SQL Server 2000.
>
So you're trying to perform a Trackit audit on a remote machine from
within SQL Server? This isn't going to work. That executable file must
be run ON THE MACHINE that you want to audit. Running it from within
SQL, via xp_cmdshell, DTS, SQL Agent, whatever, is going to execute it
on the SQL Server machine, not the remote machine. You're either going
to have to schedule it on the remote machine itself, or find some way to
open a remote command shell to the remote machine.|||"Tracy McKibben" <tracy@.realsqlguy.com> wrote in message
news:%23eePm2flGHA.3528@.TK2MSFTNGP02.phx.gbl...
> Ricky wrote:
> So you're trying to perform a Trackit audit on a remote machine from
> within SQL Server? This isn't going to work. That executable file must
> be run ON THE MACHINE that you want to audit. Running it from within SQL,
> via xp_cmdshell, DTS, SQL Agent, whatever, is going to execute it on the
> SQL Server machine, not the remote machine. You're either going to have
> to schedule it on the remote machine itself, or find some way to open a
> remote command shell to the remote machine.
You're right but to run the Trackit audit in the remote server i only have
to
let the file in that specific remote server and share the directory where is
it.
The final purpose is to make a DTS with schedule and force the Trackit audit
run at x time. So i need help for this design. Can you help me?...
Thanks
Ricky|||Ricky wrote:
> "Tracy McKibben" <tracy@.realsqlguy.com> wrote in message
> news:%23eePm2flGHA.3528@.TK2MSFTNGP02.phx.gbl...
>
> You're right but to run the Trackit audit in the remote server i only have
> to
> let the file in that specific remote server and share the directory where
is
> it.
> The final purpose is to make a DTS with schedule and force the Trackit aud
it
> run at x time. So i need help for this design. Can you help me?...
> Thanks
> Ricky
>
Running the executable from a job ON YOUR SQL SERVER is NOT going to
execute it on the remote server. To illustrate, go to your SQL Server
machine, open Explorer, navigate to the executable via the UNC path to
your remote share. If you double-click on the executable, it's going to
run within the context of your SQL Server machine.
You need to run the audit within the context of the remote machine,
meaning it needs to be scheduled ON THE REMOTE SERVER.|||"Tracy McKibben" <tracy@.realsqlguy.com> wrote in message
news:elzOtfmlGHA.3588@.TK2MSFTNGP02.phx.gbl...
> Ricky wrote:
> Running the executable from a job ON YOUR SQL SERVER is NOT going to
> execute it on the remote server. To illustrate, go to your SQL Server
> machine, open Explorer, navigate to the executable via the UNC path to
> your remote share. If you double-click on the executable, it's going to
> run within the context of your SQL Server machine.
> You need to run the audit within the context of the remote machine,
> meaning it needs to be scheduled ON THE REMOTE SERVER.
>
Yes i know that. The audit must be schedule on the Remote Server.
But couldn't i do that by creating a DTS Schedule that will run in a shared
directory where is the audit32.exe?
Thanks
Ricky|||Ricky wrote:
> Yes i know that. The audit must be schedule on the Remote Server.
> But couldn't i do that by creating a DTS Schedule that will run in a share
d
> directory where is the audit32.exe?
> Thanks
> Ricky
>
Open Windows Explorer on your SQL Server machine. Navigate to the
remote share that contains the audit32.exe file, double-click the exe
file. Where does the program run? It runs on your SQL Server machine.
If you schedule the job ON THE SQL SERVER MACHINE, SQL is going to do
exactly what you just did - it's going to pull the exe from the remote
share and run it, ON THE SQL SERVER MACHINE. I really truly don't know
a better way to explain execution context to you, perhaps you should
consult with one of your local IT guys?|||"Tracy McKibben" <tracy@.realsqlguy.com> wrote in message
news:uP9vpFMmGHA.856@.TK2MSFTNGP03.phx.gbl...
> Ricky wrote:
> Open Windows Explorer on your SQL Server machine. Navigate to the remote
> share that contains the audit32.exe file, double-click the exe file.
> Where does the program run? It runs on your SQL Server machine. If you
> schedule the job ON THE SQL SERVER MACHINE, SQL is going to do exactly
> what you just did - it's going to pull the exe from the remote share and
> run it, ON THE SQL SERVER MACHINE. I really truly don't know a better way
> to explain execution context to you, perhaps you should consult with one
> of your local IT guys?
Ok. I've already understand what you mean. So what do you advice then? Once
i've already try windows schedule and didn't work well.
Thanks
Ricky|||Ricky wrote:
> Ok. I've already understand what you mean. So what do you advice then? Onc
e
> i've already try windows schedule and didn't work well.
> Thanks
> Ricky
>
Recent versions of TrackIT offer the ability to do scheduled audits.
Consult your Administrator's Guide for details on how to set one up.

schedule dts at a remote server

Hi
Can somenone help me build a DTS in SQL Server 2000 that allows to schedule
the execution of a executable file in a remote server without sql server?...
[]
RickyRicky,
try to read up on xp_cmdshell in BOL.
--
Venkat
sql server admirer
"Ricky" wrote:
> Hi
> Can somenone help me build a DTS in SQL Server 2000 that allows to schedule
> the execution of a executable file in a remote server without sql server?...
> []
> Ricky
>
>
>|||I didn't understand what "xp_cmdshell in BOL" is. Can you explain better.
Sorry but i'm a newbie on this matter.
Thanks
Ricky
"Venkat" <Venkat@.discussions.microsoft.com> wrote in message
news:39EFAD0A-689B-441E-A444-9CC7FCA660D8@.microsoft.com...
> Ricky,
> try to read up on xp_cmdshell in BOL.
> --
> Venkat
> sql server admirer
>
> "Ricky" wrote:
>> Hi
>> Can somenone help me build a DTS in SQL Server 2000 that allows to
>> schedule
>> the execution of a executable file in a remote server without sql
>> server?...
>> []
>> Ricky
>>
>>
>>

Schedule design issue


Hi,
I need advice (being a newbie) on designing a schedule Availability
table.
I have a schedule table which I write availabilities to this way:
Based on if this is a one day event or a recurrent event, I am writing
to the DB every schedule day. i.e, if this availability starts on jan 01
and end march 01 every Mon,Tue,Wedn from 12:00 to 5:00PM, then I write a
row for every date (Which comes to approx 8 or 9). So imagine if someone
puts a recurrence for 120 ws!!
Is there another way to do this? I thought about changing it to this:
Taking the same example above, 1 row would be created with a new column
("recurrence" as the no. of ws) and a column for every day of the
w()..
I would like to know from the gurus out there what is the best solution
.I want to give the user the option to edit a recurrent event and
adding a recurrent column would give me this capability..
Thanks
*** Sent via Developersdex http://www.examnotes.net ***
Don't just participate in USENET...get rewarded for it!Patrick Delifer wrote:
> Hi,
> I need advice (being a newbie) on designing a schedule Availability
> table.
> I have a schedule table which I write availabilities to this way:
> Based on if this is a one day event or a recurrent event, I am writing
> to the DB every schedule day. i.e, if this availability starts on jan
> 01 and end march 01 every Mon,Tue,Wedn from 12:00 to 5:00PM, then I
> write a row for every date (Which comes to approx 8 or 9). So imagine
> if someone puts a recurrence for 120 ws!!
> Is there another way to do this? I thought about changing it to this:
> Taking the same example above, 1 row would be created with a new
> column ("recurrence" as the no. of ws) and a column for every day
> of the w()..
> I would like to know from the gurus out there what is the best
> solution .I want to give the user the option to edit a recurrent
> event and adding a recurrent column would give me this capability..
> Thanks
>
One way to implement is to have a schedule table with the main schedule
information (e.g. Pay Employees and start date / end date) and all the
related scheduling information (e.g. every 2 ws). In the calendar
table your recurring appointments should contain a reference to the main
schedule PK. I see no reason not to place actual rows in the appointment
table.
That way, like you do in Outlook, if you decide to edit a particular
appointment, you can edit the entire series or edit the specific item.
If you edit the specific item, it's no longer bound to the main
cecurring appointment.
David Gugick
Imceda Software
www.imceda.com|||>> I want to give the user the option to edit a recurrent event and
adding a recurrent column would give me this capability. <<
Well, not quite. Your Monday appointment just got bumped for
President's Day today! I would first build a Calendar table for the
next ten years or so, with all the holidays, etc.
Next, I would use one row per client appointment as you have proposed.
Inserting the appointments is a front end problem; modeling them is a
database problem.
The front end consults the calendar table to get a set of possible
dates for the recurring appointment, then consults the Appointments
table to see if there is an open slot. I would number the
appointments in a series and keep that data in a client table ( "Mr.
Celko needs 8 appointments, as close to each Monday as we can make
them").|||Thanks for the replys.
I'm not sure i's quite clear yet..But let me reiterate my problem with
more details:
The schedule table I write to contains events (which are availabilities
not appointments (not that it matters..but it gives a more indepth look
at the problem)..Based on these availabilities, users can make
appointments...But the appointments in this case are not important to
me. It's an event that occurs one time(very restrictive, no recureence
or anything like that.)
So I am not sure I understand your advice: Should a date be created for
every availability event? and this availability would contain a
recurrenceID which would allow it to be flagged as a recurrent item, and
then you would be able to edit a particular event within this
recurrence.?!..
If you look at Microsoft Outlook (or even MSN Calendar), when you create
a recurring appointment, you have the possibility of selecting "No end",
which means that this event has no end...And then it creates it in snap,
and the event recurrs indefinitely..I am certain that MS doesn't write a
row for every date the appointment is recurred.
If i understand your suggestions, you did say that a date should be
created for every event(So if i have an availability that recurrs
Mon,Tue,Wed for 4 motnhs, there would be approx 50 entries). But I'm
thinking about
having one row created per recurring event per day like so:
Columns:
ScheduleID (ID)
FromDate
ToDate
FromTime
ToTime
Day(int)
Ends(bool)
Recurrent(bool)
RecurrenceID
So for a the same example above, i would have 3 entries(Mon,Tue,Wedn)
with the start and end dates.
The problem with this design is that I still have an issue with editing
on item of the recurrence..
*** Sent via Developersdex http://www.examnotes.net ***
Don't just participate in USENET...get rewarded for it!

schedule dbcc indexdefrag every Saturday?

How can I set up SQL Server to defragment all indexes on a wly basis, e.g
.
every saturday?Schedule through SQL Agent job(s).
You can iterate through the indexes in the system catalog tables/views and
loop through to fire off the defrag, if you do not want to set it up
individuallly.
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
***************************
Think Outside the Box!
***************************
"Mike" wrote:

> How can I set up SQL Server to defragment all indexes on a wly basis, e
.g.
> every saturday?|||Or use the code already written for us, which also doesn't defrag if the ind
ex isn't fragmented in
the first place. Code found in Books Online, DBCC SHOWCONTIG.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Cowboy (Gregory A. Beamer) - MVP" <NoSpamMgbworld@.comcast.netNoSpamM> wrote
in message
news:9B1D603C-F198-4977-A6DC-4203CC13AA5E@.microsoft.com...
> Schedule through SQL Agent job(s).
> You can iterate through the indexes in the system catalog tables/views and
> loop through to fire off the defrag, if you do not want to set it up
> individuallly.
> --
> Gregory A. Beamer
> MVP; MCP: +I, SE, SD, DBA
> ***************************
> Think Outside the Box!
> ***************************
>
> "Mike" wrote:
>|||There you go encouraging the use of cursor based progarmming. ;-)
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:uu$Y1qujFHA.3316@.TK2MSFTNGP14.phx.gbl...
> Or use the code already written for us, which also doesn't defrag if the
> index isn't fragmented in the first place. Code found in Books Online,
> DBCC SHOWCONTIG.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "Cowboy (Gregory A. Beamer) - MVP" <NoSpamMgbworld@.comcast.netNoSpamM>
> wrote in message
> news:9B1D603C-F198-4977-A6DC-4203CC13AA5E@.microsoft.com...
>|||LOL. Do you have a set based approach? ;-)
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"JT" <someone@.microsoft.com> wrote in message news:ubRC11vjFHA.3336@.tk2msftngp13.phx.gbl...

> There you go encouraging the use of cursor based progarmming. ;-)
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote i
n
> message news:uu$Y1qujFHA.3316@.TK2MSFTNGP14.phx.gbl...
>|||Below is an example of how some people iterate through a temporary table. It
doesn't run any faster, but at least they have the satisfaction of knowing
they didn't use a cursor. I was once on a project where the lead developer
actually wanted to re-write avoer 20 cursor based stored procedures like so.
Fortunately, management pulled the plug on the project, and I was able to
move on to more meaningful work.
CREATE #temptable
(
id int NOT NULL IDENTITY (1, 1),
. . .
)
. . .
select @.id = select min(id) from #temptable
select @.MAXID = select max(id) from #temptable
WHILE @.id <= @.MAXID
BEGIN
. . .
select @.id = @.id + 1
END
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:%23ARjZ63jFHA.1504@.TK2MSFTNGP10.phx.gbl...
> LOL. Do you have a set based approach? ;-)
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "JT" <someone@.microsoft.com> wrote in message
> news:ubRC11vjFHA.3336@.tk2msftngp13.phx.gbl...|||Yes, I have used that technique in version 4.2 (or was it 1.1?), before serv
er side cursors was
introduced. I think the term cursors is misinterpreted/misused, hence the ex
ample you mention
("re-do these cursors to another procedural technique"). I'm glad you didn't
have to do that
conversion... Personally, I prefer a cursor to the looping of temp table app
roach, I find cursor
code more readable. ... In cases like maint scripts, for instance.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"JT" <someone@.microsoft.com> wrote in message news:uLNefYRkFHA.1204@.TK2MSFTNGP12.phx.gbl...

> Below is an example of how some people iterate through a temporary table.
It doesn't run any
> faster, but at least they have the satisfaction of knowing they didn't use
a cursor. I was once on
> a project where the lead developer actually wanted to re-write avoer 20 cu
rsor based stored
> procedures like so. Fortunately, management pulled the plug on the project
, and I was able to move
> on to more meaningful work.
> CREATE #temptable
> (
> id int NOT NULL IDENTITY (1, 1),
> . . .
> )
> . . .
> select @.id = select min(id) from #temptable
> select @.MAXID = select max(id) from #temptable
> WHILE @.id <= @.MAXID
> BEGIN
> . . .
> select @.id = @.id + 1
> END
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote i
n message
> news:%23ARjZ63jFHA.1504@.TK2MSFTNGP10.phx.gbl...
>|||Yes, I agree on all points. The cursor is just SQL Server's standardized
implementation of looping through a temporary resultset. The only time I use
cursors is for excuting a procdure against a small number of rows, and the
cursor at least makes things more maintainable. By getting familiar with the
various cursor options (like FAST_FORWORD argument) and using common sense,
a developer can use cursors without it becomming a bottleneck.
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:uv2k3lRkFHA.3148@.TK2MSFTNGP09.phx.gbl...
> Yes, I have used that technique in version 4.2 (or was it 1.1?), before
> server side cursors was introduced. I think the term cursors is
> misinterpreted/misused, hence the example you mention ("re-do these
> cursors to another procedural technique"). I'm glad you didn't have to do
> that conversion... Personally, I prefer a cursor to the looping of temp
> table approach, I find cursor code more readable. ... In cases like maint
> scripts, for instance.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "JT" <someone@.microsoft.com> wrote in message
> news:uLNefYRkFHA.1204@.TK2MSFTNGP12.phx.gbl...
>