Adding A Database to Alchemy Server With The API
Recently I got the following comment on Twitter, regarding my post on building a custom MMC for building Alchemy databases remotely:
Can the mmc trick be implemented to add db’s to Alchemy Server instead of havin to do it manually? or, can it be automated?
The problem is that albatch can only really do what the Administrator application can do. The only real way around that is to use the API, and specifically the AuServerApi. You can use this in whatever language you like. Perhaps Powershell is convenient for you, or VB/VB.Net, or something else. I like to use C# with the Alchemy API. So below is some code for creating a database and then adding it to the Alchemy Server. I wrote this a few years ago for the Captaris Partner Conference in Kuala Lumpur, Malaysia.
As you can see, actually adding the database to the server is as simple as connecting to the server and then calling AddDatabase.
static Alchemy.Application auApp = new Alchemy.Application(); static AuServerApi.ApplicationClass auServer = new AuServerApi.ApplicationClass(); if (args.Length>0) { string dbName = args[0]; if (dbName.ToLower().EndsWith(".ald")) dbName = dbName.Substring(0, dbName.IndexOf(".")); string dbPath = "c:\\databases\\" + dbName + ".ald"; Alchemy.Database auDB = auApp.CreateDatabase(dbPath, dbName, "", false, "", "", "", false); auApp.Databases.Remove(dbPath); auDB.Logout(); auServer.Connect("capadev", 0, 0, 0); auServer.AddDatabase(dbPath); } else Console.WriteLine("Please enter a database name");
I hope this is helpful. If you have any questions about any other Rightfax or Alchemy topics (or Workflow), let me know. You can do that on here or contacting me on Twitter where I am technovangelist.
Related posts:


February 16, 2010 

This looks very interesting and helpful!
I have a very complicated installation on one of my clients and they’re driving me crazy with issues like “automating the adding of DB’s to the Alchemy Server” or how to use Remote Access, which I haven’t been able to make it work yet. I’m not quite sure why it doesn’t work, but I bet it’s because the rare installation they required. They have the Alchemy Server and the SQL DB on different servers (getting this to work was really hard, because they wanted to use an existing SQL, creating a new instance and a specific user…) Also, they have a novell network and the closest thing they have to an Active Directory is a NT traditional Domain. Now, with the remote access, although the user has full access over the Alchemy Server (being member of Administrators group) they get an error message: Impossible to access the Alchemy Server Service on the requested machine. And even more weird is that in the registry, the key HKLM/SOFTWARE/INFORMATION MANAGEMENT RESEARCH, INC./Alchemy Server doesn’t exists at all (along with other sub keys). I checked this because I wanted to see what was the value of the key AdminGroup.
I know this has not much to do with the initial topic, but if you have any clue why could this be happening (the remote access error), I’d be really greatful!
I’m sorry to bother you so much, but you seem to be one of the few people that really has an idea of how this works!
Thank you very much for your help!
Regard,
Christine.
Hmm, which version of Alchemy is this? When you say Remote Access, are you referring to web access??
I don’t have a running VM with Alchemy on it right now as I am doing some research on redundancy options with Rightfax, but I can look into it in a few days. I want to say if it’s a brand new server (not an upgrade) the reg key might be captaris instead of Information Management Research., but again my alchemy vm’s are zipped up right now.
Also, not sure if it helps, but you might want to look at this entry on adding local users to a role in Alchemy Server using Powershell. I wrote it nearly four years ago on my personal weblog but it all should still apply:
http://technovangelist.com/blog/using-powershell-to-manage-alchemy-add-local-users-to-a-role.html
Matt, I refer to Remote Access Administrator, the tool that comes with the install DVD that can be used to remotely administrate the Server. It uses mmc to add the server throught it’s IP.
My client doesn’t work with Alchemy Web.
Regarding the reg key, you’re right! I forgot they had one of the latest version (8.2 SP4). So the key probably is under CAPTARIS. Thank you!
For the rest, my client is not implementing integrated security. The user they are trying to use to administrate remotely the server is a user that it is within the server domain (even though it is no Active Directory).
The link you sent my, it’s very interesting anyway.
I’ll save it, along with the other one about adding db’s to the server automatically through the API.
Thank you very much for your help!
Regards,
Christine
Matt, thanks for this code, but have tried it an get a strange error message when I issue the AddDatabase command.
“Value does not fall with expected range”
obviously the only thing being passed in the AddDatabase call is the full path to the ALD file.
Here is the code:
Dim auServer As AuServerApi.Application
auServer = New AuServerApi.Application
auServer.Connect(“Alchemy”, 3234, 0, 0)
auServer.AddDatabase(TextBox1.Text)
auServer.Disconnect(0)
Any hints would be gratefully received.
John
Hmm, the only thing I can think of off the top of my head is that the database doesn’t exist. Did you already create the database?? It has to be created first in the client or Alchemy.Application.
Matt – yes the database gets created ok. The call appears to start putting the database under server control it even creates the .AUS file in the database directory, but blank and errors.
Hello guys i need help about the alchemy version 4.1.
is there i ways for me to view the index of the data stored in it and retrieved the images that is stored in the software. i badly need you help guys. its been a month since i start research about the .ALD database used by alchemy and still im clueless on how to extract the data and indexes stored in it…
help me please…
Wow, Alchemy 4.1?? The current version is 8.3 and Captaris took over IMR back with 7.x about 5 years ago. I would like to think that the current processes work on databases that old, but I really cannot be sure. I think your best bet is to contact our Support Department so they can help you.
This article was specifically about the Alchemy Server, but I don’t think that existed in the Alchemy 4.x timeframe.
Sir Matthew, is there a way for me view the database of the alchemy in some different software.
The .ALD database of alchemy has no enough article over the net that can help me in viewing the database.
I’m not able to open the BUILD application of the alchemy i’m trying to install it but problems prompt. all i have now is the SEARCH where i can see the files stored in the database.
Hoping for response again sir.
Sincerely,
Bernard Brillo
I would love to help you clarify any questions you have with this particular blog post, but it seems that you have a question that really should go to support. Our support team would be happy to help you out with the installation issues you are having.
Maybe I can help, Bernard. Send me an email and I’ll see what can be done…
Hi Luis,
I know this is relatively an old post but I got the same problem with version 4.1 as Bernard. Please let me know if something came out with your discussion.
Thanks,
Enrico
Matthew, The following command line:
auServer.AddDatabase(dbPath);
Works when running the applicaion under Windows XP
When I run the same application under Windows 7 I get:
“Value does not fall within the expected range”
How can I get to run under Windows 7
Can you help
Thanks
Hi Juan,
thanks for the comment. I haven’t tried any of my code samples under Win7 but I am planning to do so in the coming weeks. When I do, I will let you know.