Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
[NRTDocument ][Checkout method ]Database transaction failed; see Administrator
Rooose
Hi All,
When performing the following on Worksite 8.5 server:
document.CheckOut(secondTempFile, imCheckOutOptions.imReplaceExistingFile, dueDate, "Checkout by me");
I get: [NRTDocument ][Checkout method ]Database transaction failed; see Administrator
This works fine on 8.2 server.
Can anyone help please?
cheers
Find more posts tagged with
Comments
Arwin
Code looks ok, we have the same working in 8.2, 8.5 etc. If you're sure the temp file exists and can be replaced. To be sure you could place an if System.IO.File.CheckExisting before this command if you haven't already?
Then, did you:
- check if you can do a checkout from desksite/filesite?
- check what message shows up in the WorkSite server log? If you just did the upgrade to 8.5, you may have missed something.
- check if you use the 8.2 imanage.dll, the 8.5 imanage.dll, an interop to the 8.2 dll or an interop to the 8.5 imanage.dll?
- have enough rights? A common issue with upgrading to 8.5 is that the nrtadmin role doesn't have view documents enabled by default (at least not in the earlier versions, I think this got set to true by default again later)
rikrak99
Hi Arwin,
I'm looking at this issue with Rooose.
I've had a look at the server log an I get the following entries when I run my proceedure:
Mon 08/01 15:41:46.390 Executer: 821:Error [2172] DB Interwoven - insertActivity - doSqlCommand: Error executing SQL statement - CID 1556d28d
Mon 08/01 15:41:46.390 Executer: 822:Error [2172] SQL State: 22001, Native Error: 8152, Msg: [Microsoft][ODBC SQL Server Driver][SQL Server]String or binary data would be truncated.
Mon 08/01 15:41:46.390 Executer: 826:Error [2172] SQL Command: INSERT INTO MHGROUP.DOCHISTORY (DOCNUM, VERSION, ACTIVITY, ACTIVITY_CODE, ACTIVITY_DATETIME, DURATION, PAGES_PRINTED, DOCUSER, APPNAME, NUM1, LOCATION) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Mon 08/01 15:41:46.390 Pool: 769:Warn [2172] Connection to database Interwoven may have had a non-recoverable error: disconnecting
Mon 08/01 15:41:46.468 Pool: 773:Warn [2172] Reconnected to database Interwoven after abort
Mon 08/01 15:41:49.218 Executer: 821:Error [2164] DB Interwoven - insertActivity - doSqlCommand: Error executing SQL statement - CID 15fee20d
Mon 08/01 15:41:49.218 Executer: 822:Error [2164] SQL State: 22001, Native Error: 8152, Msg: [Microsoft][ODBC SQL Server Driver][SQL Server]String or binary data would be truncated.
Mon 08/01 15:41:49.218 Executer: 826:Error [2164] SQL Command: INSERT INTO MHGROUP.DOCHISTORY (DOCNUM, VERSION, ACTIVITY, ACTIVITY_CODE, ACTIVITY_DATETIME, DURATION, PAGES_PRINTED, DOCUSER, APPNAME, LOCATION) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Mon 08/01 15:41:49.218 Pool: 769:Warn [2164] Connection to database Interwoven may have had a non-recoverable error: disconnecting
Mon 08/01 15:41:49.265 Pool: 773:Warn [2164] Reconnected to database Interwoven after abort
Mon 08/01 15:41:49.656 Executer: 821:Error [2152] DB Interwoven - checkoutDocument - doSqlCommand: Error executing SQL statement - CID 15f4428d
Mon 08/01 15:41:49.656 Executer: 822:Error [2152] SQL State: 22001, Native Error: 8152, Msg: [Microsoft][ODBC SQL Server Driver][SQL Server]String or binary data would be truncated.
Mon 08/01 15:41:49.656 Executer: 826:Error [2152] SQL Command: INSERT INTO MHGROUP.CHECKOUT (DOCNUM, VERSION, CHECKOUTWHEN, DUEWHEN, CHECKOUT_DIR, PORTABLE, COMMENTS, APPNAME, LOCATION) VALUES (?,?,?,?,?,?,?,?,?)
Mon 08/01 15:41:49.656 Common: 491:Warn [2152] Transaction rollback: checkout: cause 201, (user USER1 at 192.168.164.1)
Mon 08/01 15:41:49.656 Pool: 769:Warn [2152] Connection to database Interwoven may have had a non-recoverable error: disconnecting
Mon 08/01 15:41:49.656 Pool: 773:Warn [2152] Reconnected to database Interwoven after abort
Mon 08/01 15:41:49.781 Executer: 821:Error [2156] DB Interwoven - DeleteCustomData - doSqlCommand: Error executing SQL statement - CID 15f4428d
Mon 08/01 15:41:49.781 Executer: 822:Error [2156] SQL State: 23000, Native Error: 547, Msg: [Microsoft][ODBC SQL Server Driver][SQL Server]The DELETE statement conflicted with the REFERENCE constraint "FK_DCMSTR_CUSTOM2". The conflict occurred in database "Interwoven", table "MHGROUP.DOCMASTER".
Mon 08/01 15:41:49.781 Executer: 826:Error [2156] SQL Command: DELETE FROM MHGROUP.CUSTOM2 WHERE CUSTOM_ALIAS = ? AND CPARENT_ALIAS = ?
Mon 08/01 15:41:49.796 Pool: 769:Warn [2156] Connection to database Interwoven may have had a non-recoverable error: disconnecting
Mon 08/01 15:41:49.796 Pool: 773:Warn [2156] Reconnected to database Interwoven after abort
Mon 08/01 15:41:49.937 Executer: 821:Error [2180] DB Interwoven - insertActivity - doSqlCommand: Error executing SQL statement - CID 1597eb0d
Mon 08/01 15:41:49.937 Executer: 822:Error [2180] SQL State: 22001, Native Error: 8152, Msg: [Microsoft][ODBC SQL Server Driver][SQL Server]String or binary data would be truncated.
Mon 08/01 15:41:49.937 Executer: 826:Error [2180] SQL Command: INSERT INTO MHGROUP.DOCHISTORY (DOCNUM, VERSION, ACTIVITY, ACTIVITY_CODE, ACTIVITY_DATETIME, DURATION, PAGES_PRINTED, DOCUSER, APPNAME, NUM1, LOCATION) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Mon 08/01 15:41:49.953 Pool: 769:Warn [2180] Connection to database Interwoven may have had a non-recoverable error: disconnecting
Mon 08/01 15:41:49.953 Pool: 773:Warn [2180] Reconnected to database Interwoven after abort
* This is a clean install of the 8.5 server. The 8.2 server is on a different (virtual) machine.
* For my tests I'm running with a 8.2 interop but I have v8.5 desksite installed on my client PC
rikrak99
An update:
I've run a SQL Trace on the database to see what's happening at about the same time the error is logged, and I find the following line:
declare
@p1
int
set
@p1=135
exec sp_prepexec
@p1
output,N'
@P1
float,
@P2
int,
@P3
datetime,
@P4
datetime,
@P5
char(48),
@P6
char(1),
@P7
text,
@P8
char(33),
@P9
char(13)',N'INSERT INTO MHGROUP.CHECKOUT (DOCNUM, VERSION, CHECKOUTWHEN, DUEWHEN, CHECKOUT_DIR, PORTABLE, COMMENTS, APPNAME, LOCATION) VALUES (
@P1
,
@P2
,
@P3
,
@P4
,
@P5
,
@P6
,
@P7
,
@P8
,
@P9)
',18,1,'2011-08-01 15:38:46:000','2011-08-07 23:00:00:000','C:\Users\cromptonr\AppData\Local\Temp\tmpFB6.tmp','N','Checkout by Streamline Integration Webservice','Xxxxxxxxxx.Yyyyyyyyyy.Zzzzzzzzzzz','LNGLEEL012274'
select
@p1
In this query I noticed that the APPNAME value is 33 characters long, whereas the table only accepts 32 characters. So I'm guessing that this is the source of the problem.
Unfortunately I can't find where this value is set in the code. Any Ideas?
rikrak99
RESOLVED!
Ha! I think I've sussed it out...
In order to explicitly set the Application Name value I've used the ApplicationName property on the IManDMS interface:
this._dms = new ManDMS();
this._dms.ApplicationName = "MyApplication";
Without the second line the Application Name would default to the name of the running application, which in my case was 33 characters long. For example : "Company.ProductName.MyApplication"
This caused all sorts of problems with:
IManWorkspace.UpdateAllWithResults()
IManDocument.CheckInWithResults()
IManDocument.Checkout()