Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Vanishing data and date of database

6 posts in General Discussion Last posting was on 2008-07-04 12:44:18.0Z
Loya Posted on 2008-06-20 21:10:33.0Z
Reply-To: "Loya" <lkelso@isprit.com>
From: "Loya" <lkelso@isprit.com>
Newsgroups: ianywhere.public.general
Subject: Vanishing data and date of database
Lines: 28
Organization: Isprit
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <485c1cc9$1@forums-1-dub>
Date: 20 Jun 2008 14:10:33 -0700
X-Trace: forums-1-dub 1213996233 10.22.241.152 (20 Jun 2008 14:10:33 -0700)
X-Original-Trace: 20 Jun 2008 14:10:33 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:6928
Article PK: 5154

Hi,
We are having some weird issues with our database and I don't know where to
start to trouble-shoot

A prescription was written to a patient record and printed (it can't be
printed without adding it to the patient record). Anyway, when they went
back into the record two days later, it was not there. They still have the
printed prescription, so we can rule out accidently putting the script on
the wrong patient. I've used Sybase Central to see if there was a record
written that maybe had some problems. Can you give me any ideas?

Also I wonder if this relates:

When you look at the database name in Explore the date shows 6/15, yet when
I run queries against the database I can get dates of today (6/20), also the
log file shows 6/20. When I run queries in Sybase Central, I get
transaction dates of 6/16 through 6/20.

We are using the database version 9.0.2 in a client/server mode, with no
replication or syncing.

Keep in mind when you respond that I am not a developer : - )

Thanks,
Loya


Breck Carter [sqlanywhere.blogspot.com] Posted on 2008-06-23 09:27:47.0Z
From: "Breck Carter [sqlanywhere.blogspot.com]" <NOSPAM__breck.carter@gmail.com>
Newsgroups: ianywhere.public.general
Subject: Re: Vanishing data and date of database
Organization: RisingRoad Professional Services
Reply-To: NOSPAM__breck.carter@gmail.com
Message-ID: <vopu54psej0ika03hoj4j4kga2resor6ms@4ax.com>
References: <485c1cc9$1@forums-1-dub>
X-Newsreader: Forte Agent 2.0/32.640
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Date: 23 Jun 2008 02:27:47 -0700
X-Trace: forums-1-dub 1214213267 10.22.241.152 (23 Jun 2008 02:27:47 -0700)
X-Original-Trace: 23 Jun 2008 02:27:47 -0700, vip152.sybase.com
Lines: 81
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:6929
Article PK: 5155

You have one very serious problem and one non-issue.

The non-issue is the Explorer file date for the database: If the
database engine (dbeng9.exe or dbsrv9.exe) stays running, it does
*not* change the date on the database file every time anything is
changed *inside* the database. So, it is very common for the file date
to get old.

You may not call yourself a developer, but you have provided quite a
bit of developer-style information so I'm just gonna plunge in:

One possibility is a flaw in the application design and/or program
code, where the application lets the user *think* the insert/update
has been committed (by printing the prescription) when it hasn't (the
program has not issued a COMMIT), and then for some reason the
application never commits: Because no COMMIT was coded, because the
application did not execute the code containing the COMMIT, or the
application stopped running before the COMMIT was executed... and so
on (fill in more wild speculation here :)

I am assuming this is a rare symptom, rather than something that is
plaguing you on every or most or even many prescriptions.

I am also assuming you do not have access to the authors of the
application: if you do, that is where to start.

Another (unlikely) possibility is the database file was restored from
a backup, where the backup was taken before the prescription was
written, and restored afterwards. The act of "restore" is quite simple
with SQL Anywhere, just stop the engine, copy the file, start the
engine. This is unlikely because that activity would change the file
date, and you say that ain't happening.

FWIW SQL Anywhere does not lose updates... real database management
systems (like SQL Anywhere, unlike MySQL) are designed from the ground
up to to preserve and protect your data. If what you describe was a
bug in SQL Anywhere, all us peasants would storm the castle and burn
it to the ground :)

Your best bet may be to call tech support, so you can have a live
conversation with someone about your symptom:
http://www.sybase.com/ianywhere/services-support

Breck

On 20 Jun 2008 14:10:33 -0700, "Loya" <lkelso@isprit.com> wrote:

