Environment
Novell iPrint for NetWare
Situation
Errors returned when attempting to load NDPSM.NLM
NDPS Manager database corruption suspected.
How to rebuild a corrupt NDPS Manager database using PAGen3.exe.
How to recover from a corrupt PSM database.
NDPS Manager database corruption suspected.
How to rebuild a corrupt NDPS Manager database using PAGen3.exe.
How to recover from a corrupt PSM database.
Resolution
There are multiple reasons NDPSM will fail to load. The main reasons are:
Advantages of restoring a backup copy of the database:
Identify Correct .PSM Directory
Before recovering from NDPS Manager database corruption, identify the .PSM directory that is associated to the NDPS Manager object in eDirectory. There are several ways to accomplish this:
1. View .PSM Directory through Windows Explorer:
2. View .PSM path through Server Console:
3. View .PSM path through ConsoleOne:
Option 1: Recover database from backup
NDPSM.NLM routinely creates backup copies of the Print Manager database file (psmdb.dat). Various copies of those .dat files are stored up to 40 days. They exist in the VOL:\NDPS\XXXXXXXX.PSM directory. The pattern of these files are:
Option 2: Use the Printer Agent Generator Tool (PAGen) to create a fresh database
If the server is running NDPSM.NLM dated 10MAR2004 or later AND a PADBTXT.CSV exists on the server, then you can use PAGen to create a fresh database with all of the original printer agents. Download the Printer Agent Generator tool (PAGen3.exe) and read the associated documentation. Also, the steps below will be helpful in guiding you through the process of:
This operation will recreate all of the Printer Agents listed in the CSV and associate them to their corresponding NDS printer objects. A PAGen log file will be created to the same directory which PAGen2.exe was executed. The log file will show a summary of the operation and errors.
- Corrupt NDPS Manager Database
- NDPS NLM problems
- NDS problems
Advantages of restoring a backup copy of the database:
- Fast and easy
- Printer Driver Profile data and associations will stay intact
- The corruption may have existed prior to the earliest copy of the database.
- Many changes (new printer agents created) may have occurred since the last *good* copy of the database.
- Guaranteed non-corrupt copy of the Print Manager database (psmdb.dat).
- Like the restore option, eDirectory objects are not deleted or recreated.
- Significant understanding of the tool is required.
- Printer Driver Profile data and associations will be lost. (see Additional Information below)
- PAGen does not support public access printers. (see Additional Information below)
- PAGen does not support the old Novell gateway. (see Additional Information below)
Identify Correct .PSM Directory
Before recovering from NDPS Manager database corruption, identify the .PSM directory that is associated to the NDPS Manager object in eDirectory. There are several ways to accomplish this:
1. View .PSM Directory through Windows Explorer:
Using Windows Explorer, browse to the location of the NDPS Manager database files.
The location will be [VOL]\NDPS\XXXXXXXX.PSM. There is a .PSM directory for every Manager ever created on that server. Therefore, you may need to examine the contents of the .PSM directory to confirm that you are viewing the correct Manager database. There will be a .PA sub-directory for every printer agent on that NDPS Manager database. Also, viewing the creation date of the .PSM directory may help you determine which .PSM directory is correct.
The location will be [VOL]\NDPS\XXXXXXXX.PSM. There is a .PSM directory for every Manager ever created on that server. Therefore, you may need to examine the contents of the .PSM directory to confirm that you are viewing the correct Manager database. There will be a .PA sub-directory for every printer agent on that NDPS Manager database. Also, viewing the creation date of the .PSM directory may help you determine which .PSM directory is correct.
2. View .PSM path through Server Console:
If the Manager is able to load, then you can determine the exact .PSM directory by:
- Go to the NDPS Manager screen on the server console
- Hit ENTER on NDPS Manager Status and Control
- Hit ENTER on Database Options
- Hit ENTER on Examine Database
- Make note of the database location
3. View .PSM path through ConsoleOne:
- Launch ConsoleOne.exe
- Open the Properties of the NDPS Manager object
- Click the "Other" tab
- View the "Database Dir Path" and "Database Volume"
Option 1: Recover database from backup
NDPSM.NLM routinely creates backup copies of the Print Manager database file (psmdb.dat). Various copies of those .dat files are stored up to 40 days. They exist in the VOL:\NDPS\XXXXXXXX.PSM directory. The pattern of these files are:
- PSMDBSAV is of 1AM that morning.
- PSMDBSV1 is a copy from 10 days ago.
- PSMDBSV2 is a copy from 20 days ago.
- PSMDBSV3 is a copy from 30 days ago.
- PSMDBSV4 is a copy from 40 days ago.
- Ensure that NDPSM.NLM is unloaded
- Using Windows Explorer, browse to the .PSM directory. (Read the "Identify Correct .PSM Directory" note above)
- Move the suspected corrupt PSMDB.DAT files to a safe location.
- Choose which backup file (.DAT) you would like to use.
- Rename the backup pair .DAT file to PSMDB.DAT.
- Load NDPSM
Option 2: Use the Printer Agent Generator Tool (PAGen) to create a fresh database
If the server is running NDPSM.NLM dated 10MAR2004 or later AND a PADBTXT.CSV exists on the server, then you can use PAGen to create a fresh database with all of the original printer agents. Download the Printer Agent Generator tool (PAGen3.exe) and read the associated documentation. Also, the steps below will be helpful in guiding you through the process of:
- deleting the corrupt PSM database
- Using PAGen to auto-creating a fresh PSM database with all of the original printer agents and associate those printer agents to the existing NDS printer objects.
- Download PAGen by going to Novell's File Finder and searching for PAGen3.exe
- Unload NDPSM, if it is loaded.
- Using Windows Explorer, browse to the .PSM directory. (Read the "Identify Correct .PSM Directory" note above)
- Copy PADBTXT.CSV to the root of C: on your workstation
- Copy PAGen3.EXE to the root of C: on your workstation
- Move all the contents of the XXXXXXXX.PSM directory to safe location, leaving the .PSM directory on the server empty. NDPSM.NLM must be unloaded for the files to move. If Windows still won't let you move the files, then:
- Right-click the file that can't be moved, and choose properties.
- Uncheck the "transactional" flag, and click OK.
- Load NDPSM.NLM.
- If the /dnsname switch was used with the previous Print Manager, be sure to include the /dnsname switch when loading now.
- If you are unsure if the Print Manager was previously loaded with the /dnsname switch, view a workstation that has an iPrint printer installed. What shows after the ipp:// ? DNS name? Or IP address?
- After loading NDPSM, a new PSMDB.DAT will be created and the list of printer agents will be blank
- Ensure the NDPS Component is installed to the workstation.
- Your workstation must have the Novell Client installed with the NDPS Component and a Primary connection to the NDPS Manager tree. To confirm this:
- Right-click the RED N
- Choose "NetWare Connections..."
- Under the Resource column, look for the tree where the NDPS Manager object resides with an asterisk (*) next to the name.
- Your workstation must have the Novell Client installed with the NDPS Component and a Primary connection to the NDPS Manager tree. To confirm this:
- Run the PAGen Associate Operation within a command prompt as follows:
This operation will recreate all of the Printer Agents listed in the CSV and associate them to their corresponding NDS printer objects. A PAGen log file will be created to the same directory which PAGen2.exe was executed. The log file will show a summary of the operation and errors.
Additional Information
Public Access Printer Agents
If a Public Access printer agent is displayed in the CSV file (empty value in the "NDS Printer Object" column), PAGen will not execute. PAGen will report:
Invalid NDS printer object name in row [x].
There are several ways to get around this condition. One method is to comment (#) the row with the Public Access printer entry, then address those printers manually or use PAGen in the "create" mode with an NDS value populated.
Printer Agents configured for the Old Novell Gateway
Printer Agents using the Old Novell Port Handler Gateway will have incorrect Gateway Load String information. The Old Novell Gateway shows NDPDS as the Gateway Load String. This is insufficient to cause a Printer Agent to communicate with a physical printer on the network. You will either need to manually create these Printer Agents or you can modify the Gateway Load String column (column 6 in the CSV file) to instruct the PA to load the new Novell Gateway (NDPSGW.NLM). The format to use in this column is:
NDPSGW PORT=LPR HOSTADDRESS=[the ip address of your printer] PRINTERNAME=PASSTHROUGH
or
NDPSGW PORT=RAW HOSTADDRESS=[the ip address of your printer]
for example:
NDPSGW PORT=LPR HOSTADDRESS=232.73.158.151 PRINTERNAME=PASSTHROUGH
or
NDPSGW PORT=RAW HOSTADDRESS=232.73.158.151
Printer Driver Profiles not supported
Printer Driver Profile (PDP) data is stored in the psmdb.dat. The printer agent association to those PDPs is also stored in the psmdb.dat. The CSV file does not include that data. Therefore, when recreating the Print Manager database file using PAGen, both the PDP data and associations will be lost.
If a Public Access printer agent is displayed in the CSV file (empty value in the "NDS Printer Object" column), PAGen will not execute. PAGen will report:
Invalid NDS printer object name in row [x].
There are several ways to get around this condition. One method is to comment (#) the row with the Public Access printer entry, then address those printers manually or use PAGen in the "create" mode with an NDS value populated.
Printer Agents configured for the Old Novell Gateway
Printer Agents using the Old Novell Port Handler Gateway will have incorrect Gateway Load String information. The Old Novell Gateway shows NDPDS as the Gateway Load String. This is insufficient to cause a Printer Agent to communicate with a physical printer on the network. You will either need to manually create these Printer Agents or you can modify the Gateway Load String column (column 6 in the CSV file) to instruct the PA to load the new Novell Gateway (NDPSGW.NLM). The format to use in this column is:
NDPSGW PORT=LPR HOSTADDRESS=[the ip address of your printer] PRINTERNAME=PASSTHROUGH
or
NDPSGW PORT=RAW HOSTADDRESS=[the ip address of your printer]
for example:
NDPSGW PORT=LPR HOSTADDRESS=232.73.158.151 PRINTERNAME=PASSTHROUGH
or
NDPSGW PORT=RAW HOSTADDRESS=232.73.158.151
Printer Driver Profiles not supported
Printer Driver Profile (PDP) data is stored in the psmdb.dat. The printer agent association to those PDPs is also stored in the psmdb.dat. The CSV file does not include that data. Therefore, when recreating the Print Manager database file using PAGen, both the PDP data and associations will be lost.
NOTE: This limitation does not exists in the disaster recovery tool for iPrint on Linux.
New feature introduced with PAGen3 - validate:
PAGen version 3 introduce a new operation of validate. When run in this mode, PAGen does not execute anything, but rather evaluates the driver paths listed in the CSV to check if they exist in Broker defined in the PAGen command switch. Novell recommends you run in the validate operation prior to running in the associate or create mode.
Example syntax:
pagen3 /psm=.nameofPSM.OU.OU.O /broker=.nameofbroker.OU.OU.O /tree=yourTreeName /operation=validate /CSVfile=padbtxt.csv