Difference between revisions of "Quickbooks Database Server Manager"

From Steak Wiki
Jump to navigationJump to search
Line 10: Line 10:
  
 
The RPM will unpack two main directories. in /opt it will put two folders for the binaries. In /etc, it will put an init.d script, and a logrotate.d script. There are also configuration files in /opt/. Additionally, the .qbw.TLD, .qbw.DSN, .qbw.ND files contain paths relevant to the QB DB manager (in plain text for the latter two). However, you can delete them before the first run of the .qbw file, and the server will generate them. Do not delete them while the DB is being accessed or you can crash QB. There is a qbdir.dat file that the db server will generate as well, that also has path info.
 
The RPM will unpack two main directories. in /opt it will put two folders for the binaries. In /etc, it will put an init.d script, and a logrotate.d script. There are also configuration files in /opt/. Additionally, the .qbw.TLD, .qbw.DSN, .qbw.ND files contain paths relevant to the QB DB manager (in plain text for the latter two). However, you can delete them before the first run of the .qbw file, and the server will generate them. Do not delete them while the DB is being accessed or you can crash QB. There is a qbdir.dat file that the db server will generate as well, that also has path info.
 +
 +
==Install Steps==
 +
This will get its own article, as its a bit of steps -> [[Installing Quickbooks Database Server Manager on Linux]]. Essentially, I have tested Centos 7. You will need samba installed, SELinux either off, or configured, and iptables addressed along with users. This is all easy.
  
 
==How to resolve H202 Error in Quickbooks Database Server with Linux==
 
==How to resolve H202 Error in Quickbooks Database Server with Linux==

Revision as of 08:22, 11 December 2019

Quickbooks Database Server Manager by Intuit, supposedly also runs on GNU\Linux. I've spent some 10-20 hours trying to get it to work (with limited success) and here's what I know. This program supports QB Enterprise clients only (I have read).

Overview

What QB Database server manager for Unix is, is Sybase SQL Anywhere. It appears to be tailored to Quickbooks. There are two programs:

  • qbfilemonitord
  • qbdbmgr_##

The number refers to your edition of QB. 2014, uses QBDBMGR_24.

The program is offered in an RPM format. It is possible to convert the RPM to a .DEB and install it on Debian. However there are integrated commands that will fail (a ps -efff which searches the task list for the port and ip of qbdbmgr), so its best run in RHEL. The program is a pair of 32 bit binaries, so it's either run in 32 bit or you can install 32-bit compatibility libraries in 64-bit mode.

The RPM will unpack two main directories. in /opt it will put two folders for the binaries. In /etc, it will put an init.d script, and a logrotate.d script. There are also configuration files in /opt/. Additionally, the .qbw.TLD, .qbw.DSN, .qbw.ND files contain paths relevant to the QB DB manager (in plain text for the latter two). However, you can delete them before the first run of the .qbw file, and the server will generate them. Do not delete them while the DB is being accessed or you can crash QB. There is a qbdir.dat file that the db server will generate as well, that also has path info.

Install Steps

This will get its own article, as its a bit of steps -> Installing Quickbooks Database Server Manager on Linux. Essentially, I have tested Centos 7. You will need samba installed, SELinux either off, or configured, and iptables addressed along with users. This is all easy.

How to resolve H202 Error in Quickbooks Database Server with Linux

Per the Quickbooks FAQ page on this, adding a hard coded hostname for the ip address of the DB server should eliminate this error. It goes in the hosts file of Windows (C:\Windows\System32\drivers\etc\hosts).

How to resolve the "QBDB_ARGUMENT_ERROR: FixNDAndPermissions request sent to Linux" Error

Not sure yet. It seems that it can be ignored.

What others have done

https://dave.umry.sh/posts/quickbooks_linux/ From what I can tell, he didn't test enough. It's easy to open a DB file in single user mode, but a functioning multi user mode is what we are after. Actually, if you want to run QB DB Server in single user mode, it's easy in GNU\Linux. Multi user is where things start getting ugly.

Programs

QBDBMGR_##

This is the Sybase SQL Anywhere program. This can be run in the foreground, but there are a number of flags that can be used to adjust it. Lots. This makes running it from the shell non-trivial.

qbmonitord

This program can be run in the foreground and has additional verbosity available beyond the logs. There is an /opt/qb/util/qbmonitord.conf that contains the path of the QB workbook (requires editing).

Logging

See /var/log/messages in Centos, or run the programs in the foreground.

Working Exchange between DB and Client workstation

It appears possibly the FixNDAndPermissions error can be ignored.

[root@qbtestsrv user1]# tail -F /var/log/messages
Dec 10 22:05:01 qbtestsrv journal: qbmonitord daemon[1373]: Response sent from QBDBPF server
Dec 10 22:05:10 qbtestsrv journal: qbmonitord daemon[1373]: Accept is successful! Client connection accepted
Dec 10 22:05:10 qbtestsrv journal: qbmonitord daemon[1373]: Message received at server.
Dec 10 22:05:10 qbtestsrv journal: qbmonitord daemon[1373]: GetServerPort request received at QBDBPF server
Dec 10 22:05:10 qbtestsrv journal: qbmonitord daemon[1373]: Found the port 55358 in root      1369     1  1 21:42 ?        00:00:22 /opt/qbes20/SYBSs$
Dec 10 22:05:10 qbtestsrv journal: qbmonitord daemon[1373]: Response sent from QBDBPF server
Dec 10 22:05:10 qbtestsrv journal: qbmonitord daemon[1373]: Accept is successful! Client connection accepted
Dec 10 22:05:10 qbtestsrv journal: qbmonitord daemon[1373]: Message received at server.
Dec 10 22:05:10 qbtestsrv journal: qbmonitord daemon[1373]: QBDB_ARGUMENT_ERROR: FixNDAndPermissions request sent to Linux
Dec 10 22:05:10 qbtestsrv journal: qbmonitord daemon[1373]: Response sent from QBDBPF server
Dec 10 22:07:09 qbtestsrv journal: qbmonitord daemon[1373]: Accept is successful! Client connection accepted
Dec 10 22:07:09 qbtestsrv journal: qbmonitord daemon[1373]: Message received at server.
Dec 10 22:07:09 qbtestsrv journal: qbmonitord daemon[1373]: GetServerPort request received at QBDBPF server
Dec 10 22:07:09 qbtestsrv journal: qbmonitord daemon[1373]: Found the port 55358 in root      1369     1  1 21:42 ?        00:00:24 /opt/qbes20/SYBSs$
Dec 10 22:07:09 qbtestsrv journal: qbmonitord daemon[1373]: Response sent from QBDBPF server

