todo1981
Posts: 11
Joined: Sat Apr 09, 2022 5:01 pm

3 PreDefined Connections

Sun Apr 10, 2022 10:58 am

I have 3 PreDefined Connections, but only the 1st PreDefined connection queries (Static) executing.
There are settings for each PreDefined.
The other queries (Dynamic) are not executed. Why?
Attachments
2022-04-10_125337.png
2022-04-10_125337.png (9.05KiB)Viewed 3547 times

Catalin
Posts: 6509
Joined: Wed Jun 13, 2018 7:49 am

Re: 3 PreDefined Connections

Tue Apr 12, 2022 3:51 pm

Hello and welcome to our forums,

This is indeed strange, as the queries should execute.

Can you please make sure that the connections are correctly configured?

For instance, if you use the "Test" button from your project --> "SQL Databases" page, is the connection succesfully?

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

todo1981
Posts: 11
Joined: Sat Apr 09, 2022 5:01 pm

Re: 3 PreDefined Connections

Thu Apr 14, 2022 6:42 am

Yes, The connection works for the whole DBs.
Attachments
2022-04-14_084055.png
2022-04-14_084055.png (5.77KiB)Viewed 3511 times

Catalin
Posts: 6509
Joined: Wed Jun 13, 2018 7:49 am

Re: 3 PreDefined Connections

Fri Apr 15, 2022 10:23 am

Hello,

Thank you for your followup on this!

Unfortunately, I can not really say for sure why this is happening.

If possible, could you please try to create a sample project that reproduces this and forward it to me by email at support at advancedinstaller dot com so I can further investigate its settings and test this on our end?

If you can not create the sample project, then please forward me the following:

- a copy of your .AIP file

- a download link of the setup

- the verbose log of the installation process

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

todo1981
Posts: 11
Joined: Sat Apr 09, 2022 5:01 pm

Re: 3 PreDefined Connections

Sat May 21, 2022 4:30 am

Hi Catalin,
Sorry for the delay in response, it was a bit of a busy time at work.

Do you have the option upload for me please a sample of a small project, which contains a connection for 2 different servers and 2 different DBs with a simple sql script foreach?

It's a bit problematic to get the information out of the company.

Best regards,

Catalin
Posts: 6509
Joined: Wed Jun 13, 2018 7:49 am

Re: 3 PreDefined Connections

Wed May 25, 2022 12:41 pm

Hello,

No worries about the delayed reply!

I have sent you an email with the required steps to upload the files.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

todo1981
Posts: 11
Joined: Sat Apr 09, 2022 5:01 pm

Re: 3 PreDefined Connections

Wed May 25, 2022 6:23 pm

Thanks for the response.
But unfortunately , I can not send information out from the company servers.
Our servers are recorded and there is no permission to send files outside the company.

Can you send me an existing sample link or a download file that has two different servers and two different bases, and two different scripts?
Thank you,
Tom

Catalin
Posts: 6509
Joined: Wed Jun 13, 2018 7:49 am

Re: 3 PreDefined Connections

Mon May 30, 2022 4:18 pm

Hello Tom,
But unfortunately , I can not send information out from the company servers.
Our servers are recorded and there is no permission to send files outside the company.
I understand, no worries about that.

If there is no way for you to forward me the resources or a sample project, at least, then I will try to create a sample for you.

However, in order to do that, please give me some more details about your scenario, e.g.:

- what servers you have installed on your machine

- you are mentioning the "script", but are you actually using an SQL script or a query?

Basically, if you could walk me through your enviornment, so I can replicate it on my VM, that would be great.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

todo1981
Posts: 11
Joined: Sat Apr 09, 2022 5:01 pm

Re: 3 PreDefined Connections

Mon May 30, 2022 5:18 pm

Thank you for your response.

The purpose of the installation is to run a script that generates (drop and create) tables and Stored Procedures.
The client's requirements are that he must to provides the servers names, and the DB name on each server.

The system has 3 different DB, so the client can provide 3 different names for the servers, and each server can have a different name for the DB.
EX:
1. Server : X , DB: X_DB
2. Server : Y , DB: Y_DB
3. Server : Z , DB: Z_DB

