PrinterOn KB Powered By ePRINTit USA

How to prevent printer number collisions using SQL - c06413081

Description of

When creating printers within PrinterOn Enterprise deployed in On-Premise mode, the printer numbers are not randomly generated - every deployment uses the same sequence of numbers in order. For example, Auto-Generated Printer 1 will always be printer number 900005228231. With 4.1.4 and earlier, there are technical limitations when deploying multiple instances of PrinterOn within the same network. If 2 or more printers share the same printer number, then this can cause native iOS/macOS print to fail. In instances where there is only a single PrinterOn implementation, it's unlikely that there will ever be duplicate printer numbers. Because of this, the limitation mostly applies to instances in PrinterOn's internal corporate network. SQL can be used to prevent these collisions, by modifying the assignment of custom printer numbers. In order to modify the printer numbers in CPS, you will first need to download Microsoft SQL Server Management Studio onto the server that hosts your PrinterOn server.

Log into Microsoft SQL Server Management Studio

Under "Server Name", select the drop-down list and click on "Browse for More". From here, you can select your database. It should log you in automatically using your Windows credentials. If you've installed SQL Express on the same server, the Server Name should already be set to your local server.

How To Change The Printer Number

Once logged in, Expand the Database folders until you find the dbo.PRINTER table. The printer numbers are stored in the ALIAS_NUM column of this table. Running an UPDATE query will allow you to add a random sum to the printer number, or assign a customized printer number. Once these changes have been made, you will need to restart all PrinterOn services from the Services tab of PrinterOn Configuration Manager.

Sample Query

UPDATE table_name SET ALIAS_NUM = ALIAS_NUM + 92849283; To run this query, select the dbo.PRINTER table from the Object Explorer and click the New Query button and then type in your UPDATE command:

NOTE:

In PrinterOn Enterprise, the printer ID is always higher than 9000000000. The first digit in a printer number tells PrinterOn what kind of printer this is. PrinterOn Public printers begin with 3 while On-Premise printers begin with 9.