Showing posts with label sybase. Show all posts
Showing posts with label sybase. Show all posts

Wednesday, March 21, 2012

dumptrdate column gone in sql server 2000?

Hello,
I am running an environment that has Sybase and SQL Server 2000, and i've
been using the dumptrdate column from sysdatabases on all SYbase servers, but
it appears that it has been replaced by a Reserved column. Is there an
alternative to this in SQL server? I want to be able to query the database
from command line and see the last transaction log backup time. Viewing it in
taskpad works great, but i really need it in a command line. Any help is
greatly apprciated.
Thanks!
FS
Thanks, i'll give this a try.
"Tibor Karaszi" wrote:

> How about the backup history tables in msdb?
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "FS" <FS@.discussions.microsoft.com> wrote in message
> news:6C600A7F-1076-4603-8517-3EBA33DC518D@.microsoft.com...
>
|||That worked, thanks.
Do you know how to modify the query to give me the last entry only?
so i have 9 databases that i want to generate a report for to list the last
transaction log dump. I tried putting a "where backup_start_date >= '<date
time>'
is there a better way?
"FS" wrote:
[vbcol=seagreen]
> Thanks, i'll give this a try.
>
> "Tibor Karaszi" wrote:
|||That first select statement worked perfectly. Thank you!
"Tibor Karaszi" wrote:

> Here are a couple of options, depending on how much information you need:
> SELECT database_name, MAX(backup_start_date)
> FROM dbo.backupset
> GROUP BY database_name
> SELECT b1.database_name, *
> FROM dbo.backupset AS b1
> INNER JOIN(
> SELECT database_name, MAX(backup_start_date) AS max_date
> FROM dbo.backupset
> WHERE type = 'L'
> GROUP BY database_name
> ) AS b2
> ON b1.database_name = b2.database_name
> AND b1.backup_start_date = b2.max_date
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "FS" <FS@.discussions.microsoft.com> wrote in message
> news:AEBE819C-493A-4556-AF29-83505FF135E3@.microsoft.com...
>

dumptrdate column gone in sql server 2000?