>Hi,
>We are having some weird issues with our database and I don't know where to
>start to trouble-shoot
>
>A prescription was written to a patient record and printed (it can't be
>printed without adding it to the patient record). Anyway, when they went
>back into the record two days later, it was not there. They still have the
>printed prescription, so we can rule out accidently putting the script on
>the wrong patient. I've used Sybase Central to see if there was a record
>written that maybe had some problems. Can you give me any ideas?
>
>Also I wonder if this relates:
>
>When you look at the database name in Explore the date shows 6/15, yet when
>I run queries against the database I can get dates of today (6/20), also the
>log file shows 6/20. When I run queries in Sybase Central, I get
>transaction dates of 6/16 through 6/20.
>
>We are using the database version 9.0.2 in a client/server mode, with no
>replication or syncing.
>
>Keep in mind when you respond that I am not a developer : - )
>
>Thanks,
>Loya
>
>

--
Breck Carter http://sqlanywhere.blogspot.com/

RisingRoad SQL Anywhere and MobiLink Professional Services
breck.carter@risingroad.com


Loya Posted on 2008-06-23 11:01:57.0Z
Reply-To: "Loya" <lkelso@isprit.com>
From: "Loya" <lkelso@isprit.com>
Newsgroups: ianywhere.public.general
References: <485c1cc9$1@forums-1-dub> <vopu54psej0ika03hoj4j4kga2resor6ms@4ax.com>
Subject: Re: Vanishing data and date of database
Lines: 95
Organization: Isprit
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <485f82a5@forums-1-dub>
Date: 23 Jun 2008 04:01:57 -0700
X-Trace: forums-1-dub 1214218917 10.22.241.152 (23 Jun 2008 04:01:57 -0700)
X-Original-Trace: 23 Jun 2008 04:01:57 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:6930
Article PK: 5156

Breck,
Thank you for your very thorough response. The commit makes sense, and
gives me a starting point.

Loya

"Breck Carter [sqlanywhere.blogspot.com]" <NOSPAM__breck.carter@gmail.com>

wrote in message news:vopu54psej0ika03hoj4j4kga2resor6ms@4ax.com...
> You have one very serious problem and one non-issue.
>
> The non-issue is the Explorer file date for the database: If the
> database engine (dbeng9.exe or dbsrv9.exe) stays running, it does
> *not* change the date on the database file every time anything is
> changed *inside* the database. So, it is very common for the file date
> to get old.
>
> You may not call yourself a developer, but you have provided quite a
> bit of developer-style information so I'm just gonna plunge in:
>
> One possibility is a flaw in the application design and/or program
> code, where the application lets the user *think* the insert/update
> has been committed (by printing the prescription) when it hasn't (the
> program has not issued a COMMIT), and then for some reason the
> application never commits: Because no COMMIT was coded, because the
> application did not execute the code containing the COMMIT, or the
> application stopped running before the COMMIT was executed... and so
> on (fill in more wild speculation here :)
>
> I am assuming this is a rare symptom, rather than something that is
> plaguing you on every or most or even many prescriptions.
>
> I am also assuming you do not have access to the authors of the
> application: if you do, that is where to start.
>
> Another (unlikely) possibility is the database file was restored from
> a backup, where the backup was taken before the prescription was
> written, and restored afterwards. The act of "restore" is quite simple
> with SQL Anywhere, just stop the engine, copy the file, start the
> engine. This is unlikely because that activity would change the file
> date, and you say that ain't happening.
>
> FWIW SQL Anywhere does not lose updates... real database management
> systems (like SQL Anywhere, unlike MySQL) are designed from the ground
> up to to preserve and protect your data. If what you describe was a
> bug in SQL Anywhere, all us peasants would storm the castle and burn
> it to the ground :)
>
> Your best bet may be to call tech support, so you can have a live
> conversation with someone about your symptom:
> http://www.sybase.com/ianywhere/services-support
>
> Breck
>
>
> On 20 Jun 2008 14:10:33 -0700, "Loya" <lkelso@isprit.com> wrote:
>
>>Hi,
>>We are having some weird issues with our database and I don't know where
>>to
>>start to trouble-shoot
>>
>>A prescription was written to a patient record and printed (it can't be
>>printed without adding it to the patient record). Anyway, when they went
>>back into the record two days later, it was not there. They still have
>>the
>>printed prescription, so we can rule out accidently putting the script on
>>the wrong patient. I've used Sybase Central to see if there was a record
>>written that maybe had some problems. Can you give me any ideas?
>>
>>Also I wonder if this relates:
>>
>>When you look at the database name in Explore the date shows 6/15, yet
>>when
>>I run queries against the database I can get dates of today (6/20), also
>>the
>>log file shows 6/20. When I run queries in Sybase Central, I get
>>transaction dates of 6/16 through 6/20.
>>
>>We are using the database version 9.0.2 in a client/server mode, with no
>>replication or syncing.
>>
>>Keep in mind when you respond that I am not a developer : - )
>>
>>Thanks,
>>Loya
>>
>>
>
> --
> Breck Carter http://sqlanywhere.blogspot.com/
>
> RisingRoad SQL Anywhere and MobiLink Professional Services
> breck.carter@risingroad.com


