SuperDev
Posts: 10
Joined: Thu Oct 13, 2022 5:38 pm

Custom Database Connection To A Separate Server

Hello,

I am reaching out because I want to connect to a Database hosted on a different server than the test machine I am running the installer package on. I want to conduct a trial run for the trial version of our software but the database server I wish to connect to is hosted on another server and when I try to use the Custom SQL DB connection, it doesn't work and prior believed it was the syntax issue so I wrote it in the form of: ip address/server name. Please let me know if more information is needed and I will post the project file within the post as well. Have A Great Day!

Correction: I think the file is to big to post here I can email hopefully if necessary!
Catalin
Posts: 7664
Joined: Wed Jun 13, 2018 7:49 am

Re: Custom Database Connection To A Separate Server

Hello,

I'm assuming that by "server" you mean another computer in your network.

Please note that in order to browse for databases on a network, you would need to make sure the "Network SQL Browse" type should be selected.
Screenshot_37.png
Screenshot_37.png (38.86 KiB) Viewed 14619 times

Hope it helps!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
SuperDev
Posts: 10
Joined: Thu Oct 13, 2022 5:38 pm

Re: Custom Database Connection To A Separate Server

Thank you for your reply! Upon trying this solution, it unfortunately did not remedy my issue. It was not able to discover the database and due to this, I researched further into this matter to see if there was any alternative way and found through the Advanced Installer documentation (I will post the link here as well as screenshots) that there was! Upon further investigation, in the server section of part four, it specifies how the predefined connection can indeed do what I am requesting for, however when I tried this I am receiving an error still. What is the proper way to enter in those credentials or is there more to it than I am seeing?

https://www.advancedinstaller.com/user- ... ction.html
Attachments
Predefined Connection Error.png
Predefined Connection Error.png (30.35 KiB) Viewed 14609 times
Catalin
Posts: 7664
Joined: Wed Jun 13, 2018 7:49 am

Re: Custom Database Connection To A Separate Server

Hello,

In the article you have linked it states that, if the instance is on another machine, you should provide it as it follows:

Code: Select all

Computer-name\Instance-name
In your case, you have covered that, but if I were to be honest, considering the length, I am not quite sure you have done that.

In addition to that, please make sure that on the machine where the instance is, the services of SQL Server are running.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
SuperDev
Posts: 10
Joined: Thu Oct 13, 2022 5:38 pm

Re: Custom Database Connection To A Separate Server

Appreciate you and thanks for replying. Contrary to the screenshot I last attached, I used the same format as listed in the Advanced Installer documentation guide (computer-name\instance-name) and will post screenshot here and yet still encountered the same error. Is there a specific syntax to connect when using only default instances? I ask because we don't use instance names at my workplace, only default instances and I have confirmed that this is indeed the case for my machine and also that SQL Server is indeed running on it with a link to the article I used pasted below:
(Under the "Get the instance name from Configuration Manager" section)

https://learn.microsoft.com/en-us/troub ... connection

If anymore information is needed from me, please don't hesitate to let me know! Happy Holidays and take care!
Attachments
PCE II.png
PCE II.png (28.67 KiB) Viewed 14434 times
Catalin
Posts: 7664
Joined: Wed Jun 13, 2018 7:49 am

Re: Custom Database Connection To A Separate Server

Hello,

I understand.

Most likely, this is something else that we are missing here, as it seems your input is correct.

Unfortunately, there may be many reasons for this connection to fail, so I cant exactly pinpoint to one.

If possible, could you please create a log and see whether we have more information there?
Screenshot_48.png
Screenshot_48.png (44.69 KiB) Viewed 12942 times

Predefined SQL Connection Page

Besides that, let's make sure the correct ODBC is installed, bitness wise. For instance, if your setup is of 32-bit, install the 32-bit ODBC driver and then use it as such. If is 64-bit, check the "Use 64-bit ODBC resource" option.

If I'm not mistaken, the connection also failed if TLS1.0 was disabled, so you might want to enable that and give it another try.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
SuperDev
Posts: 10
Joined: Thu Oct 13, 2022 5:38 pm

Re: Custom Database Connection To A Separate Server

Once again, Thank you so much for your reply and hope today has/is treating you well!

As advised, with a smaller project file, I attempted to log the information to a file when an error occurs. I made sure to write a basic script that would throw an error to ensure that I would receive an error log but unfortunately, did not receive one. After review of the Advanced Installer documentation I found that it should send the log in the form of "AI_SQLScripts.log" to my Temp folder. Yet, when I install this program on my machine, it didn't send it to that folder and I even ran a global search on my PC to see if it got sent anywhere on my machine to no avail. Is there something that I need to configure in my settings or something that I'm missing that's preventing the log from being automatically sent to my machine after a failed install?

Although, it did indeed tell me there was an error in the dialog box due to the SQL verbose feature being enabled, but the log file is truly what I desire because on my more larger scaled project, the verbose feature does not give relatively any information at all regarding what the problem is rather than that an issue has occurred.

In regards to other questions asked, I am indeed running on a 64-bit operating system and will make sure that feature is enabled. Also, we have found the TLS1.0 to be a depreciated, compromised security server which ultimately, would pose a security risk to our system that we are unwilling to chance. Therefore, that isn't an option for us. However, I will attach the sample project file I used to test this log feature of Advanced Installer, as well as screenshots of the items in question on this thread. Please keep me updated and let me know if anymore information is needed!

https://www.advancedinstaller.com/user- ... ction.html (Log errors to file)
Attachments
Test SQL Script.png
Test SQL Script.png (14.77 KiB) Viewed 12895 times
log search fail.png
log search fail.png (9.16 KiB) Viewed 12895 times
SQL DB Test.aip
(16.76 KiB) Downloaded 283 times
Catalin
Posts: 7664
Joined: Wed Jun 13, 2018 7:49 am

Re: Custom Database Connection To A Separate Server

Hello,

First of all, thank you very much for your kind words!

As it looks like, our documentation was quite wrong.

Upon further testing your setup with different options, making sure everything is setup as expected, I finally installed SSMS on my VM (I tried to do the connection from the VM to my local machine).

When connecting from VM to my local machine, I noticed that I only needed to provide the computer name, without the instance and the instance would be selected automatically.

After doing so, I have modified the AIP file you have provided me as a sample and voila, everything worked as expected.
Screenshot_50.png
Screenshot_50.png (245.29 KiB) Viewed 11627 times

The command prompt is from my local machine, whereas the Advanced Installer screen is from the VM.
Screenshot_51.png
Screenshot_51.png (614.26 KiB) Viewed 11627 times

As you can see, the connection was successful and the table was added.

Hope this helps!

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

Return to “Common Problems”