Hello,
I am running an environment that has Sybase and SQL Server 2000, and i've
been using the dumptrdate column from sysdatabases on all SYbase servers, but
it appears that it has been replaced by a Reserved column. Is there an
alternative to this in SQL server? I want to be able to query the database
from command line and see the last transaction log backup time. Viewing it in
taskpad works great, but i really need it in a command line. Any help is
greatly apprciated.
Thanks!
FSHow about the backup history tables in msdb?
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"FS" <FS@.discussions.microsoft.com> wrote in message
news:6C600A7F-1076-4603-8517-3EBA33DC518D@.microsoft.com...
> Hello,
> I am running an environment that has Sybase and SQL Server 2000, and i've
> been using the dumptrdate column from sysdatabases on all SYbase servers, but
> it appears that it has been replaced by a Reserved column. Is there an
> alternative to this in SQL server? I want to be able to query the database
> from command line and see the last transaction log backup time. Viewing it in
> taskpad works great, but i really need it in a command line. Any help is
> greatly apprciated.
> Thanks!
> FS|||Thanks, i'll give this a try.
"Tibor Karaszi" wrote:
> How about the backup history tables in msdb?
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "FS" <FS@.discussions.microsoft.com> wrote in message
> news:6C600A7F-1076-4603-8517-3EBA33DC518D@.microsoft.com...
> > Hello,
> >
> > I am running an environment that has Sybase and SQL Server 2000, and i've
> > been using the dumptrdate column from sysdatabases on all SYbase servers, but
> > it appears that it has been replaced by a Reserved column. Is there an
> > alternative to this in SQL server? I want to be able to query the database
> > from command line and see the last transaction log backup time. Viewing it in
> > taskpad works great, but i really need it in a command line. Any help is
> > greatly apprciated.
> >
> > Thanks!
> > FS
>|||That worked, thanks.
Do you know how to modify the query to give me the last entry only?
so i have 9 databases that i want to generate a report for to list the last
transaction log dump. I tried putting a "where backup_start_date >= '<date
time>'
is there a better way?
"FS" wrote:
> Thanks, i'll give this a try.
>
> "Tibor Karaszi" wrote:
> > How about the backup history tables in msdb?
> >
> > --
> > Tibor Karaszi, SQL Server MVP
> > http://www.karaszi.com/sqlserver/default.asp
> > http://sqlblog.com/blogs/tibor_karaszi
> >
> >
> > "FS" <FS@.discussions.microsoft.com> wrote in message
> > news:6C600A7F-1076-4603-8517-3EBA33DC518D@.microsoft.com...
> > > Hello,
> > >
> > > I am running an environment that has Sybase and SQL Server 2000, and i've
> > > been using the dumptrdate column from sysdatabases on all SYbase servers, but
> > > it appears that it has been replaced by a Reserved column. Is there an
> > > alternative to this in SQL server? I want to be able to query the database
> > > from command line and see the last transaction log backup time. Viewing it in
> > > taskpad works great, but i really need it in a command line. Any help is
> > > greatly apprciated.
> > >
> > > Thanks!
> > > FS
> >
> >|||Here are a couple of options, depending on how much information you need:
SELECT database_name, MAX(backup_start_date)
FROM dbo.backupset
GROUP BY database_name
SELECT b1.database_name, *
FROM dbo.backupset AS b1
INNER JOIN(
SELECT database_name, MAX(backup_start_date) AS max_date
FROM dbo.backupset
WHERE type = 'L'
GROUP BY database_name
) AS b2
ON b1.database_name = b2.database_name
AND b1.backup_start_date = b2.max_date
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"FS" <FS@.discussions.microsoft.com> wrote in message
news:AEBE819C-493A-4556-AF29-83505FF135E3@.microsoft.com...
> That worked, thanks.
> Do you know how to modify the query to give me the last entry only?
> so i have 9 databases that i want to generate a report for to list the last
> transaction log dump. I tried putting a "where backup_start_date >= '<date
> time>'
> is there a better way?
> "FS" wrote:
>> Thanks, i'll give this a try.
>>
>> "Tibor Karaszi" wrote:
>> > How about the backup history tables in msdb?
>> >
>> > --
>> > Tibor Karaszi, SQL Server MVP
>> > http://www.karaszi.com/sqlserver/default.asp
>> > http://sqlblog.com/blogs/tibor_karaszi
>> >
>> >
>> > "FS" <FS@.discussions.microsoft.com> wrote in message
>> > news:6C600A7F-1076-4603-8517-3EBA33DC518D@.microsoft.com...
>> > > Hello,
>> > >
>> > > I am running an environment that has Sybase and SQL Server 2000, and i've
>> > > been using the dumptrdate column from sysdatabases on all SYbase servers, but
>> > > it appears that it has been replaced by a Reserved column. Is there an
>> > > alternative to this in SQL server? I want to be able to query the database
>> > > from command line and see the last transaction log backup time. Viewing it in
>> > > taskpad works great, but i really need it in a command line. Any help is
>> > > greatly apprciated.
>> > >
>> > > Thanks!
>> > > FS
>> >
>> >|||That first select statement worked perfectly. Thank you!
"Tibor Karaszi" wrote:
> Here are a couple of options, depending on how much information you need:
> SELECT database_name, MAX(backup_start_date)
> FROM dbo.backupset
> GROUP BY database_name
> SELECT b1.database_name, *
> FROM dbo.backupset AS b1
> INNER JOIN(
> SELECT database_name, MAX(backup_start_date) AS max_date
> FROM dbo.backupset
> WHERE type = 'L'
> GROUP BY database_name
> ) AS b2
> ON b1.database_name = b2.database_name
> AND b1.backup_start_date = b2.max_date
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "FS" <FS@.discussions.microsoft.com> wrote in message
> news:AEBE819C-493A-4556-AF29-83505FF135E3@.microsoft.com...
> > That worked, thanks.
> > Do you know how to modify the query to give me the last entry only?
> > so i have 9 databases that i want to generate a report for to list the last
> > transaction log dump. I tried putting a "where backup_start_date >= '<date
> > time>'
> > is there a better way?
> >
> > "FS" wrote:
> >
> >> Thanks, i'll give this a try.
> >>
> >>
> >> "Tibor Karaszi" wrote:
> >>
> >> > How about the backup history tables in msdb?
> >> >
> >> > --
> >> > Tibor Karaszi, SQL Server MVP
> >> > http://www.karaszi.com/sqlserver/default.asp
> >> > http://sqlblog.com/blogs/tibor_karaszi
> >> >
> >> >
> >> > "FS" <FS@.discussions.microsoft.com> wrote in message
> >> > news:6C600A7F-1076-4603-8517-3EBA33DC518D@.microsoft.com...
> >> > > Hello,
> >> > >
> >> > > I am running an environment that has Sybase and SQL Server 2000, and i've
> >> > > been using the dumptrdate column from sysdatabases on all SYbase servers, but
> >> > > it appears that it has been replaced by a Reserved column. Is there an
> >> > > alternative to this in SQL server? I want to be able to query the database
> >> > > from command line and see the last transaction log backup time. Viewing it in
> >> > > taskpad works great, but i really need it in a command line. Any help is
> >> > > greatly apprciated.
> >> > >
> >> > > Thanks!
> >> > > FS
> >> >
> >> >
>

dumptrdate column gone in sql server 2000?

