cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Does LOAD TABLE WITH ROW LOGGING override dbsrv12 -b?

Breck_Carter
Participant
0 Kudos
1,690

The following Help topic discusses the dbsrv12 -b bulk loading option.

It says "You can also use some of the logging options available for the LOAD TABLE statement that allow bulk-loaded data to be recorded in the transaction log."

Does that mean LOAD TABLE WITH ROW LOGGING will actually override dbsrv12 -b and cause data to be written to the transaction log?

http://dcx.sybase.com/index.html#1200en/dbusage/load-s-5991168.html

Data recovery issues for bulk operations

You can run the database server in bulk operations mode (the -b server option). When you use this option, the database server does not perform certain important functions. Specifically:

Function Implication
Maintain a transaction log There is no record of the changes. Each COMMIT causes a checkpoint.
Lock any records There are no serious implications.

Alternatively, you may also need to ensure that data from bulk loading is still available in the event of recovery. You can do so by keeping the original data sources intact, and in their original location. You can also use some of the logging options available for the LOAD TABLE statement that allow bulk-loaded data to be recorded in the transaction log. See LOAD TABLE statement.

Caution You should back up the database before and after using bulk operations mode because your database is not protected against media failure in this mode.

Accepted Solutions (0)

Answers (1)

Answers (1)

johnsmirnios
Advisor
Advisor

I can only imagine that the documentation is suggesting that you can use -b bulk loading mode or, alternatively, LOAD TABLE without -b if you are trying to avoid writing operations to the transaction log. Internally, I would assume that LOAD TABLE WITH ROW LOGGING when in -b mode will try to write the rows to the log but the lower levels will just ignore those attempts because -b is enabled.

Bulk operations mode should soooo have been removed long ago.

-john.

Breck_Carter
Participant
0 Kudos

Why should it have been removed? What if you are FORCED to use INSERT to bulk load millions of rows?

johnsmirnios
Advisor
Advisor
0 Kudos

If we had the (dangerous) ability to do unlogged operations, I don't think bulk mode would be needed at all. I think the user can already avoid the overhead of per-row locks if you get an exclusive lock on the table too. If the cost of logging the row data is acceptable but the space overhead is not, the app doing the massive inserts could truncate the log periodically -- possibly even triggered by an event.