Quantcast
Channel: VMware Communities : Popular Discussions - VMware ThinApp: Discussion Forum
Viewing all articles
Browse latest Browse all 57744

Quickbooks 2008 - can't write to file because it's already being used (by the same process?)

$
0
0

 

I am currently evaluating ThinApp (latest version), and ran into a major problem when getting a sequenced version of Quickbooks 8.0 Enterprise R6 and Quickbooks 2008 Pro R6 to work.

 

 

In both versions, when opening a company file from a previous version of Quickbooks (2005 in my case), it fails during the conversion process when it tries to overwrite the file. Quickbooks gives me an error saying:

 

 

"You do not have sufficient permissions to the specified folder. You must have read/write access and create/delete rights to the folder where the company file is stored."

 

 

I've made sure that the application has full rights, and I am running it under an admin account; in fact, since the conversion takes place from a backup copy, this instance of the application actually creates the original file itself. I found that when it does create the file, it does not release the handle to it, so when it later tries to overwrite it, it gets an access denied. This can be confirmed by the trace log below (as well as the relevant part of QB's own log), and the process that is actually doing the database I/O is the Quickbooks Database Manager, QBDBMgrN.exe.

 

 

The application was sequenced on a clean Server 2003 Enterprise SP2 VM with Terminal Services enabled, and I have reliably replicated the problem both on the VM itself and on two production Terminal Servers running the same configuration (although not as clean), and the problem is not present when running a regular Quickbooks install on the same VM I sequenced it on. Also, Merged or WriteCopy isolation modes make no difference - problem is there with both.

 

 

Has anyone encountered this (or a similar) problem, and if so, is there a workaround? Why would ThinApp not release the file handle?

 

 

Let me know if you have any questions, I'll be happy to answer them. I can post more detailed logs if needed. Thanks!

 

 

P.S. Looking back at QB's own log, could this be an issue with the application trying to alter file security permissions?

 

 

========== BEGIN TRACE ERROR LOG =============

 

 

014535 00000afc  dbserv9.dll :4060aa16<-kernel32.dll:77e6b65f   *** OpenFileMappingA ->HANDLE=0h (DWORD dwDesiredAccess=F001Fh, BOOL bInheritHandle=0h, LPCSTR lpName=*16A61C0h->"SQLAny_SharedMemPort_qb_readonly_engine_18") *** GetLastError() returns 2 : The system cannot find the file specified.

014719 00000904  dbserv9.dll :40614416<-kernel32.dll:77e693a7 *** CreateMutexA ->HANDLE=200h (lpMutexAttributes=457FEE8h->struct {DWORD nLength=Ch, LPVOID lpSecurityDescriptor=457FEF4h, BOOL bInheritHandle=1000000h}, BOOL bInitialOwner=1h, LPCSTR lpName=406FCEA0h->"SQLAny_Default_MUTEX") *** GetLastError() returns 183 : Cannot create a file when that file already exists.

014832 00000afc  dbserv9.dll :406b5eae<-kernel32.dll:77e61e17   *** CreateFileMappingA ->HANDLE=200h (HANDLE hFile=ffffffffh, lpFileMappingAttributes=1F6FB78h->struct {DWORD nLength=Ch, LPVOID lpSecurityDescriptor=1F6FB84h, BOOL bInheritHandle=1000000h}, DWORD flProtect=4h, DWORD dwMaximumSizeHigh=0h, DWORD dwMaximumSizeLow=8h, LPCSTR lpName=40721948h->"dblib.sqlany") *** GetLastError() returns 183 : Cannot create a file when that file already exists.

018275 00000680  dbserv9.dll :4050edf4<-kernel32.dll:77e5be79   *** GetQueuedCompletionStatus ->BOOL=0h (HANDLE CompletionPort=158h, LPDWORD lpNumberOfBytesTransferred=1C6FE34h->1h, PULONG_PTR lpCompletionKey=1C6FE38h->0h, lpOverlapped=1C6FE2Ch->*0h<null pointer> <bad ptr>, DWORD dwMilliseconds=64h) *** GetLastError() returns 258 : The wait operation timed out.

