Bulk copy out of text and image data

From SybaseWiki
Revision as of 15:46, 23 March 2006 by Psap (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

When you want to export a database with bcp, you need to check if there is any text or image data (blobs) in the database, check the maximum size of these blobs and use this to specify the value for the -T argument in bcp command. Here are some usefull queries.

To determine the tables in the database that use text/image data:

select user_name(uid) as "owner",
       name
from   sysobjects o
where  type = "U"
and    exists
       (select 1
               from  syscolumns c
               where o.id = c.id
               and   c.type in (34,35))

Note: document still under construction