Since I have the basic script that contains the DB name, and produces the relevant table, I need during the installation to replace the DB name that exists in the script, with the DB name provided by the client, and then run the installation.

That is, X will change to what the customer provides, and so will X_DB change according to what the customer provides.
This is how it should happen on each of the servers and DB.
I'm talking of course about Microsoft SQL servers and not Oracle.

Of course during the installation I also have local + IIS files, but I was able to do this part.
The question is whether it is possible to combine everything together into one installation process ?

Thank you very much for your help. it's not obvious. I really appreciate it.
Tom

Catalin
Posts: 6509
Joined: Wed Jun 13, 2018 7:49 am

Re: 3 PreDefined Connections

Mon Jun 06, 2022 3:14 pm

Hello Tom,

First of all, I am sorry for quite the delayed replies, we've been a little bit more busy lately (and I also had to take few days off last week).

Just wanted to let you know that I am currently working on your sample project, but this might take a while to make.

I will update this thread as soon as the sample project will be ready.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Liviu
Posts: 1026
Joined: Tue Jul 13, 2021 11:29 am
Contact:  Website

Re: 3 PreDefined Connections

Tue Jun 07, 2022 11:53 am

Hello Tom,

We've managed to create a sample project. This sample project connects to two different servers. It also creates two databases with one sql script each.

For example:

1. Server 1 with database1 executes script1.sql
2. Server 2 with database2 executes script2.sql

You can find attached the sample project with this implementation.

On the SQLServerConnectionDlg dialog I added an EditBox control to get the second database name from the user input.
There is also added the second Server on the top of the page:
sql dialog.png
sql dialog.png (64.72KiB)Viewed 3132 times


After you run the package, you can see that the sql scripts are executed as scheduled on different servers.
sql server.png
sql server.png (181.87KiB)Viewed 3132 times

Please let us know if you have any questions.

Best regards,
Liviu
Attachments
sql 2 servers demo.aip
(22.33KiB)Downloaded 112 times
________________________________________
Liviu Sandu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

todo1981
Posts: 11
Joined: Sat Apr 09, 2022 5:01 pm

Re: 3 PreDefined Connections

Fri Jun 10, 2022 1:46 am

Hi Catalin,

Thank you very much for the example you gave. I looked up, and when I perform the same process I do see the tables being created in the database.

When I try to run in the same configuration my script that produces tables and procedures, they are not created,
But if I run the script directly in the database, then everything is running properly.

If there was a problem with the script, then the process should have dropped, since I marked to stop the installation in case of a malfunction.
What could be the problem in your opinion?

Thank you,
Tom

todo1981
Posts: 11
Joined: Sat Apr 09, 2022 5:01 pm

Re: 3 PreDefined Connections

Fri Jun 10, 2022 1:52 am

I just execute my script in parallel with what you were wrote. Yours worked, and mine did not.
Attachments
2022-06-10_035137.png
2022-06-10_035137.png (2.99KiB)Viewed 3106 times

todo1981
Posts: 11
Joined: Sat Apr 09, 2022 5:01 pm

Re: 3 PreDefined Connections

Fri Jun 10, 2022 2:05 am

So, I execute a small part of my script, and now it's working.
Indeed there is probably a problem with the script, I will try to debug it in the installation until I understand what drops.

I want to thank you very much for the help, really thank you.
Can I let someone know about your courteous service?
Thank you,
Tom

Catalin
Posts: 6509
Joined: Wed Jun 13, 2018 7:49 am

Re: 3 PreDefined Connections

Fri Jun 10, 2022 10:39 am

Hello Tom,

I am glad to hear the sample worked and that it helped you further debug your scripts.
I want to thank you very much for the help, really thank you.
Can I let someone know about your courteous service?
Also, thank you very much for your kind words!

If you would like, I can forward your email address to our marketing team and they may contact you regarding a testimonial, something similar to this:

https://www.advancedinstaller.com/testimonials.html

If not, then that is completely fine as well. :)

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”