023582 00000da0                                              CreateFileA lpFileName=C:\Documents and Settings\All Users\Documents\Intuit\QuickBooks\Company Files\CIndex_sample_product-based businesss.qbw DesiredAccess=0x80000000 GENERIC_READ ShareMode=0x0) lpSecurityAttributes=0x0 dwCreationDisposition=0x3 (OPEN_EXISTING) FlagsAndAttribs=0xf0000080 FILE_ATTRIBUTE_NORMAL FILE_FLAG_WRITE_THROUGH FILE_FLAG_OVERLAPPED FILE_FLAG_NO_BUFFERING FILE_FLAG_RANDOM_ACCESShTemplateFile=0x0 -> 0xffffffff *** failed, GetLastError=0x20 [File MetaData located in view # 0][Using sandbox copy L:\ThinApp\QuickBooks Enterprise 8.0\%Common Documents%\Intuit\QuickBooks\Company Files\CIndex_sample_product-based businesss.qbw]

023583 00000da0  dbserv9.dll :4060068a<-kernel32.dll:77e41a5f *** CreateFileA ->HANDLE=ffffffffh (LPCSTR lpFileName=*3C752A0h->"C:\Documents and Settings\All Users\Documents\Intuit\QuickBooks\Company Files\CIndex_sample_product-based businesss.qbw", DWORD dwDesiredAccess=80000000h, DWORD dwShareMode=0h, lpSecurityAttributes=0h<null pointer> <bad ptr>, DWORD dwCreationDisposition=3h, DWORD dwFlagsAndAttributes=F0000080h, HANDLE hTemplateFile=0h) *** GetLastError() returns 32 : The process cannot access the file because it is being used by another process.

 

 

=========== END TRACE LOG ==========

 

 

============= BEGIN QBWIN.LOG ===========

 

 

DBManager.cpp (3396) :  CHECKPOINT: Thu Nov 13 09:56:35 Database Server starting. Startup String = C:\PROGRA1\Intuit\QU3CRZ5.0\QBDBMgr.exe -n QB_ReadOnly_engine_18 -qs -gd ALL -gk all -gp 4096 -gu all -ch 16M -ti 0 -c 4M -x none -ct- -qi -qw  -tl 120 -oe "C:\Documents and Settings\Administrator\Local Settings\Application Data\Intuit\QuickBooks\Log\DBStartup.log" -r

IDBFileMgr.cpp (657) :  MESSAGE: Thu Nov 13 09:56:35 LVL_ERROR--Specified database file already in use

DBManager.cpp (2604) :  MESSAGE: Thu Nov 13 09:56:35 LVL_ERROR--DBManager::HandleDmError: statusCode:-6073, dbCode:-816 from file:'.\.\src\IDBFileMgr.cpp' at line 659 from function:'DBMgr::IDBFileMgr::GetFileMetaData'

IDBFileMgr.cpp (665) :  MESSAGE: Thu Nov 13 09:56:35 LVL_ERROR--GetMeta Data Failed Code:-816 Specified database file already in use.Connection String CON=MetaDataDump\10.16.0.30mta;****************;***************;DBF=C:\Documents and Settings\All Users\Documents\Intuit\QuickBooks\Company Files\CIndex_sample_product-based businessss.qbw;ServerName=QB_ReadOnly_engine_18;APP=10.16.0.30mta;DBN=2ec188badbb746158037d19b3d10282c

 

 

 

MigrationEngine.cpp (337) :  CHECKPOINT: Thu Nov 13 09:56:36 Begin file migration.

MigrationEngine.cpp (344) :  CHECKPOINT: Thu Nov 13 09:56:36 End file migration, elapsed time: 0 minutes, 0 seconds.

MigrationEngine.cpp (234) :  CHECKPOINT: Thu Nov 13 09:56:36 FAILED: Migration of file C:\Documents and Settings\All Users\Documents\Intuit\QuickBooks\Company Files\sample_product-based businessss.qbw failed with error There was a problem in setting the file security. There is extended information.

 

 

load.c (2819) :  MESSAGE: Thu Nov 13 09:56:36 LVL_ERROR--InitSystem: Migrate CIndex company file failed. Code=-6154, Msg=There was a problem in setting the file security. There is extended information.

load.c (8702) :  MESSAGE: Thu Nov 13 09:56:36 LVL_ERROR--DMError Information:-6154Additional Info:There was a problem in setting the file security. There is extended information.

 

 

============ END QBWIN.LOG ============

 

 


Viewing all articles
Browse latest Browse all 57744

Trending Articles