Skip to Content.
Sympa Menu

freetds - [freetds] timestamps and bcp

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Lowden, James K" <LowdenJK AT bernstein.com>
  • To: "TDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: [freetds] timestamps and bcp
  • Date: Mon, 23 Feb 2004 17:58:43 -0500

17:34:57.846249 client.2636 > server.2500: P 870:938(68) ack 916 win 7845 (DF)
0x0000 4500 006c f53f 4000 8006 91a7 0a51 2428 E..l.?@......Q$(
0x0010 0a50 3adc 0a4c 09c4 0119 3a5b 5049 c5e9 .P:..L....:[PI..
0x0020 5018 1ea5 c637 0000 0101 0044 0000 0100 P....7.....D....
0x0030 6900 6e00 7300 6500 7200 7400 2000 6200 i.n.s.e.r.t...b.
0x0040 7500 6c00 6b00 2000 7400 6500 7300 7400 u.l.k...t.e.s.t.
0x0050 6400 6200 2e00 2e00 7400 7300 2800 7400 d.b.....t.s.(.t.
0x0060 7300 2000 6900 6e00 7400 2900 s...i.n.t.).
17:34:57.846864 server.2500 > client.2636: P 916:933(17) ack 938 win 63303
(DF)
0x0000 4500 0039 fe3d 4000 7d06 8bdc 0a50 3adc E..9.=@.}....P:.
0x0010 0a51 2428 09c4 0a4c 5049 c5e9 0119 3a9f .Q$(...LPI....:.
0x0020 5018 f747 dbc4 0000 0401 0011 0037 0100 P..G.........7..
0x0030 fd00 00c3 0002 0000 00 .........
17:34:57.847210 client.2636 > server.2500: P 938:981(43) ack 933 win 7828 (DF)
0x0000 4500 0053 f63f 4000 8006 90c0 0a51 2428 E..S.?@......Q$(
0x0010 0a50 3adc 0a4c 09c4 0119 3a9f 5049 c5fa .P:..L....:.PI..
0x0020 5018 1e94 9cf3 0000 0701 002b 0000 0100 P..........+....
0x0030 8101 0000 0008 0026 0402 7400 7300 d104 .......&..t.s...
0x0040 0300 0000 d104 0400 0000 fd00 0000 0000 ................
0x0050 0000 00 ...

The above tcpdump(8) log shows a bulk insert into this table:

create table ts (ts int, cc timestamp)

Here are the data in the file:

$ type E:\website\sql2k\ts.txt
3 000000000015F195
4 000000000015F196

Here are the resulting data in the table:

1> select * from ts where ts > 2
2> go
ts cc
----------- ------------------
3 0x00000000001610da
4 0x00000000001610db

(2 rows affected)

Microsoft's BCP utility detects the timestamp column, and automatically snips
it from the "bulk insert" statement. It then skips the timestamp data,
inserting a NULL value instead, allowing the server to accept the row and
assign its own timestamp value.

FreeTDS cannot load data into tables with timestamp columns. It simply
fails.

--jkl


-----------------------------------------
The information contained in this transmission may contain privileged and
confidential information and is intended only for the use of the person(s)
named above. If you are not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient, any
review, dissemination, distribution or duplication of this communication is
strictly prohibited. If you are not the intended recipient, please contact
the sender immediately by reply e-mail and destroy all copies of the original
message. Please note that we do not accept account orders and/or instructions
by e-mail, and therefore will not be responsible for carrying out such orders
and/or instructions.
If you, as the intended recipient of this message, the purpose of which is to
inform and update our clients, prospects and consultants of developments
relating to our services and products, would not like to receive further
e-mail correspondence from the sender, please "reply" to the sender
indicating your wishes. In the U.S.: 1345 Avenue of the Americas, New York,
NY 10105.






Archive powered by MHonArc 2.6.24.

Top of Page