Hello,
I am running an environment that has Sybase and SQL Server 2000, and i've
been using the dumptrdate column from sysdatabases on all SYbase servers, bu
t
it appears that it has been replaced by a Reserved column. Is there an
alternative to this in SQL server? I want to be able to query the database
from command line and see the last transaction log backup time. Viewing it i
n
taskpad works great, but i really need it in a command line. Any help is
greatly apprciated.
Thanks!
FSHow about the backup history tables in msdb?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"FS" <FS@.discussions.microsoft.com> wrote in message
news:6C600A7F-1076-4603-8517-3EBA33DC518D@.microsoft.com...
> Hello,
> I am running an environment that has Sybase and SQL Server 2000, and i've
> been using the dumptrdate column from sysdatabases on all SYbase servers,
but
> it appears that it has been replaced by a Reserved column. Is there an
> alternative to this in SQL server? I want to be able to query the database
> from command line and see the last transaction log backup time. Viewing it
in
> taskpad works great, but i really need it in a command line. Any help is
> greatly apprciated.
> Thanks!
> FS|||Thanks, i'll give this a try.
"Tibor Karaszi" wrote:

> How about the backup history tables in msdb?
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "FS" <FS@.discussions.microsoft.com> wrote in message
> news:6C600A7F-1076-4603-8517-3EBA33DC518D@.microsoft.com...
>|||That worked, thanks.
Do you know how to modify the query to give me the last entry only?
so i have 9 databases that i want to generate a report for to list the last
transaction log dump. I tried putting a "where backup_start_date >= '<date
time>'
is there a better way?
"FS" wrote:
[vbcol=seagreen]
> Thanks, i'll give this a try.
>
> "Tibor Karaszi" wrote:
>|||Here are a couple of options, depending on how much information you need:
SELECT database_name, MAX(backup_start_date)
FROM dbo.backupset
GROUP BY database_name
SELECT b1.database_name, *
FROM dbo.backupset AS b1
INNER JOIN(
SELECT database_name, MAX(backup_start_date) AS max_date
FROM dbo.backupset
WHERE type = 'L'
GROUP BY database_name
) AS b2
ON b1.database_name = b2.database_name
AND b1.backup_start_date = b2.max_date
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"FS" <FS@.discussions.microsoft.com> wrote in message
news:AEBE819C-493A-4556-AF29-83505FF135E3@.microsoft.com...[vbcol=seagreen]
> That worked, thanks.
> Do you know how to modify the query to give me the last entry only?
> so i have 9 databases that i want to generate a report for to list the las
t
> transaction log dump. I tried putting a "where backup_start_date >= '<date
> time>'
> is there a better way?
> "FS" wrote:
>|||That first select statement worked perfectly. Thank you!
"Tibor Karaszi" wrote:

> Here are a couple of options, depending on how much information you need:
> SELECT database_name, MAX(backup_start_date)
> FROM dbo.backupset
> GROUP BY database_name
> SELECT b1.database_name, *
> FROM dbo.backupset AS b1
> INNER JOIN(
> SELECT database_name, MAX(backup_start_date) AS max_date
> FROM dbo.backupset
> WHERE type = 'L'
> GROUP BY database_name
> ) AS b2
> ON b1.database_name = b2.database_name
> AND b1.backup_start_date = b2.max_date
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "FS" <FS@.discussions.microsoft.com> wrote in message
> news:AEBE819C-493A-4556-AF29-83505FF135E3@.microsoft.com...
>

Sunday, February 26, 2012

DTS-Conection with sybase 12.5

Good day.I have dts running every 10 minutes in a server of slqserver 2000 who is in a country and that it sends data to another country which has a data base sybase12.5.The problem is when by reasons for the WAN the connection fails from a country to another one the dts or job fails executing its processes and I must soon give click to stop and start so that it continues. That I can do so that when the connection is lost and i need to dts reconected automatically and is continued its processing?
thanks and sorry my english :)The best answer that I've found for problems like this is to establish a "watchdog" job. The watchdog runs very frequently (possibly every minute) and checks for evidence of the main job being interrupted... If the watchdog finds that evidence, then the watchdog restarts the main job.

In your example, I would suggest that you create a simple table to maintain both a log of events and to allow detection of the main job failing. Add a step before the main job to insert a row showing the DATETIME that it started. Add a step after the main job completes to show that it ended. This effectively logs the activities of the main job.

Create a whole new watchdog job that logs its beginning and end exactly the same way as you just added to the main job, then checks to be sure that the last entry from the main job is either a "success" or a start that could still be reasonably running (in other words, that the end for this job isn't overdue yet). If the main job needs to be restarted, let the watchdog job start it, otherwise let the watchdog end gracefully.

You should periodically check the log table to see when the watchdog runs, and how often it needs to restart the main job. This can be useful information, and will often warn you of trouble before the trouble becomes critical.

-PatP