David Fishburn Posted on 2008-06-23 15:40:13.0Z
Newsgroups: ianywhere.public.general
Subject: Re: Vanishing data and date of database
From: David Fishburn <fishburn_spam_off@ianywhere.com>
References: <485c1cc9$1@forums-1-dub> <vopu54psej0ika03hoj4j4kga2resor6ms@4ax.com> <485f82a5@forums-1-dub>
Organization: iAnywhere Solutions
Message-ID: <Xns9AC676B727E58fishburnsybasecom@10.22.241.106>
User-Agent: Xnews/2005.10.18
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Date: 23 Jun 2008 08:40:13 -0700
X-Trace: forums-1-dub 1214235613 10.22.241.152 (23 Jun 2008 08:40:13 -0700)
X-Original-Trace: 23 Jun 2008 08:40:13 -0700, vip152.sybase.com
Lines: 41
X-Authenticated-User: techsupp
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:6931
Article PK: 5157

"Loya" <lkelso@isprit.com> wrote in news:485f82a5@forums-1-dub of
ianywhere.public.general:

L> Thank you for your very thorough response. The commit makes sense,
L> and gives me a starting point.

On that vein, you can run dbtran against the current database
transaction log to turn it into SQL statements.

Something like this (assuming the database server is not running):
dave.log

dbtran -a dave.log

Using the -a indicates to include ROLLED BACK transactions.

So if you open the dave.sql file generated and look for the
prescription #, you may also see that it was rolled back instead of
committed.

--
David Fishburn
Certified ASA Developer Version 8
iAnywhere Solutions - Sybase
Professional Services
Please only post to the newsgroup
Please ALWAYS include version and MORE importantly BUILD number with
EACH post (dbeng10 -v).

EBFs and Maintenance Releases
http://downloads.sybase.com/

Developer Community / Whitepapers
http://www.ianywhere.com/developer

Case-Express - to report bugs
http://case-express.sybase.com

CodeXchange - Free samples
http://ianywhere.codexchange.sybase.com/servlets/ProjectDocumentList


Loya Posted on 2008-07-03 14:49:55.0Z
Reply-To: "Loya" <lkelso@isprit.com>
From: "Loya" <lkelso@isprit.com>
Newsgroups: ianywhere.public.general
References: <485c1cc9$1@forums-1-dub> <vopu54psej0ika03hoj4j4kga2resor6ms@4ax.com> <485f82a5@forums-1-dub> <Xns9AC676B727E58fishburnsybasecom@10.22.241.106>
Subject: Re: Vanishing data and date of database
Lines: 61
Organization: Isprit
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <486ce713$1@forums-1-dub>
Date: 3 Jul 2008 07:49:55 -0700
X-Trace: forums-1-dub 1215096595 10.22.241.152 (3 Jul 2008 07:49:55 -0700)
X-Original-Trace: 3 Jul 2008 07:49:55 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:6953
Article PK: 5178

David,
Thanks for the tip. I've run the dbtran command and have my file. It looks
like some transactions are rolled back. But I am really not quit sure how
to interpret the results. Plus I couldn't find a way to get results in the
log file, only After a certain date. Where can I find more information about
that?

