Showing posts with label group. Show all posts
Showing posts with label group. Show all posts

Friday, March 30, 2012

Job to Backup Log when Full

We have several servers with dozens of databases on each one. We have
elected to group our maintenance jobs so that all database backups are
consolidated into 4 separate jobs (alphabetically). We would like to backup
a log using our standard practices if it gets full. We don't want to call
the 'consolidated' job because if the db is the last alphabetically, it will
have to go through all of the preceeding dbs before it gets to that log. By
that time, I could have gotten up out of bed and backed up the log myself
We would like to be able to read the database name that triggered the alert
and have a job that backs up that log only. Where would I get that database
name? The alert has it, does it store it in a system table in msdb?
Thanks!
There is a group of Alert tokens that you can use...
For instance, you could create a job that has one step
Backup log [A-DBN] to disk = 'c:\[A-DBN].logbak'
When the job is called from an Alert, the token will be replaced (even in
the filename string... and the appropriate database log will be backed up...
But the job can not be run< except from an alert> , because that is the only
time the tokens will be replaced..
For a complete list of Alert tokens, go to Gert Drapers web site
http://www.sqldev.net/sqlagent/SQLAg...ns.htm#Example using TSQL
step
"Michelle" <michelle@.nospam.com> wrote in message
news:eDmu1PNIEHA.3664@.TK2MSFTNGP11.phx.gbl...
> We have several servers with dozens of databases on each one. We have
> elected to group our maintenance jobs so that all database backups are
> consolidated into 4 separate jobs (alphabetically). We would like to
backup
> a log using our standard practices if it gets full. We don't want to call
> the 'consolidated' job because if the db is the last alphabetically, it
will
> have to go through all of the preceeding dbs before it gets to that log.
By
> that time, I could have gotten up out of bed and backed up the log myself

> We would like to be able to read the database name that triggered the
alert
> and have a job that backs up that log only. Where would I get that
database
> name? The alert has it, does it store it in a system table in msdb?
> Thanks!
>
|||This is awesome. I set it up to test and am quite eager to deploy it to
production. Thank you very much.
"Wayne Snyder" <wsnyder@.computeredservices.com> wrote in message
news:eSpn43UIEHA.2744@.TK2MSFTNGP10.phx.gbl...
> There is a group of Alert tokens that you can use...
> For instance, you could create a job that has one step
> Backup log [A-DBN] to disk = 'c:\[A-DBN].logbak'
> When the job is called from an Alert, the token will be replaced (even in
> the filename string... and the appropriate database log will be backed
up...
> But the job can not be run< except from an alert> , because that is the
only[color=darkblue]
> time the tokens will be replaced..
> For a complete list of Alert tokens, go to Gert Drapers web site
> http://www.sqldev.net/sqlagent/SQLAg...ns.htm#Example using TSQL
> step
>
> "Michelle" <michelle@.nospam.com> wrote in message
> news:eDmu1PNIEHA.3664@.TK2MSFTNGP11.phx.gbl...
> backup
call[color=darkblue]
> will
> By
myself
>
> alert
> database
>

Job to Backup Log when Full

We have several servers with dozens of databases on each one. We have
elected to group our maintenance jobs so that all database backups are
consolidated into 4 separate jobs (alphabetically). We would like to backup
a log using our standard practices if it gets full. We don't want to call
the 'consolidated' job because if the db is the last alphabetically, it will
have to go through all of the preceeding dbs before it gets to that log. By
that time, I could have gotten up out of bed and backed up the log myself
We would like to be able to read the database name that triggered the alert
and have a job that backs up that log only. Where would I get that database
name? The alert has it, does it store it in a system table in msdb?
Thanks!There is a group of Alert tokens that you can use...
For instance, you could create a job that has one step
Backup log [A-DBN] to disk = 'c:\[A-DBN].logbak'
When the job is called from an Alert, the token will be replaced (even in
the filename string... and the appropriate database log will be backed up...
But the job can not be run< except from an alert> , because that is the only
time the tokens will be replaced..
For a complete list of Alert tokens, go to Gert Drapers web site
http://www.sqldev.net/sqlagent/SQLA...ens.htm#Example using TSQL
step
"Michelle" <michelle@.nospam.com> wrote in message
news:eDmu1PNIEHA.3664@.TK2MSFTNGP11.phx.gbl...
> We have several servers with dozens of databases on each one. We have
> elected to group our maintenance jobs so that all database backups are
> consolidated into 4 separate jobs (alphabetically). We would like to
backup
> a log using our standard practices if it gets full. We don't want to call
> the 'consolidated' job because if the db is the last alphabetically, it
will
> have to go through all of the preceeding dbs before it gets to that log.
By
> that time, I could have gotten up out of bed and backed up the log myself

> We would like to be able to read the database name that triggered the
alert
> and have a job that backs up that log only. Where would I get that
database
> name? The alert has it, does it store it in a system table in msdb?
> Thanks!
>|||This is awesome. I set it up to test and am quite eager to deploy it to
production. Thank you very much.
"Wayne Snyder" <wsnyder@.computeredservices.com> wrote in message
news:eSpn43UIEHA.2744@.TK2MSFTNGP10.phx.gbl...
> There is a group of Alert tokens that you can use...
> For instance, you could create a job that has one step
> Backup log [A-DBN] to disk = 'c:\[A-DBN].logbak'
> When the job is called from an Alert, the token will be replaced (even in
> the filename string... and the appropriate database log will be backed
up...
> But the job can not be run< except from an alert> , because that is the
only
> time the tokens will be replaced..
> For a complete list of Alert tokens, go to Gert Drapers web site
> http://www.sqldev.net/sqlagent/SQLA...ens.htm#Example using TSQL
> step
>
> "Michelle" <michelle@.nospam.com> wrote in message
> news:eDmu1PNIEHA.3664@.TK2MSFTNGP11.phx.gbl...
> backup
call
> will
> By
myself
>
> alert
> database
>

Job to Backup Log when Full

We have several servers with dozens of databases on each one. We have
elected to group our maintenance jobs so that all database backups are
consolidated into 4 separate jobs (alphabetically). We would like to backup
a log using our standard practices if it gets full. We don't want to call
the 'consolidated' job because if the db is the last alphabetically, it will
have to go through all of the preceeding dbs before it gets to that log. By
that time, I could have gotten up out of bed and backed up the log myself :)
We would like to be able to read the database name that triggered the alert
and have a job that backs up that log only. Where would I get that database
name? The alert has it, does it store it in a system table in msdb?
Thanks!There is a group of Alert tokens that you can use...
For instance, you could create a job that has one step
Backup log [A-DBN] to disk = 'c:\[A-DBN].logbak'
When the job is called from an Alert, the token will be replaced (even in
the filename string... and the appropriate database log will be backed up...
But the job can not be run< except from an alert> , because that is the only
time the tokens will be replaced..
For a complete list of Alert tokens, go to Gert Drapers web site
http://www.sqldev.net/sqlagent/SQLAgentStepTokens.htm#Example using TSQL
step
"Michelle" <michelle@.nospam.com> wrote in message
news:eDmu1PNIEHA.3664@.TK2MSFTNGP11.phx.gbl...
> We have several servers with dozens of databases on each one. We have
> elected to group our maintenance jobs so that all database backups are
> consolidated into 4 separate jobs (alphabetically). We would like to
backup
> a log using our standard practices if it gets full. We don't want to call
> the 'consolidated' job because if the db is the last alphabetically, it
will
> have to go through all of the preceeding dbs before it gets to that log.
By
> that time, I could have gotten up out of bed and backed up the log myself
:)
> We would like to be able to read the database name that triggered the
alert
> and have a job that backs up that log only. Where would I get that
database
> name? The alert has it, does it store it in a system table in msdb?
> Thanks!
>|||This is awesome. I set it up to test and am quite eager to deploy it to
production. Thank you very much.
"Wayne Snyder" <wsnyder@.computeredservices.com> wrote in message
news:eSpn43UIEHA.2744@.TK2MSFTNGP10.phx.gbl...
> There is a group of Alert tokens that you can use...
> For instance, you could create a job that has one step
> Backup log [A-DBN] to disk = 'c:\[A-DBN].logbak'
> When the job is called from an Alert, the token will be replaced (even in
> the filename string... and the appropriate database log will be backed
up...
> But the job can not be run< except from an alert> , because that is the
only
> time the tokens will be replaced..
> For a complete list of Alert tokens, go to Gert Drapers web site
> http://www.sqldev.net/sqlagent/SQLAgentStepTokens.htm#Example using TSQL
> step
>
> "Michelle" <michelle@.nospam.com> wrote in message
> news:eDmu1PNIEHA.3664@.TK2MSFTNGP11.phx.gbl...
> > We have several servers with dozens of databases on each one. We have
> > elected to group our maintenance jobs so that all database backups are
> > consolidated into 4 separate jobs (alphabetically). We would like to
> backup
> > a log using our standard practices if it gets full. We don't want to
call
> > the 'consolidated' job because if the db is the last alphabetically, it
> will
> > have to go through all of the preceeding dbs before it gets to that log.
> By
> > that time, I could have gotten up out of bed and backed up the log
myself
> :)
> > We would like to be able to read the database name that triggered the
> alert
> > and have a job that backs up that log only. Where would I get that
> database
> > name? The alert has it, does it store it in a system table in msdb?
> >
> > Thanks!
> >
> >
>

Job that runs past the next scheduled start time

Hello group
I have a problem that I'm considering if the SQL Server Agent and Job
scheduling can help me solve.
I need to check some status very often (approximately every 30. sec.). I
have learned that you can get the job sceduling to start this often, so that
should not be a problem.
Normaly the job will just check this status and then stop.
Once in a while the status will signal that further processing should take
place. This processing may last more than 30 seconds, and therefore last
beyond the next start time of the job.
Is this a problem?
Will I have the same job running multiple times? That is not good.
When will the next job then start? Will it start 30 sec. after the long
running job completed, or will jobs queue op while the long running job is
processing so that I will get multiple starts when the first job completes?
I hope that you can understand my issue.
Regards
Anders> Will I have the same job running multiple times?
No. Agent is simple in this regard. If the job is already running when it is supposed to start, then
Agent will *not* start another instance of that job.
> When will the next job then start? Will it start 30 sec. after the long running job completed, or
> will jobs queue op while the long running job is processing so that I will get multiple starts
> when the first job completes?
Neither. It will start when it is supposed to. Say for simplicity of this example that you want to
start it every minute. Now, you have one occasion where it starts at 13:00:00 and it runs for 110
seconds. The job will not start at 13:01:00 since it is already running. As I said, this occasion
takes 110 seconds so it finishes at 13:01:50. Next time it is supposed to start is 13:02:00, and now
it isn't running so Agent will start it.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Anders K. Olsen" <akol_dk@.hotmail.com> wrote in message
news:OM4PQuc%23HHA.700@.TK2MSFTNGP05.phx.gbl...
> Hello group
> I have a problem that I'm considering if the SQL Server Agent and Job scheduling can help me
> solve.
> I need to check some status very often (approximately every 30. sec.). I have learned that you can
> get the job sceduling to start this often, so that should not be a problem.
> Normaly the job will just check this status and then stop.
> Once in a while the status will signal that further processing should take place. This processing
> may last more than 30 seconds, and therefore last beyond the next start time of the job.
> Is this a problem?
> Will I have the same job running multiple times? That is not good.
> When will the next job then start? Will it start 30 sec. after the long running job completed, or
> will jobs queue op while the long running job is processing so that I will get multiple starts
> when the first job completes?
> I hope that you can understand my issue.
> Regards
> Anders
>|||Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:%23GdwCgd%23HHA.1208@.TK2MSFTNGP03.phx.gbl...
>> Will I have the same job running multiple times?
> No. Agent is simple in this regard. If the job is already running when it
> is supposed to start, then Agent will *not* start another instance of that
> job.
Sometimes simple is good :-)
>> When will the next job then start? Will it start 30 sec. after the long
>> running job completed, or will jobs queue op while the long running job
>> is processing so that I will get multiple starts when the first job
>> completes?
> Neither. It will start when it is supposed to. Say for simplicity of this
> example that you want to start it every minute. Now, you have one occasion
> where it starts at 13:00:00 and it runs for 110 seconds. The job will not
> start at 13:01:00 since it is already running. As I said, this occasion
> takes 110 seconds so it finishes at 13:01:50. Next time it is supposed to
> start is 13:02:00, and now it isn't running so Agent will start it.
This is fine for our purposes, so we will continue along this line.
Thank you for your help.
Regards
Anderssql

Friday, February 24, 2012

jdbc permissions

seems precious few answers in the jdbc group...
as I'm trying to connect Tomcat 5 to MSDE, according to the help system, I
have to give the jdbc driver some read/write perms, but as the java is
actually a servlet, there is no codebase being used.
Anyone got any ideas on where I can set the permissions?Make sure you give sql permissions to the sql user you are
using in your servlet to connect to sql server. There is
no concept of giving read/write permissions to a jdbc
driver.
Let us know if you need more clarification on this or how
to do it.
hth.
>--Original Message--
>seems precious few answers in the jdbc group...
>as I'm trying to connect Tomcat 5 to MSDE, according to
the help system, I
>have to give the jdbc driver some read/write perms, but
as the java is
>actually a servlet, there is no codebase being used.
>Anyone got any ideas on where I can set the permissions?
>.
>|||<anonymous@.discussions.microsoft.com> wrote in news:1493501c3fa41
$8cbdc0d0$a301280a@.phx.gbl:
well, this is the page from the helpfile thats caused me to ask:
''
Using the SQL Server 2000 Driver for JDBC on a Java 2 Platform
----
--
When using the SQL Server 2000 Driver for JDBC on a Java 2 Platform with
the standard security manager enabled, you must give the driver some
additional permissions. Refer to your Java 2 Platform documentation for
more information about the Java 2 Platform security model and
permissions.
You can run an application on a Java 2 Platform with the standard
security manager using:
"java -Djava.security.manager application_class_name"
where application_class_name is the class name of the application.
Web browser applets running in the Java 2 plug-in are always running in a
Java Virtual Machine with the standard security manager enabled. To
enable the necessary permissions, you must add them to the security
policy file of the Java 2 Platform. This security policy file can be
found in the jre/lib/security subdirectory of the Java 2 Platform
installation directory.
To use JDBC data sources, all code bases must have the following
permissions:
// permissions granted to all domains
grant {
// DataSource access
permission java.util.PropertyPermission "java.naming.*", "read,write";
// Adjust the server host specification for your environment
permission java.net.SocketPermission "*.microsoft.com:0-65535",
"connect";
};
To use insensitive scrollable cursors, and perform client-side sorting of
some DatabaseMetaData ResultSets, all code bases must have access to
temporary files. If access to temporary files is not available, the
driver may throw an exception indicating that it is unable to set up a
static cursor cache.
For JDK 1.1 environments, access to "current working directory" must be
granted.
For Java 2 environments, access to the temporary directory specified by
the VM configuration must be granted.
The following is an example of permissions being granted for the C:\TEMP
directory:
// permissions granted to all domains
grant {
// Permission to create and delete temporary files.
// Adjust the temporary directory for your environment.
permission java.io.FilePermission "C:\\TEMP\\-", "read,write,delete";
};
'''
> Make sure you give sql permissions to the sql user you are
> using in your servlet to connect to sql server. There is
> no concept of giving read/write permissions to a jdbc
> driver.
> Let us know if you need more clarification on this or how
> to do it.
>
via the tomcat log, its failing to load the jdbc driver, but whether its
authentication or unable to find the driver, I'm not sure
> hth.
>>--Original Message--
>>seems precious few answers in the jdbc group...
>>as I'm trying to connect Tomcat 5 to MSDE, according to
> the help system, I
>>have to give the jdbc driver some read/write perms, but
> as the java is
>>actually a servlet, there is no codebase being used.
>>Anyone got any ideas on where I can set the permissions?
>>.
>|||I apologige for it. There is nothing special you need to
do on sql server side. I will post more if I can find more
information on this.
Thanks.
>--Original Message--
><anonymous@.discussions.microsoft.com> wrote in
news:1493501c3fa41
>$8cbdc0d0$a301280a@.phx.gbl:
>well, this is the page from the helpfile thats caused me
to ask:
>''
>Using the SQL Server 2000 Driver for JDBC on a Java 2
Platform
>----
--
>--
>When using the SQL Server 2000 Driver for JDBC on a Java
2 Platform with
>the standard security manager enabled, you must give the
driver some
>additional permissions. Refer to your Java 2 Platform
documentation for
>more information about the Java 2 Platform security model
and
>permissions.
>You can run an application on a Java 2 Platform with the
standard
>security manager using:
>"java -Djava.security.manager application_class_name"
>where application_class_name is the class name of the
application.
>Web browser applets running in the Java 2 plug-in are
always running in a
>Java Virtual Machine with the standard security manager
enabled. To
>enable the necessary permissions, you must add them to
the security
>policy file of the Java 2 Platform. This security policy
file can be
>found in the jre/lib/security subdirectory of the Java 2
Platform
>installation directory.
>To use JDBC data sources, all code bases must have the
following
>permissions:
>// permissions granted to all domains
>grant {
>// DataSource access
>permission
java.util.PropertyPermission "java.naming.*", "read,write";
>// Adjust the server host specification for your
environment
>permission java.net.SocketPermission "*.microsoft.com:0-
65535",
>"connect";
>};
>To use insensitive scrollable cursors, and perform client-
side sorting of
>some DatabaseMetaData ResultSets, all code bases must
have access to
>temporary files. If access to temporary files is not
available, the
>driver may throw an exception indicating that it is
unable to set up a
>static cursor cache.
>For JDK 1.1 environments, access to "current working
directory" must be
>granted.
>For Java 2 environments, access to the temporary
directory specified by
>the VM configuration must be granted.
>The following is an example of permissions being granted
for the C:\TEMP
>directory:
>// permissions granted to all domains
>grant {
>// Permission to create and delete temporary files.
>// Adjust the temporary directory for your environment.
>permission java.io.FilePermission "C:\\TEMP\\-
", "read,write,delete";
>};
>'''
>
>
>
>> Make sure you give sql permissions to the sql user you
are
>> using in your servlet to connect to sql server. There
is
>> no concept of giving read/write permissions to a jdbc
>> driver.
>> Let us know if you need more clarification on this or
how
>> to do it.
>via the tomcat log, its failing to load the jdbc driver,
but whether its
>authentication or unable to find the driver, I'm not sure
>
>> hth.
>>--Original Message--
>>seems precious few answers in the jdbc group...
>>as I'm trying to connect Tomcat 5 to MSDE, according to
>> the help system, I
>>have to give the jdbc driver some read/write perms, but
>> as the java is
>>actually a servlet, there is no codebase being used.
>>Anyone got any ideas on where I can set the permissions?
>>.
>>
>.
>