Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Error with bcp (Bulk Copy) about logging? Help?

1,640 views
Skip to first unread message

Lawrence Hutson

unread,
Apr 12, 1995, 3:00:00 AM4/12/95
to
It get the following error when I try to run bcp:

$ bcp asset..product in product.out -SSYBASE -Usa -Pjunk -c

Msg 4806, Level 16, State 1:
You cannot run the non-logged version of bulk copy in this database.
Please check with the DBO.

Does anyone know how to get around it?

Thanks

Lawrence C. Hutson, Consultant
Hutson Consulting Inc.


Santosh Chavan

unread,
Apr 13, 1995, 3:00:00 AM4/13/95
to
lchu...@netcom.com (Lawrence Hutson) wrote:
>
> It get the following error when I try to run bcp:
>
> Msg 4806, Level 16, State 1:
> You cannot run the non-logged version of bulk copy in this database.
> Please check with the DBO.
>
> Does anyone know how to get around it?
>
> Thanks

You have to set at isql,

sp_dboption dbname,'select into/bulkcopy',true

You have to be in master database to set above option.

reset the option after bulkcopy is done.

Hope this helps,

Santosh.

Patilv

unread,
Apr 13, 1995, 3:00:00 AM4/13/95
to
You should check the select into / bulk copy option on the database.
Unless this is on one cannot do a non logged bcp


Diana Barrett

unread,
Apr 13, 1995, 3:00:00 AM4/13/95
to
In article <lchutsonD...@netcom.com>, lchu...@netcom.com (Lawrence Hutson) writes:
|> It get the following error when I try to run bcp:
|>
|> $ bcp asset..product in product.out -SSYBASE -Usa -Pjunk -c
|>
|> Msg 4806, Level 16, State 1:
|> You cannot run the non-logged version of bulk copy in this database.
|> Please check with the DBO.
|>
|> Does anyone know how to get around it?
|>
|> Thanks
|>
|> Lawrence C. Hutson, Consultant
|> Hutson Consulting Inc.

From "SYBASE SQL Server Error Messages" (recently split off from "SYBASE
SQL Server Troubleshooting Guide"):

(February 1995 Errors TSG : Page 2-313)
(June 1994 TSG : Page 1-216)
Error 4806, Severity Level 16 (August 1993 TSG : Page 1-132)
============================== (December 1992 TSG : Page 1-92)

Error Message Text

You cannot run the non-logged version of bulk copy
in this database. Please check with the DBO.

Explanation

This error occurs when the select/into bulkcopy option is not set to true
when using "fast" bulk copy into a table that has no indexes or
triggers.

Action

Use the sp_dboption stored procedure to set the select/into bulkcopy
option as follows:

1> sp_dboption database_name,
2> "select into/bulkcopy", true
3> go

1> use database_name
2> go

1> checkpoint
2> go

Once a minimally logged operation such as "fast" bulk copy runs in
the database, you are not allowed to dump the transaction log to a
device, because unlogged changes are not recoverable. Instead, you
should do a dump database as soon as possible to restore recoverability
and allow transaction dumps to devices again.

When you copy into a table that has indexes or triggers, a slower
version of bcp is automatically used. The slow version, which does
log data inserts in the transaction log, can cause the transaction log to
become very large. You may need to use dump transaction with
truncate_only until you can perform a full database dump. If you must
do this, you will lose the ability to recover up-to-the-minute changes
in data in case of a media failure. You may also consider using
smaller batch sizes.

Additional Information

By default, the select into/bulkcopy option in newly created databases is
set to the same as that in model.


Bret Halford

unread,
Apr 13, 1995, 3:00:00 AM4/13/95
to


Alternatively, put an index or trigger on the table.

--
---------------------------------------------------------------------
| Bret Halford br...@sybase.com ___|
| Sybase Technical Support __|
| 6475 Christie Avenue |__
| Emeryville, CA 94608 USA |___
| fax: (510)-922-3911 dberror 155 - "You can't do that" |
#####################################################################


Mike Bowker

unread,
Apr 14, 1995, 3:00:00 AM4/14/95
to
Lawrence Hutson (lchu...@netcom.com) wrote:
: It get the following error when I try to run bcp:

: $ bcp asset..product in product.out -SSYBASE -Usa -Pjunk -c

: Msg 4806, Level 16, State 1:
: You cannot run the non-logged version of bulk copy in this database.
: Please check with the DBO.

: Does anyone know how to get around it?

: Thanks

: Lawrence C. Hutson, Consultant
: Hutson Consulting Inc.

Sorry people I'm just learning how to use this text newsreader. I have
posted a reply outside the thread. The subject is Select into / Bulk Copy.

Cheers

Mike Bowker

Paul Chen

unread,
Apr 14, 1995, 3:00:00 AM4/14/95
to
In article <lchutsonD...@netcom.com> lchu...@netcom.com (Lawrence Hutson) writes:
>
>Msg 4806, Level 16, State 1:
>You cannot run the non-logged version of bulk copy in this database.
>Please check with the DBO.
>
>Does anyone know how to get around it?

Yes. Run the following commands from isql.

use master
go
sp_dboption <db_name>, "select into/bulkcopy", true
go
use <db_name>
go
checkpoint
go


--
Paul Chen, Ph.D.
consulting at DEC
Disclaimer: My opinions only!

UDAY B. NAIK

unread,
Apr 14, 1995, 3:00:00 AM4/14/95
to
In article <lchutsonD...@netcom.com>, lchu...@netcom.com (Lawrence Hutson) writes:
>It get the following error when I try to run bcp:
>
>$ bcp asset..product in product.out -SSYBASE -Usa -Pjunk -c
>
>Msg 4806, Level 16, State 1:
>You cannot run the non-logged version of bulk copy in this database.
>Please check with the DBO.
>
>Does anyone know how to get around it?
>
>Thanks
>
>Lawrence C. Hutson, Consultant
>Hutson Consulting Inc.
>

I have a hunch that you shud check for the "select into/bulk copy" option on

-Uday

Thomas Glauser

unread,
Apr 25, 1995, 3:00:00 AM4/25/95
to

probably you have to do the following

use master
go
sp_dboption product,"select into/bulkcopy",true
go

this enables fast bulkcopy and usage of select into for this database

Thomas

Thomas Glauser

unread,
Apr 25, 1995, 3:00:00 AM4/25/95
to

Sorry, it must be
sp_dboption asset,"select into/bulkcopy",true
the database name must be given

Thomas


0 new messages