Deploying database from a web app

Packages and compresses schema and contents of SQL Server databases

Moderators: JonathanWatts, Chris Auckland, David Atkinson, david connell, Anu Deshpande, Michelle Taylor, james.billings, Marianne

Deploying database from a web app

Postby scootdawg » Thu Aug 20, 2009 4:47 pm

Ok, so I'm trying to create an application that a sales person can go and fill out a form with some info and then it creates a database from that info.

Here's the code I use:
Code: Select all
            Process myProcess = new Process();
            ProcessStartInfo myProcessStartInfo = new ProcessStartInfo();

            myProcessStartInfo.FileName = Server.MapPath("ImageDB.exe");
            myProcessStartInfo.WindowStyle = ProcessWindowStyle.Hidden;
            myProcessStartInfo.CreateNoWindow = true;
            myProcessStartInfo.UseShellExecute = false;
            myProcessStartInfo.RedirectStandardOutput = true;
            myProcessStartInfo.Arguments = "/server:dblocation /database:customerdb /username:user /password:password /quiet";
            myProcess.StartInfo = myProcessStartInfo;
            myProcess.Start();
            myProcess.WaitForExit();
            StreamReader myStreamReader = myProcess.StandardOutput;
            string myString = myStreamReader.ReadToEnd();
            Response.Write(myString);
            myProcess.Close();


when I run the code, I get the following error:

"Red Gate SQL Packager 'ImageDB' Error: File or assembly name ImageDB.exe, or one of its dependencies, was not found. "

I verified that the file is in the correct directory and that my process is pointing to that directory.

Does anyone know what's going on?

Thanks in advance!
scootdawg
 
Posts: 4
Joined: Thu Aug 20, 2009 3:12 pm

Postby Brian Donahue » Thu Aug 20, 2009 4:59 pm

I can think of two possibilities right away. One happens if the package is created with compression. If that's true, then the package creates a copy of zlib1.dll in a temporary folder and references it dynamically to do the decompression. The other is the fact that if the packaged script gets larger than 100MB, a seperate satellite DLL is built for every 100MB of script, and the dlls have to be deployed in the same folder as the script.

Strapping fileMon to the ASP .NET worker process or using Fusion logging will probably tell you exactly which file it is trying to load.
Brian Donahue
 
Posts: 6670
Joined: Mon Aug 23, 2004 10:48 am

any other ideas?

Postby scootdawg » Mon Aug 24, 2009 2:44 pm

Fusion logging doesn't show anything and I tried creating a non-compressed version and I still have the problem.
scootdawg
 
Posts: 4
Joined: Thu Aug 20, 2009 3:12 pm

Postby Brian Donahue » Mon Aug 24, 2009 3:23 pm

Does it work if you recreate the package and do not use the "compression" option?
Brian Donahue
 
Posts: 6670
Joined: Mon Aug 23, 2004 10:48 am

nope

Postby scootdawg » Mon Aug 24, 2009 4:07 pm

I tried that and it still doesn'twork
scootdawg
 
Posts: 4
Joined: Thu Aug 20, 2009 3:12 pm

Postby Brian Donahue » Mon Aug 24, 2009 4:17 pm

Are you absolutely sure that this is the latest version 6 of Packager that you are using? Version 5.x had this problem where you could not rename the assembly, which sometimes Windows like to do for you in the background when it wants to use a "temporary" file name. In that case, the assembly it can't find is the very one that is currently running, strangely enough.
Brian Donahue
 
Posts: 6670
Joined: Mon Aug 23, 2004 10:48 am

ah ha!

Postby scootdawg » Mon Aug 24, 2009 4:19 pm

That's probably it. I have version 5. Sorry about that...

How do I get the latest version? I think my license is still up to date.

thanks again
scootdawg
 
Posts: 4
Joined: Thu Aug 20, 2009 3:12 pm

Postby Brian Donahue » Mon Aug 24, 2009 4:26 pm

There should be a "check for updates" hanging off SQL Packager's Help menu. That's how you can get the latest version. Even if you do not have a current maintenance agreement you can still run the software side-by-side with the old version and see if it fixes the problem you've got.
Brian Donahue
 
Posts: 6670
Joined: Mon Aug 23, 2004 10:48 am


Return to SQL Packager 6

Who is online

Users browsing this forum: No registered users and 0 guests