I am connecting to MSSQL 2012 from a managed console program using OpenESQL and ADO.  I need to completely replace the data in several tables from some data files.  I wrote a proof-of-concept that connected, truncated, read-and-inserted, committed and disconnected.  It worked great.  But in our production environment I need to minimize the volume of the database log files by temporarily shifting db RECOVERY from FULL to SIMPLE, and then shift it back after the loading is done.
My "EXEC SQL ALTER DATABASE NEAS SET RECOVERY SIMPLE END-EXEC" statement returns with SQLCODE -226, SQLSTATE IM999 and MFSQLMESSAGETEXT "ALTER DATABASE statement not allowed within multi-statement transaction."
Can anyone shed some light on this?
VC 2.3.2 for VS 2013 on Windows 7.
        
            Page 1 / 1 
    I am connecting to MSSQL 2012 from a managed console program using OpenESQL and ADO.  I need to completely replace the data in several tables from some data files.  I wrote a proof-of-concept that connected, truncated, read-and-inserted, committed and disconnected.  It worked great.  But in our production environment I need to minimize the volume of the database log files by temporarily shifting db RECOVERY from FULL to SIMPLE, and then shift it back after the loading is done.
My "EXEC SQL ALTER DATABASE NEAS SET RECOVERY SIMPLE END-EXEC" statement returns with SQLCODE -226, SQLSTATE IM999 and MFSQLMESSAGETEXT "ALTER DATABASE statement not allowed within multi-statement transaction."
Can anyone shed some light on this?
VC 2.3.2 for VS 2013 on Windows 7.
I am connecting to MSSQL 2012 from a managed console program using OpenESQL and ADO.  I need to completely replace the data in several tables from some data files.  I wrote a proof-of-concept that connected, truncated, read-and-inserted, committed and disconnected.  It worked great.  But in our production environment I need to minimize the volume of the database log files by temporarily shifting db RECOVERY from FULL to SIMPLE, and then shift it back after the loading is done.
My "EXEC SQL ALTER DATABASE NEAS SET RECOVERY SIMPLE END-EXEC" statement returns with SQLCODE -226, SQLSTATE IM999 and MFSQLMESSAGETEXT "ALTER DATABASE statement not allowed within multi-statement transaction."
Can anyone shed some light on this?
VC 2.3.2 for VS 2013 on Windows 7.
Sign up
Already have an account? Login
Welcome to the Rocket Forum!
Please log in or register:
Employee Login | Registration Member Login | RegistrationEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.