0

Is there a way to use CREATE TABLE inside of a transaction in Sybase?

2
  • which Sybase RDBMS product (ASE? IQ? SQLAnywhere? Advantage?) and version?
    – markp-fuso
    Nov 2, 2020 at 12:44
  • @markp-fuso, ASE, latest version.
    – Igor
    Nov 2, 2020 at 15:30

1 Answer 1

0

Assuming we're talking about Sybase ASE ...

To allow DDL (eg, create table) to be performed within a transaction the DBA can configure the database (where the DDL is to be performed) with the following:

sp_dboption <dbname>,'ddl in tran',true

NOTE: ddl in tran == true is not recommended since this can lead to excessive blocking, and in some rare cases deadlocking, on system table activity

2
  • @mark-fuso, so if I am accessing the DB from c++ odbc or native client (either freeTDS or db-lib), I should check the return value of the function and just delete all previous commands, right?
    – Igor
    Nov 2, 2020 at 15:35
  • I have no idea what you're talking about re: function and all previous commands; the (above) answer addresses how to allow DDL (eg, create table) inside of a txn; if you're having other issues I'd suggest asking a new question and be sure to provide details of the issue(s)
    – markp-fuso
    Nov 2, 2020 at 15:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.