Example of an (almost) functioning QB DB Server on Centos 7 with QBDBMGR 24

Dec 10 22:34:30 qbtestsrv journal: qbmonitord daemon[1373]: Response sent from QBDBPF server
Dec 10 22:34:32 qbtestsrv SQLAnywhere(qb_qbtestsrv_24): Starting database "b41d52cd3d3b480e88bc715443ab91e8" (/share/quickbooks/testco4.qbw) at Tue D$
Dec 10 22:34:33 qbtestsrv SQLAnywhere(qb_qbtestsrv_24): Transaction log: testco4.qbw.TLG
Dec 10 22:34:33 qbtestsrv SQLAnywhere(qb_qbtestsrv_24): Starting checkpoint of "b41d52cd3d3b480e88bc715443ab91e8" (testco4.qbw) at Tue Dec 10 2019 22$
Dec 10 22:34:33 qbtestsrv SQLAnywhere(qb_qbtestsrv_24): Finished checkpoint of "b41d52cd3d3b480e88bc715443ab91e8" (testco4.qbw) at Tue Dec 10 2019 22$
Dec 10 22:34:33 qbtestsrv SQLAnywhere(qb_qbtestsrv_24): Database "b41d52cd3d3b480e88bc715443ab91e8" (testco4.qbw) started at Tue Dec 10 2019 22:34
Dec 10 22:34:33 qbtestsrv SQLAnywhere(qb_qbtestsrv_24): LIN: Login for 41646d696e on connId 21
Dec 10 22:34:33 qbtestsrv SQLAnywhere(qb_qbtestsrv_24): CON: Connect for 41646d696e
Dec 10 22:34:33 qbtestsrv SQLAnywhere(qb_qbtestsrv_24): LIN: Login for 41646d696e on connId 22
Dec 10 22:34:33 qbtestsrv SQLAnywhere(qb_qbtestsrv_24): LIN: Users logged in: 0, effective file mode: 2 (SU=0, MU, NoMode)
Dec 10 22:34:34 qbtestsrv SQLAnywhere(qb_qbtestsrv_24): LIN: Started conn pool with file mode: 1 (SU=0, MU, NoMode)
Dec 10 22:34:34 qbtestsrv SQLAnywhere(qb_qbtestsrv_24): CON: Connect for 41646d696e
Dec 10 22:34:34 qbtestsrv SQLAnywhere(qb_qbtestsrv_24): DIS: Disconnect for 41646d696e
Dec 10 22:34:34 qbtestsrv SQLAnywhere(qb_qbtestsrv_24): DIS: Disconnect for 41646d696e
Dec 10 22:34:34 qbtestsrv SQLAnywhere(qb_qbtestsrv_24): DIS: Cleanup for 41646d696e (0/0/1)
Dec 10 22:34:34 qbtestsrv SQLAnywhere(qb_qbtestsrv_24): DIS: Recovery data updated
Dec 10 22:34:34 qbtestsrv SQLAnywhere(qb_qbtestsrv_24): Starting checkpoint of "b41d52cd3d3b480e88bc715443ab91e8" (testco4.qbw) at Tue Dec 10 2019 22$
Dec 10 22:34:34 qbtestsrv SQLAnywhere(qb_qbtestsrv_24): Finished checkpoint of "b41d52cd3d3b480e88bc715443ab91e8" (testco4.qbw) at Tue Dec 10 2019 22$
Dec 10 22:34:34 qbtestsrv SQLAnywhere(qb_qbtestsrv_24): Database "b41d52cd3d3b480e88bc715443ab91e8" (testco4.qbw) stopped at Tue Dec 10 2019 22:34

The error at this junction is: One user can login in multi user mode. Try to have a second user in, and it says on Win desktop #2

"quickbooks unable to open file, another user is opening it..."

Error code: -6000, -816 https://quickbooks.intuit.com/learn-support/en-us/open-programs/resolve-error-6000-when-opening-a-company-file/00/200822 This page does not address error 6000, 816. I have a mystery error...

Tips/Tricks

Using Sybase tools to discover QB databases

Yes, it is possible to use Sybase tools to discover QB DBs hosted by GNU\Linux on the LAN. You should also technically be able to connect, though I'm not sure what QB uses for credentials.

e.g. Sybase Central 6, has a Connect with Sql Anywhere 12 option.

Can you use a more recent QBDBMGR with older QB?

This doesn't work. Even if you fool some of the scripts (init.d) into thinking it is the same Database version required by your QB, there are additional checks that will get you. It's best to use the one supported for your QB. Intuit deleted some off their website recently, so possibly support can provide them. That would be called built in obsolescence.

Why not use Docker to install QB DB Manager

Good idea, but I didn't have any luck down this path. I need to try again.

Will Wine work with the Win DB manager?

Who knows? Another path to try.