Plus I noticed that my database has auto-commit to off. I'd like to
understand more about that feature and how to decide whether to turn it on.
I'm wondering if that feature may have some impact on the rollback? So if
you can point me in the direction of more info about that too, it would be
great!

Thanks
Loya

"David Fishburn" <fishburn_spam_off@ianywhere.com> wrote in message
news:Xns9AC676B727E58fishburnsybasecom@10.22.241.106...
> "Loya" <lkelso@isprit.com> wrote in news:485f82a5@forums-1-dub of
> ianywhere.public.general:
>
> L> Thank you for your very thorough response. The commit makes sense,
> L> and gives me a starting point.
>
> On that vein, you can run dbtran against the current database
> transaction log to turn it into SQL statements.
>
> Something like this (assuming the database server is not running):
> dave.log
>
> dbtran -a dave.log
>
> Using the -a indicates to include ROLLED BACK transactions.
>
> So if you open the dave.sql file generated and look for the
> prescription #, you may also see that it was rolled back instead of
> committed.
>
> --
> David Fishburn
> Certified ASA Developer Version 8
> iAnywhere Solutions - Sybase
> Professional Services
> Please only post to the newsgroup
> Please ALWAYS include version and MORE importantly BUILD number with
> EACH post (dbeng10 -v).
>
> EBFs and Maintenance Releases
> http://downloads.sybase.com/
>
> Developer Community / Whitepapers
> http://www.ianywhere.com/developer
>
> Case-Express - to report bugs
> http://case-express.sybase.com
>
> CodeXchange - Free samples
> http://ianywhere.codexchange.sybase.com/servlets/ProjectDocumentList
>


David Fishburn Posted on 2008-07-04 12:44:18.0Z
Newsgroups: ianywhere.public.general
Subject: Re: Vanishing data and date of database
From: David Fishburn <fishburn_spam_off@ianywhere.com>
References: <485c1cc9$1@forums-1-dub> <vopu54psej0ika03hoj4j4kga2resor6ms@4ax.com> <485f82a5@forums-1-dub> <Xns9AC676B727E58fishburnsybasecom@10.22.241.106> <486ce713$1@forums-1-dub>
Organization: iAnywhere Solutions
Message-ID: <Xns9AD158E43D594fishburnsybasecom@10.22.241.106>
User-Agent: Xnews/2005.10.18
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Date: 4 Jul 2008 05:44:18 -0700
X-Trace: forums-1-dub 1215175458 10.22.241.152 (4 Jul 2008 05:44:18 -0700)
X-Original-Trace: 4 Jul 2008 05:44:18 -0700, vip152.sybase.com
Lines: 61
X-Authenticated-User: techsupp
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:6957
Article PK: 5183

"Loya" <lkelso@isprit.com> wrote in news:486ce713$1@forums-1-dub of
ianywhere.public.general:

L> Plus I couldn't find a way to get results in the log file, only
L> after a certain date.

Do it from Sybase Central, it is far easier that way when you need
advanced switches. It is listed under tools for the SA plugin.

L> Where can I find more information about that?

Always the Help file (9.0.2):

ASA Database Administration Guide
Database Administration Utilities
The Log Translation utility
Translating a transaction log using the dbtran command-
line utility



L> Plus I noticed that my database has auto-commit to off. I'd like to
L> understand more about that feature and how to decide whether to turn
L> it on. I'm wondering if that feature may have some impact on the
L> rollback?

I would never turn autocommit on (period)!

You need to find the location in your application where you are not
committing at an appropriate time. Given you know which tables are
involved, I would think that should allow you to narrow down your
applications code quite a bit.

There are also other tools, like request logging which can be enabled on
the server to help determine what your application is sending the
database server.

First step though, is for you to recreate the same problem when using
your application.

--
David Fishburn
Certified ASA Developer Version 8
iAnywhere Solutions - Sybase
Professional Services
Please only post to the newsgroup
Please ALWAYS include version and MORE importantly BUILD number with
EACH post (dbeng10 -v).

EBFs and Maintenance Releases
http://downloads.sybase.com/

Developer Community / Whitepapers
http://www.ianywhere.com/developer

Case-Express - to report bugs
http://case-express.sybase.com

CodeXchange - Free samples
http://ianywhere.codexchange.sybase.com/servlets/ProjectDocumentList