Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Fault tolerant printer shares 1

Status
Not open for further replies.

fyrewyr

IS-IT--Management
Feb 18, 2003
29
IN
We have two domain controllers with printers shared via Active Directory. The upgrade from NT4 was mostly flawless, but we were disappointed that we weren't able to easily create some fault-tolerance features with AD, e.g.:

Let's say we have:

BigBadServer LittleBadServer
ProdPrinter ProdPrinter

The share name is the same, as it serves the same printer. Everyone maps their "Production Printer" to \\BigBadServer\ProdPrinter (even when you select it from AD, this is the client path you get). Now let's say BigBadServer gets blown up (this isn't so far from the truth).

Now, we have 100 client machines who don't print until they MANUALLY remap to LittleBadServer. This is an emergency, because 90% of our users click randomly as soon as anything unexpected happens. We've considered drop-in server aliases, scripting, registry changes, mapping both printers, and all sorts of stupid things (I even poked around in file replication dynamic paths) that would be solved if we could simply:

Modify some link in AD to point SomePrinterPointerObject to LittleBadServer\Share, instead of futzing with "\\Server\Share" at the CLIENT.

Clients are mostly Win98 with ADSI, handful of 2K Pro, a few XP. Presently two DC's, and one, ah, forest. This seems so basic, and I think semi-automatic scripting is the only "free" solution we have. Any thoughts?
 
Hi.

I am trying to find an answer to a very similar question and have only come across a tech document from Microsoft for Win2K Advanced Server. The doc lists out using clusering in one small paragraph. I'll post more to this when I find info.

Ben P. Boston Capital
 

Aha.

I wrote a quick VB Script to look for instances of a printer on the client machine, delete the BigBadServer instance, and readd it under the LittleBadServer. It runs as part of login to redirect printers to the other server.

Notes on this script. It looks for the EXACT reference to the printer, so I had to make sure that the master list names (from FS1 or my 'BigBadServer') matched the client's list. Then, because the text between quotes is literal/case-sensitive, I had to account for variations (fs1, FS1, Fs1) to cover my bases. Adding the printer is not case-sensitive nor did it matter case on the servername. Just make sure the printer is setup on the new server with the same name (non-case-dependent).

--sample follows---

Set oNet = CreateObject("WScript.Network")
Set oPrtDic = CreateObject("Scripting.Dictionary")

on error resume next

'sets up list of printers on client.

Err.Clear
Set usrprt = oNet.EnumPrinterConnections
If Err.Number = 0 Then
For i = 0 To usrprt.Count - 1 Step 2
oPrtDic.Add usrprt.Item(i + 1), i
Next
End If

'Dim variable to max number of instances of printers.
Dim Printer(40)

'Printer list follows.
Printer(0)="Antietam"
Printer(1)="Belushi"
Printer(2)="Bennington"
Printer(3)="Boxer"
Printer(4)="Cabot"
Printer(5)="Constellation"
Printer(6)="Coral Sea"
Printer(7)="Cowpens"
Printer(8)="Destroyer"
Printer(9)="Endeavor"
Printer(10)="Enterprise"
Printer(11)="Farley"
Printer(12)="Forrestal"
Printer(13)="Hendrix"
Printer(14)="Hornet"
Printer(15)="Independence"
Printer(16)="Intrepid"
Printer(17)="Joplin"
Printer(18)="Kearsarge"
Printer(19)="Langley"
Printer(20)="Leyte"
Printer(21)="Mayflower"
Printer(22)="Midway"
Printer(23)="Monroe"
Printer(24)="Morrison"
Printer(25)="Nimitz"
Printer(26)="Oriskany"
Printer(27)="Phoenix"
Printer(28)="Ranger"
Printer(29)="Reliance"
Printer(30)="SAIPAN"
Printer(31)="San Jacinto"
Printer(32)="Saratoga"
Printer(33)="Sentry"
Printer(34)="SHANGRI-LA"
Printer(35)="Tarawa"
Printer(36)="Titanic"
Printer(37)="Voyager"
Printer(38)="Yorktown"
Printer(39)="Zebra"
Printer(40)="Cobain"

'sets up for next stmt to cover all instances of the variable. this removes the downed server printer instance and adds the current server.

For PCount=0 to UBound(Printer)

If oPrtDic.Exists("\\fs1\" &Printer(PCount)) Then
oNet.RemovePrinterConnection "\\fs1\" &Printer(PCount), true, true
oNet.AddWindowsPrinterConnection "\\sf1\" &Printer(PCount)
End If

If oPrtDic.Exists("\\FS1\" &Printer(PCount)) Then
oNet.RemovePrinterConnection "\\FS1\" &Printer(PCount), true, true
oNet.AddWindowsPrinterConnection "\\sf1\" &Printer(PCount)
End If

If oPrtDic.Exists("\\Fs1\" &Printer(PCount)) Then
oNet.RemovePrinterConnection "\\Fs1\" &Printer(PCount), true, true
oNet.AddWindowsPrinterConnection "\\sf1\" &Printer(PCount)
End If

Next

Wscript.Quit (0)
 
Thanks, I did see some scripting that had the beginnings of this at MSDN, but I wanted to bounce it off the forum first; thank you very much for posting code...though I haven't tested it, it's clear you spend a few minutes on it, and it's helpful to me.
 
What about printer pooling? As long as the printers are the same ( use the same driver) and are physically located in the same area, you could pool the printers so that jobs will go to one or the other printer, based upon availability.
 
I had a similar scinario but how to get users working within minutes if their file server blew up! Firstly I ran replications of the file server to a backup file server. Then I used DFS to map their data drives. In the event of a crash all I have to do is edit the DFS tree entry to point to the backup server and everyones working again within 5 minutes! Haven't tried mapping printers via DFS but it's worth a go. Glenn
BEng A+ MCSE CCA
 

danmoran:
Thank you for your suggestion. One of the first things I considered was this approach, but we don't need redundant printers (they're spread all over the building) - we need redundant connections (on multiple servers) to the *same* printer (ideally with automatic fallover - just like printer pooling would provide). The only world solutions I found were expensive, or required clustering.

SelbyGlenn:
Thank you, as well. I did toy with DFS links to this printer, but this ended up failing spectacularly. I distinctly remember that the server was none-too-pleased about this attempt at sharing a device as a dynamic link; though I don't recall how it manifested. It took some effort to get the entry removed, too. However, I'm willing to admit that my approach was flawed; if you do resolve this using DFS, I'm all ears.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top