|
Home > Archive > SQL Anywhere Mobile > August 2005 > Synch no longer working ?????
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Synch no longer working ?????
|
|
|
| Hi,
The system was working fine with one table and one
publication.
Then I try to have another mobilink db with one publication
and multiple table. => It start giving all kind of error and
warning messge. ... such as:
W. 08/11 14:53:01. <1.5> [train1]: Warning: [10017] The
consolidated and remote databases have different timestamp
precisions. Consolidated database timestamps are precise to
2 digit(s) in the fractional second while the remote
database timestamps are precise to 6 digit(s)
W. 08/11 14:53:01. <1.5> [test1]: Warning: [10018] The
timestamp precision mismatch may be resolved by setting the
DEFAULT_TIMESTAMP_IN
CREMENT option on the remote database to
10000 and TRUNCATE_TIMESTAMP_V
ALUES to 'On'
After changing formation on local, the synch is still not
working and it start complaining about no script for
download or upload ....
W. .. Warning: [10056] There is no download data script
defined for table: State. Synchronization has the risk of
potentially losing download data.
ASE 12.5
ASA 901.2009
dbmlsrv9 -c "..." -k -o sever.txt -v+ -dl -za -zu+ -x tcpip
dbmlsync -c "...." -k -o t1.txt -v+ -e
"SendColumnNames=on"
Then I try to drop and create new remote db, new ml user,
new publication , new subscription. => the synch still does
not work ???
TIA,
Toni
| |
| Greg Fenton 2005-08-12, 8:25 pm |
| Toni wrote:
> W. 08/11 14:53:01. <1.5> [train1]: Warning: [10017] The
> consolidated and remote databases have different timestamp
> precisions. Consolidated database timestamps are precise to
> 2 digit(s) in the fractional second while the remote
> database timestamps are precise to 6 digit(s)
> W. 08/11 14:53:01. <1.5> [test1]: Warning: [10018] The
> timestamp precision mismatch may be resolved by setting the
> DEFAULT_TIMESTAMP_IN
CREMENT option on the remote database to
> 10000 and TRUNCATE_TIMESTAMP_V
ALUES to 'On'
These are warnings (notice the "W." at the start of the line) and would
NOT be the indication of why synchronization failed. Continue looking
though the "server.txt" file to find lines starting with "E.". Please
post that line and the 10 or so lines before and after the error as
these typically contain context information around the error.
BTW: Notice the information in the warnings above. They indicate that
your consolidated (ASE) has a less precise timestamp field than your
remotes (ASA) and you likely want to have both databases matching in
precision, otherwise data will be modified (truncated) during
synchronization.
>
> W. .. Warning: [10056] There is no download data script
> defined for table: State. Synchronization has the risk of
> potentially losing download data.
>
Again, a warning but not an error.
Feel free to post the entire "server.txt" after a failed synchronization
of one client. That will give us a much clearer picture of what is
happening.
greg.fenton
--
Greg Fenton
Consultant, Solution Services, iAnywhere Solutions
--------
Visit the iAnywhere Solutions Developer Community
Whitepapers, TechDocs, Downloads
http://www.ianywhere.com/developer/
| |
|
| Hi Greg,
I try to repeat the same senario today. The synch does not
work and give warning message on server.txt. Then I try to
modified option on remote db based on the message. Now I
can't connect to remote db any more.
server error:
I. 08/16 15:45:50. Adaptive Server Anywhere MobiLink Version
9.0.1.2009
W. 08/16 15:45:51. <Main>: Warning: Unknown users will be
added automatically (when there is no authenticate_user
script).
I. 08/16 15:45:51. <Main>: Warning: Example scripts may be
automatically generated and activated for unknown versions.
I. 08/16 15:45:51. <Main>: Local file for remote
synchronization logs: 'dbmlsrv.mle'
I. 08/16 15:45:51. <Main>: Stream specifier 1: tcpip
I. 08/16 15:45:51. <Main>: ODBC DBMS Name: SQL Server
I. 08/16 15:45:51. <Main>: ODBC DBMS Version: 12.50.0000
I. 08/16 15:45:51. <Main>: ODBC DBMS Driver Version:
04.20.0063 (B0061, U0057)
I. 08/16 15:45:51. <Main>: ODBC Version supported by the
driver: 3.52
I. 08/16 15:45:51. <Main>: ODBC isolation set to: Read
Committed
I. 08/16 15:45:51. <Main>: Connected
I. 08/16 15:45:51. <Main>: Translated SQL:
SELECT COUNT(*) FROM ml_scripts_modified
I. 08/16 15:45:51. <thread 1.1>: Ready to handle requests
I. 08/16 15:45:51. <thread 1.2>: Ready to handle requests
I. 08/16 15:45:51. <thread 1.3>: Ready to handle requests
I. 08/16 15:45:51. <thread 1.4>: Ready to handle requests
I. 08/16 15:45:51. <thread 1.5>: Ready to handle requests
I. 08/16 15:46:00. <thread 1.5>: Working on a request
I. 08/16 15:46:00. <thread 1.5>: Translated SQL:
SELECT last_modified FROM
ml_scripts_modified
I. 08/16 15:46:00. <thread 1.5>: ml_scripts_modified last
modified at: 2005-08-16 15:45:45.443
I. 08/16 15:46:00. <thread 1.5>: Translated SQL:
SELECT version_id FROM ml_script_version
WHERE name =3d ?
I. 08/16 15:46:00. <thread 1.5>: ASA synchronization request
from: mluser1 (version: ver1)
I. 08/16 15:46:00. <1.5> [mluser1]: ODBC isolation set to:
Read Committed
I. 08/16 15:46:00. <1.5> [mluser1]: Translated SQL:
SELECT t1.event, t2.script_language,
t2.script FROM ml_connection_script
t1, ml_script t2 WHERE
t1.version_id =3d ? AND t1.script_id =3d t2.script_id
I. 08/16 15:46:00. <1.5> [mluser1]: begin_connection
<connection> (no script)
I. 08/16 15:46:00. <1.5> [mluser1]: COMMIT Transaction:
begin_connection
I. 08/16 15:46:00. <1.5> [mluser1]: Translated SQL:
SELECT hashed_password FROM ml_user WHERE
name =3d ?
I. 08/16 15:46:00. <1.5> [mluser1]: User name 'mluser1' not
found in the ml_user table, inserting a new entry
I. 08/16 15:46:00. <1.5> [mluser1]: Cached ODBC statement:
SELECT hashed_password FROM ml_user WHERE
name =3d ?
I. 08/16 15:46:00. <1.5> [mluser1]: Translated SQL:
SELECT MAX( user_id ) + 1 FROM ml_user
I. 08/16 15:46:00. <1.5> [mluser1]: Translated SQL:
INSERT INTO ml_user
(user_id,name,commit
_state,hashed_passwo
rd) VALUES(?,?,?,?)
I. 08/16 15:46:00. <1.5> [mluser1]: Translated SQL:
SELECT user_id FROM ml_user WHERE name
=3d ?
W. 08/16 15:46:00. <1.5> [mluser1]: Warning: [10017] The
consolidated and remote databases have different timestamp
precisions. Consolidated database timestamps are precise to
2 digit(s) in the fractional second while the remote
database timestamps are precise to 6 digit(s)
W. 08/16 15:46:00. <1.5> [mluser1]: Warning: [10018] The
timestamp precision mismatch may be resolved by setting the
DEFAULT_TIMESTAMP_IN
CREMENT option on the remote database to
10000 and TRUNCATE_TIMESTAMP_V
ALUES to 'On'
W. 08/16 15:46:00. <1.5> [mluser1]: Warning: [10020] The
timestamp precision mismatch may affect upload conflict
detection. Use the -zp option to cause the MobiLink
synchronization server to use the lowest timestamp precision
for conflict detection purposes
I. 08/16 15:46:00. <1.5> [mluser1]: Publication #1:
Table1data, subscription id: 2, last download time:
1900-01-01 00:00:00.000000
I. 08/16 15:46:00. <1.5> [mluser1]: Table #1: Table1, 3
columns
I. 08/16 15:46:00. <1.5> [mluser1]: DbGroupName varchar(35)
NOT NULL PRIMARY KEY
I. 08/16 15:46:00. <1.5> [mluser1]: DisplayGroupName
varchar(35) NOT NULL
I. 08/16 15:46:00. <1.5> [mluser1]: grouplevel numeric(2,0)
I. 08/16 15:46:00. <1.5> [mluser1]: Translated SQL:
SELECT progress FROM ml_subscription
WHERE user_id =3d ? AND subscription_id =3d ?
I. 08/16 15:46:00. <1.5> [mluser1]: Progress offsets for the
publications that are explicitly involved in the current
synchronization
I. 08/16 15:46:00. <1.5> [mluser1]: Subscription id 2:
consolidated progress 0 and remote progress 2351280
I. 08/16 15:46:00. <1.5> [mluser1]: Translated SQL:
INSERT INTO ml_subscription
(user_id,subscriptio
n_id,publication_nam
e,last_download_time
)
VALUES(?,?,?,?)
I. 08/16 15:46:00. <1.5> [mluser1]: Translated SQL:
SELECT table_id FROM ml_table WHERE name
=3d ?
I. 08/16 15:46:00. <1.5> [mluser1]: begin_synchronizatio
n
<connection> (no script)
I. 08/16 15:46:00. <1.5> [mluser1]: Translated SQL:
SELECT t1.event, t2.script_language,
t2.script FROM ml_table_script t1, ml_script t2 WHERE
t1.table_id =3d ? AND t1.version_id =3d ? AND t1.script_id
=3d t2.script_id
I. 08/16 15:46:00. <1.5> [mluser1]: begin_synchronizatio
n
Table1 (no script)
I. 08/16 15:46:00. <1.5> [mluser1]: Translated SQL:
SELECT last_upload_time FROM
ml_subscription WHERE user_id =3d ? AND subscription_id =3d
?
I. 08/16 15:46:00. <1.5> [mluser1]: Last upload time for
subscription id 2: 1900-01-01 00:00:00.000000
I. 08/16 15:46:00. <1.5> [mluser1]: begin_publication
<connection> (no script)
I. 08/16 15:46:00. <1.5> [mluser1]: COMMIT Transaction:
begin_synchronizatio
n
I. 08/16 15:46:00. <1.5> [mluser1]: begin_upload
<connection> (no script)
I. 08/16 15:46:00. <1.5> [mluser1]: begin_upload Table1 (no
script)
I. 08/16 15:46:00. <1.5> [mluser1]: begin_upload_rows Table1
(no script)
I. 08/16 15:46:00. <1.5> [mluser1]: Translated SQL:
save tran it0
I. 08/16 15:46:00. <1.5> [mluser1]: end_upload_rows Table1
(no script)
I. 08/16 15:46:00. <1.5> [mluser1]: end_upload Table1 (no
script)
I. 08/16 15:46:00. <1.5> [mluser1]: end_upload <connection>
(no script)
I. 08/16 15:46:00. <1.5> [mluser1]: # rows uploaded into
table Table1 : 0
I. 08/16 15:46:00. <1.5> [mluser1]: # rows inserted into
table Table1 : 0
I. 08/16 15:46:00. <1.5> [mluser1]: # rows deleted in table
Table1 : 0
I. 08/16 15:46:00. <1.5> [mluser1]: # rows updated into
table Table1 : 0
I. 08/16 15:46:00. <1.5> [mluser1]: # rows conflicted in
table Table1 : 0
I. 08/16 15:46:00. <1.5> [mluser1]: # rows ignored in table
Table1 : 0
I. 08/16 15:46:00. <1.5> [mluser1]: Translated SQL:
UPDATE ml_subscription SET progress =3d
?, publication_name =3d ? WHERE user_id =3d ? AND
subscription_id =3d ?
I. 08/16 15:46:00. <1.5> [mluser1]: Translated SQL:
SELECT GETDATE()
I. 08/16 15:46:00. <1.5> [mluser1]: Translated SQL:
UPDATE ml_subscription SET
last_upload_time =3d ? WHERE user_id =3d ? AND
subscription_id =3d ?
I. 08/16 15:46:00. <1.5> [mluser1]: COMMIT Transaction:
end_upload
I. 08/16 15:46:00. <1.5> [mluser1]: Cached ODBC statement:
SELECT {FN NOW()}
I. 08/16 15:46:00. <1.5> [mluser1]: begin_download
<connection> (no script)
I. 08/16 15:46:00. <1.5> [mluser1]: begin_download Table1
(no script)
W. 08/16 15:46:00. <1.5> [mluser1]: Warning: [10056] There
is no download data script defined for table: Table1.
Synchronization has the risk of potentially losing download
data
I. 08/16 15:46:00. <1.5> [mluser1]: begin_download_delet
es
Table1 (no script)
I. 08/16 15:46:00. <1.5> [mluser1]: end_download_deletes
Table1 (no script)
I. 08/16 15:46:00. <1.5> [mluser1]: begin_download_rows
Table1 (no script)
I. 08/16 15:46:00. <1.5> [mluser1]: end_download_rows Table1
(no script)
I. 08/16 15:46:00. <1.5> [mluser1]: end_download Table1 (no
script)
I. 08/16 15:46:00. <1.5> [mluser1]: end_download
<connection> (no script)
I. 08/16 15:46:00. <1.5> [mluser1]: # rows downloaded for
delete from table Table1 : 0
I. 08/16 15:46:00. <1.5> [mluser1]: # rows downloaded for
insert/update from table Table1 : 0
I. 08/16 15:46:00. <1.5> [mluser1]: # rows filtered for
download from table Table1 : 0
I. 08/16 15:46:00. <1.5> [mluser1]: # rows downloaded to
remote from table Table1 : 0
I. 08/16 15:46:00. <1.5> [mluser1]: COMMIT Transaction:
end_download
I. 08/16 15:46:00. <1.5> [mluser1]: Sending the download to
the remote database.
I. 08/16 15:46:00. <1.5> [mluser1]: end_synchronization
Table1 (no script)
I. 08/16 15:46:00. <1.5> [mluser1]: end_synchronization
<connection> (no script)
I. 08/16 15:46:00. <1.5> [mluser1]: COMMIT Transaction:
end_synchronization
I. 08/16 15:46:00. <1.5> [mluser1]: Synchronization complete
I. 08/16 15:46:08. <Main>: MobiLink server shutting down
I. 08/16 15:46:08. <Main>: MobiLink server undergoing hard
shutdown.
I. 08/16 15:46:08. <Main>: All connections and
synchronizations being terminated.
I. 08/16 15:46:08. <thread 1.5>: Shutting down
I. 08/16 15:46:09. <Main>: end_connection <connection> (no
script)
I. 08/16 15:46:09. <Main>: COMMIT Transaction:
end_connection
I. 08/16 15:46:09. <Main>: Disconnected from consolidated
database
I. 08/16 15:46:09. <Main>: Disconnected
I. 08/16 15:46:09. <Main>: MobiLink server finished
Ml_user error :
I. 08/16 15:45:57. Connecting to remote database
I. 08/16 15:45:57. Loading synchronization information
I. 08/16 15:45:57. Options in database for subscription to
'table1data' for 'mluser1':
I. 08/16 15:45:57. scriptversion=3dver1
;
I. 08/16 15:45:57. Options in database for subscription to
'table1data' for 'mluser1':
I. 08/16 15:45:57. scriptversion=3dver1
;
I. 08/16 15:45:57. Options in database for subscription to
'table1data' for 'mluser1':
I. 08/16 15:45:57. scriptversion=3dver1
;
I. 08/16 15:45:57. Begin synchronizing 'table1data' for
MobiLink user 'mluser1'
I. 08/16 15:45:57. Options for this synchronization:
I. 08/16 15:45:57.
SCN=3d'YES',SV=3d've
r1',CTP=3d'TCPIP',AD
R=3d'host=3dlocalhos
t'
I. 08/16 15:45:57. Log scan starting at offset 0002351280
I. 08/16 15:45:57. Processing transaction logs from
directory "C:\Program Files\Sybase\SQL Anywhere
9\testmobilink\"
I. 08/16 15:45:59. Processing transactions from active
transaction log
I. 08/16 15:46:00. Hovering at end of active log
I. 08/16 15:46:00. Connecting to MobiLink server at
'host=3dlocalhost' using 'dbmlsock9.dll'
I. 08/16 15:46:00. Uploading header
I. 08/16 15:46:00. Stream version: 529
I. 08/16 15:46:00. Processor is little-endian
I. 08/16 15:46:00. Character set: cp1252
I. 08/16 15:46:00. MobiLink user name: mluser1
I. 08/16 15:46:00. Script version: ver1
I. 08/16 15:46:00. Synchronization ID: -14331701
I. 08/16 15:46:00. Publication 'table1data' - Synchronizing
- Log offset 0002351280 - Last download time 1900-01-01
00:00:00.0.
I. 08/16 15:46:00. Begin upload
I. 08/16 15:46:00. Uploading publication definition(s)
I. 08/16 15:46:00. Article table: table1
I. 08/16 15:46:00. Article column: DbGroupName
I. 08/16 15:46:00. Article column: DisplayGroupName
I. 08/16 15:46:00. Article column: grouplevel
I. 08/16 15:46:00. Table Upload Order: table1
I. 08/16 15:46:00. Uploading table operations
I. 08/16 15:46:00. Upload operations on table 'table1'
I. 08/16 15:46:00. # rows inserted in table table1 : 0
I. 08/16 15:46:00. # rows deleted in table table1 : 0
I. 08/16 15:46:00. # rows updated in table table1 : 0
I. 08/16 15:46:00. Log scan ended at offset 0002351479
I. 08/16 15:46:00. Waiting for MobiLink to apply upload
I. 08/16 15:46:00. The user authentication value is 1000.
I. 08/16 15:46:00. Setting last upload time to 2005-08-16
15:46:09.603.
I. 08/16 15:46:00. Setting generation number for publication
table1data to 1.
I. 08/16 15:46:00. COMMIT
I. 08/16 15:46:00. Download stream: received 21 bytes from
MobiLink Server.
I. 08/16 15:46:00. Processing download stream ...
I. 08/16 15:46:00. Downloading into table: table1
I. 08/16 15:46:00. # rows inserted/updated into table table1
: 0
I. 08/16 15:46:00. # rows deleted in table table1 : 0
I. 08/16 15:46:00. Setting last download time to 2005-08-16
15:46:09.613.
I. 08/16 15:46:00. COMMIT
I. 08/16 15:46:00. Completed processing of download stream
I. 08/16 15:46:00. End synchronizing 'table1data' for
MobiLink user 'mluser1'
I. 08/16 15:46:00. Disconnecting from MobiLink server
I. 08/16 15:46:00. Complete log scan required.
I. 08/16 15:46:00. Synchronization completed
I. 08/16 15:46:00. Options in database for subscription to
'table1data' for 'mluser1':
I. 08/16 15:46:00. scriptversion=3dver1
;
I. 08/16 15:46:00. Disconnecting from remote database
I. 08/16 15:49:35. Synchronization Started
I. 08/16 15:49:35. 5: SendColumnNames=3don
I. 08/16 15:49:35. Connecting to remote database
I. 08/16 15:49:35. Loading synchronization information
E. 08/16 15:49:35. SQL statement failed: (-101) Not
connected to a database
I. 08/16 15:49:35. Disconnecting from remote database
I. 08/16 15:50:01. Synchronization Started
I. 08/16 15:50:01. 1: -c
I. 08/16 15:50:01. 2: ********************
******
I. 08/16 15:50:01. 3: -v+
I. 08/16 15:50:01. 4: -e
I. 08/16 15:50:01. 5: SendColumnNames=3don
I. 08/16 15:50:01. Adaptive Server Anywhere MobiLink
Synchronization Version 9.0.1.2009
I. 08/16 15:50:01.
I. 08/16 15:50:01. Copyright =a9 1989-2004 Sybase, Inc.
Portions Copyright =a9 2002-2004,
iAnywhere Solutions, Inc.
I. 08/16 15:50:01. All rights reserved. All unpublished
rights reserved.
I. 08/16 15:50:01.
I.
I. 08/16 15:50:01. Connecting to remote database
E. 08/16 15:50:01. Unable to connect to remote database.
SQLCode =3d -301.
I. 08/16 15:50:49. Synchronization Started
I. 08/16 15:50:49. 1: -c
I. 08/16 15:50:49. 2: ********************
******
I. 08/16 15:50:49. 3: -v+
I. 08/16 15:50:49. 4: -e
I. 08/16 15:50:49. 5: SendColumnNames=3don
I. 08/16 15:50:49. Adaptive Server Anywhere MobiLink
Synchronization Version 9.0.1.2009
568, USA
I. 08/16 15:50:49.
I. 08/16 15:50:49. Connecting to remote database
E. 08/16 15:50:49. Unable to connect to remote database.
SQLCode =3d -301.
| |
| Greg Fenton 2005-08-17, 3:24 am |
| Toni wrote:
> E. 08/16 15:50:49. Unable to connect to remote database.
> SQLCode = -301.
The above message shows that dbmlsync is not able to connect to the
remote database. You need to determine why this might be.
I'd start by using the dbping utility, passing it the exact same
connection string you are passing to dbmlsync:
dbping -d -c YOUR_CONNECTION_STRI
NG
Run this on the remote machine and see if a connection is successful.
If not, you need to track it down.
BTW: I strongly suggest you do not ignore the very informative warnings:
> W. 08/16 15:46:00. <1.5> [mluser1]: Warning: [10017] The
> consolidated and remote databases have different timestamp
> precisions. Consolidated database timestamps are precise to
> 2 digit(s) in the fractional second while the remote
> database timestamps are precise to 6 digit(s)
> W. 08/16 15:46:00. <1.5> [mluser1]: Warning: [10018] The
> timestamp precision mismatch may be resolved by setting the
> DEFAULT_TIMESTAMP_IN
CREMENT option on the remote database to
> 10000 and TRUNCATE_TIMESTAMP_V
ALUES to 'On'
> W. 08/16 15:46:00. <1.5> [mluser1]: Warning: [10020] The
> timestamp precision mismatch may affect upload conflict
> detection. Use the -zp option to cause the MobiLink
> synchronization server to use the lowest timestamp precision
> for conflict detection purposes
Hope this helps,
greg.fenton
--
Greg Fenton
Consultant, Solution Services, iAnywhere Solutions
--------
Visit the iAnywhere Solutions Developer Community
Whitepapers, TechDocs, Downloads
http://www.ianywhere.com/developer/
| |
|
| Hi,
It does not allow to connect to db :
error message:
Attempting to store invalid timestamp value in table
'<temporary table>' -- transaction rolled back
Error code=-301
SQL state=HY000
Thing will never work after changing option on ASA based on
warning message ????
The only thing I can do for now is drop and recreate new
local db and set up everything over again.
thanks,
> Toni wrote:
>
> The above message shows that dbmlsync is not able to
> connect to the remote database. You need to determine
> why this might be.
>
> I'd start by using the dbping utility, passing it the
> exact same connection string you are passing to dbmlsync:
>
> dbping -d -c YOUR_CONNECTION_STRI
NG
>
> Run this on the remote machine and see if a connection is
> successful. If not, you need to track it down.
>
> BTW: I strongly suggest you do not ignore the very
> informative warnings:
>
>
>
> Hope this helps,
> greg.fenton
> --
> Greg Fenton
> Consultant, Solution Services, iAnywhere Solutions
> --------
> Visit the iAnywhere Solutions Developer Community
> Whitepapers, TechDocs, Downloads
> http://www.ianywhere.com/developer/
| |
| Reg Domaratzki \(iAnywhere Solutions\) 2005-08-18, 9:42 am |
| The docs are pretty clear that this specific option you changed does require
you to verify the integrity of your data before making the change, and
offers options on how to avoid rebuilding the database.
ASA Database Administration Guide
Database Options
Alphabetical list of options
TRUNCATE_TIMESTAMP_V
ALUES option [database]
Function
Limits the resolution of timestamp values.
Allowed values
ON, OFF
Scope
Can be set for the PUBLIC group only. DBA authority required. This option
should not be enabled for databases already containing timestamp data.
Default
OFF
Description
A TIMESTAMP value is precise to six decimal places in Adaptive Server
Anywhere. However, to maintain compatibility with other software, which may
truncate the TIMESTAMP value to three decimal places, you can set the
TRUNCATE_TIMESTAMP_V
ALUES option to ON to limit the number of decimal places
Adaptive Server Anywhere stores. The DEFAULT_TIMESTAMP_IN
CREMENT option
determines the number of decimal places to which the TIMESTAMP value is
truncated.
For MobiLink synchronization, this option must be set prior to performing
the first synchronization.
If the database server finds TIMESTAMP values with a higher resolution than
that specified by the combination of TRUNCATE_TIMESTAMP_V
ALUES and
DEFAULT_TIMESTAMP_IN
CREMENT, an error is reported.
In most cases, unloading the database and then reloading it into a new
database in which the TRUNCATE_TIMESTAMP_V
ALUES and
DEFAULT_TIMESTAMP_IN
CREMENT values have been set is the easiest solution to
ensure the proper TIMESTAMP values are used. However, depending on the type
of TIMESTAMP columns in your table, you can also do the following:
1) If the TIMESTAMP columns are defined with DEFAULT TIMESTAMP or DEFAULT
UTC TIMESTAMP (so that the value is automatically updated by the server when
the row is modified), you must delete all the rows in the table before the
TRUNCATE_TIMESTAMP_V
ALUES option is changed. You can delete the rows using
the DELETE or TRUNCATE TABLE statement.
2) If the TIMESTAMP column is defined with a value other than DEFAULT
TIMESTAMP or DEFAULT UTC TIMESTAMP, you can execute an UPDATE statement that
casts the values to a string and then back to a TIMESTAMP. For example,
UPDATE T SET ts = CAST( DATEFORMAT( ts, 'yyyy/mm/dd hh:nn:ss.ss') AS
TIMESTAMP)
Note that this process may lose more precision than is necessary. The format
string to use depends on the number of digits of precision to be kept.
Example
Setting the DEFAULT_TIMESTAMP_IN
CREMENT option to 100 000 causes truncation
after the first decimal place in the seconds component, allowing a value
such as '2000/12/05 10:50:53:700' to be stored.
--
Reg Domaratzki, Sybase iAnywhere Solutions
Sybase Certified Professional - Sybase ASA Developer Version 8
Please reply only to the newsgroup
iAnywhere Developer Community : http://www.ianywhere.com/developer
iAnywhere Documentation : http://www.ianywhere.com/developer/product_manuals
ASA Patches and EBFs : http://downloads.sybase.com/swx/sdmain.stm
-> Choose SQL Anywhere Studio
-> Set "Platform Preview" and "Time Frame" to ALL
<toni> wrote in message news:43048a8b.4052.1681692777@sybase.com...[color=darkred]
> Hi,
>
> It does not allow to connect to db :
> error message:
>
> Attempting to store invalid timestamp value in table
> '<temporary table>' -- transaction rolled back
>
> Error code=-301
>
> SQL state=HY000
>
>
> Thing will never work after changing option on ASA based on
> warning message ????
> The only thing I can do for now is drop and recreate new
> local db and set up everything over again.
>
> thanks,
>
>
| |
|
| Thank Reg for information. The timestamp is no longer an
issue now. However the synch still does not work ???
(Even I start everything from begining)
The Warning message in dbmlser9:
W. 08/18 15:19:31. <1.5> [t1]: Warning: [10024] Table
'Table1' has no entry in the ml_table table
I. 08/18 15:19:31. <1.5> [t1]: Cached ODBC statement:
SELECT table_id FROM ml_table WHERE name
= ?
W. 08/18 15:19:32. <1.5> [t1]: Warning: [10056] There is no
download data script defined for table: Table1.
Synchronization has the risk of potentially losing download
data.
thanks,
Toni
> The docs are pretty clear that this specific option you
> changed does require you to verify the integrity of your
> data before making the change, and offers options on how
> to avoid rebuilding the database.
>
> ASA Database Administration Guide
> Database Options
> Alphabetical list of options
> TRUNCATE_TIMESTAMP_V
ALUES option [database]
>
> Function
> Limits the resolution of timestamp values.
>
> Allowed values
> ON, OFF
>
> Scope
> Can be set for the PUBLIC group only. DBA authority
> required. This option should not be enabled for databases
> already containing timestamp data.
>
> Default
> OFF
>
> Description
> A TIMESTAMP value is precise to six decimal places in
> Adaptive Server Anywhere. However, to maintain
> compatibility with other software, which may truncate the
> TIMESTAMP value to three decimal places, you can set the
> TRUNCATE_TIMESTAMP_V
ALUES option to ON to limit the number
> of decimal places Adaptive Server Anywhere stores. The
> DEFAULT_TIMESTAMP_IN
CREMENT option determines the number
> of decimal places to which the TIMESTAMP value is
> truncated.
>
> For MobiLink synchronization, this option must be set
> prior to performing the first synchronization.
>
> If the database server finds TIMESTAMP values with a
> higher resolution than that specified by the combination
> of TRUNCATE_TIMESTAMP_V
ALUES and
> DEFAULT_TIMESTAMP_IN
CREMENT, an error is reported.
>
> In most cases, unloading the database and then reloading
> it into a new database in which the
> TRUNCATE_TIMESTAMP_V
ALUES and DEFAULT_TIMESTAMP_IN
CREMENT
> values have been set is the easiest solution to ensure the
> proper TIMESTAMP values are used. However, depending on
> the type of TIMESTAMP columns in your table, you can also
> do the following: 1) If the TIMESTAMP columns are defined
> with DEFAULT TIMESTAMP or DEFAULT UTC TIMESTAMP (so that
> the value is automatically updated by the server when the
> row is modified), you must delete all the rows in the
> table before the TRUNCATE_TIMESTAMP_V
ALUES option is
> changed. You can delete the rows using the DELETE or
> TRUNCATE TABLE statement. 2) If the TIMESTAMP column is
> defined with a value other than DEFAULT TIMESTAMP or
> DEFAULT UTC TIMESTAMP, you can execute an UPDATE statement
> that casts the values to a string and then back to a
> TIMESTAMP. For example, UPDATE T SET ts = CAST(
> DATEFORMAT( ts, 'yyyy/mm/dd hh:nn:ss.ss') AS TIMESTAMP)
> Note that this process may lose more precision than is
> necessary. The format string to use depends on the number
> of digits of precision to be kept.
>
> Example
> Setting the DEFAULT_TIMESTAMP_IN
CREMENT option to 100 000
> causes truncation after the first decimal place in the
> seconds component, allowing a value such as '2000/12/05
> 10:50:53:700' to be stored.
>
> --
> Reg Domaratzki, Sybase iAnywhere Solutions
> Sybase Certified Professional - Sybase ASA Developer
> Version 8 Please reply only to the newsgroup
>
> iAnywhere Developer Community :
> http://www.ianywhere.com/developer iAnywhere Documentation
> : http://www.ianywhere.com/developer/product_manuals ASA
> Patches and EBFs :
> http://downloads.sybase.com/swx/sdmain.stm
> -> Choose SQL Anywhere Studio
> -> Set "Platform Preview" and "Time Frame" to ALL
>
> <toni> wrote in message
> setting the DEFAULT_TIMESTAMP_IN
CREMENT option on the
>
>
| |
| David Fishburn 2005-08-19, 9:28 am |
| Toni wrote in news:4304e578.4925.1681692777@sybase.com
of sybase.public.sqlanywhere.mobilink:
T> The Warning message in dbmlser9:
T>
T> W. 08/18 15:19:31. <1.5> [t1]: Warning: [10024] Table
T> 'Table1' has no entry in the ml_table table
T> I. 08/18 15:19:31. <1.5> [t1]: Cached ODBC statement:
T> SELECT table_id FROM ml_table WHERE name
T> = ?
T> W. 08/18 15:19:32. <1.5> [t1]: Warning: [10056] There is no
T> download data script defined for table: Table1.
T> Synchronization has the risk of potentially losing download
T> data.
OK, this warning indicates you do not have a download_cursor for table,
Table1.
Did you create a download_cursor for this table?
If you have further problems, run dbmlsrv9 using -vcrsn -ot ml.txt and
post the output of ml.txt.
--
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 (dbeng9 -v).
EBFs and Maintenance Releases
http://downloads.sybase.com/swx/sdmain.stm
Developer Community / Whitepapers
http://www.ianywhere.com/developer
CaseXpress - to report bugs
http://casexpress.sybase.com
CodeXchange - Free samples
[url]http://ianywhere.codexchange.sybase.com/servlets/ ProjectDocumentList[
/url]
|
|
|
|
|