Setup PC as a SqlServer

Discussion forum about all things SqlBase.
kjellv
Norway
Posts: 9
Joined: 05 Sep 2018, 07:12
Location: sandefjord/Norway

Setup PC as a SqlServer

Post by kjellv » 05 Sep 2018, 07:50

hi

I'm looking for a "Step by Step" guide on how to set up a PC as a SqlBase server and access/run application from multi PC.

I have a 5 user license for SqlBase 12.1 and one Team Developer license 7 and windows 10

If possible I need a very detailed guide as I never have been on this side of the IT, only developing applications.

Thanks

FRBhote
India
Posts: 1233
Joined: 09 Mar 2017, 05:32
Location: Hyderabad, India

Setup PC as a SqlServer

Post by FRBhote » 05 Sep 2018, 08:56

In older versions of SB, there is a book called Starter.pdf which explains it.

Should be there in v 12 too?

Igor Ivanovic
Site Admin
Site Admin
Croatia
Posts: 761
Joined: 05 Mar 2017, 12:37
Location: Zagreb, Croatia

Setup PC as a SqlServer

Post by Igor Ivanovic » 05 Sep 2018, 10:52

kjellv wrote:
05 Sep 2018, 07:50
hi

I'm looking for a "Step by Step" guide on how to set up a PC as a SqlBase server and access/run application from multi PC.

I have a 5 user license for SqlBase 12.1 and one Team Developer license 7 and windows 10

If possible I need a very detailed guide as I never have been on this side of the IT, only developing applications.

Thanks
Hi,

Glad to see you joined this forum.
As FRBhote wrote, there is a starter.pdf book in you SQLBase documentation folder and all the needed info is there.

Basically, as I wrote on the OpenText forum, you should install the SQLBase server on a PC which will act as a database server.
Install it as a service and on the last page check the "allow external connections" or something like that, this will take care of the windows firewall.

On the client PC's point the sql.ini's serverpath to the network name or ip address of the PC which is acting like a server and you are done.
In your TD folder (or the deploy folder on other PC's)

Change from the default:

Code: Select all

[win32client.ws32]
serverpath=server1,localhost/*
to:

Code: Select all

[win32client.ws32]
serverpath=server1,192.168.1.250/*
or
serverpath=server1,myserver/*
where the "192.168.1.250" is the IP address of the server PC, or you can use it's name if it's visible in the network.

If you have any problems just ask :D

Cheers,
Igor Ivanovic
Image

kjellv
Norway
Posts: 9
Joined: 05 Sep 2018, 07:12
Location: sandefjord/Norway

Setup PC as a SqlServer

Post by kjellv » 05 Sep 2018, 15:03

hi

I have now done the following:

On PC 1(server) only SqlBase installed as you advice, sql.ini is named sql.ini3 in the att.zip
On PC 2 (client) is installed TD developement and also SqlBase which maybe is the reason for my problem. Sql.ini2 is located under SqlBase drive, Sql.ini1 is located under TD drive.
I have not Deploy on this machine.
I got an undocumented error, but I think this is becuase SqlBase started on PC2 ?????
IP address, I'm not sure where to find it, but run a program https://www.whatismyip.com/ which gave me the settings you see in the different ini files.

Am I close to something???
I have also raised a support question about my SqlBase 5 user which the PMC seems not to be what I should use.

Have a nice day
You do not have the required permissions to view the files attached to this post.

Igor Ivanovic
Site Admin
Site Admin
Croatia
Posts: 761
Joined: 05 Mar 2017, 12:37
Location: Zagreb, Croatia

Setup PC as a SqlServer

Post by Igor Ivanovic » 06 Sep 2018, 06:26

Hi,

There shouldn't be any problem if you have SQLBase installed on PC2, I have a similar setup, a local SQLBase server and another on a network server.
What error did you get?

Are the two PC's on the same network?
Could you post some more info about your network configuration and what exactly are you trying to achieve?

If they are both on the same local network the IP's I am talking about are the local ones.
You should be able to see them if you go in Settings/Ethernet/Network (I'm assuming you are on win10):
network.jpg
You do not have the required permissions to view the files attached to this post.
Igor Ivanovic
Image

Igor Ivanovic
Site Admin
Site Admin
Croatia
Posts: 761
Joined: 05 Mar 2017, 12:37
Location: Zagreb, Croatia

Setup PC as a SqlServer

Post by Igor Ivanovic » 06 Sep 2018, 06:51

In you sql.ini1 which is your TD sql.ini, there is a public IP address which you probably got from whatsmyip.com.
If you are on the same network, that's wrong, you have to supply the local IP address of the server.

If, on the other hand, you are trying to reach the server over the internet (located somewhere else) that will not work from scratch.
Such a configuration is doable but there are different scenarios...

So, you should first give us a clue what are you trying to achieve?
Igor Ivanovic
Image

kjellv
Norway
Posts: 9
Joined: 05 Sep 2018, 07:12
Location: sandefjord/Norway

Setup PC as a SqlServer

Post by kjellv » 06 Sep 2018, 07:04

hi and thanks for taking your time

First, ethernet not installed?


I have only WiFi on both the PC's.


What I want is to have this PC1 run as a server for my PC2 and at the end for PC3-4 and 5 located elswhere in Norway. On PC2-5 I will install Deploy and RbDeploy and a Sql.ini and the .exe I have created from TD.

I think my understanding of the network and WiFi is where I got stuck.

Igor Ivanovic
Site Admin
Site Admin
Croatia
Posts: 761
Joined: 05 Mar 2017, 12:37
Location: Zagreb, Croatia

Setup PC as a SqlServer

Post by Igor Ivanovic » 06 Sep 2018, 08:37

Ok, to get the IP for your PC1 on WiFi click on the WiFi symbol on the taskbar and choose the properties of your wifi connection.
At the end of the page you will have the IP address you are looking for.

Then replace the IP address in the line

Code: Select all

serverpath=server1,85.164.9.156/*
in the sql.ini1 (your TD PC)
with the IP address you got from PC1, the IP address should be a private one, starting with 192.168.x.x, so you line should look something like this:

Code: Select all

serverpath=server1,195.168.x.x,2155/*
As for the PC3,4 & 5, which are located outside the network your server is on, to access the server, you will need to have either a fixed IP address from your ISP for your router, or you should get a Dynamic DNS address.
Here is a link explaining what Dynamic DNS is: https://www.1and1.com/digitalguide/serv ... namic-dns/

For this to work, you (or someone else) will have to configure the router for port forwarding (port 2155) and DynDNS in case your will be using it.
Also, for such a connection I would make everything secure, encrypt the databases, configure the communication to force SSL and so on.

HTH,
Igor Ivanovic
Image

kjellv
Norway
Posts: 9
Joined: 05 Sep 2018, 07:12
Location: sandefjord/Norway

Setup PC as a SqlServer

Post by kjellv » 06 Sep 2018, 16:16

hi and thanks again

I think I begin to see the light in the end of the tunell.

Ethernet, is that just to hook up a cable in my router, buy a box to extend ports for this new cables, and hook up PC1 and PC2 to this box? PC-3-4-5 will have to do the same, and then we can go down the ethernet way?


If all PC's have access to ethernet, and the abouve is correct as my understanding, is this a better way of going, rather than DNS.

Hopefully I have managed to place a valid quiestion, and that you have understood it.

Have a nice day

Kjell

kjellv
Norway
Posts: 9
Joined: 05 Sep 2018, 07:12
Location: sandefjord/Norway

Setup PC as a SqlServer

Post by kjellv » 06 Sep 2018, 19:37

hi again.

I have tried the solutions you describe about the wifi and my 2 PC at home. I have located the IP which is

IPv4 = 10.0.0.110

IPv4 DNS = 130.67.15.198

193.213.112.4 which is the one I have used in the Sql.ini

I have enclosedthe 2 .ini, one called sql_wifi_sq which is the one in the programfiles/Sqlbase catalogue
the other called sql_wifi_TD which is the one in the program data TD catalogue.


I have used both as sql.ini and both pick up the same database, the one on my PC2.

I have not changed any on the .ini on PC1, but tested SqlTalk and can se that I can connect the databases.

I see that both .ini files wifi or local point at

autostartserverpath="C:\Program Files\Gupta\Team Developer 7.1\sqlbase\dbntsrv.exe" (PC2)

also this point to PC2

NamedPipes=LocalOnly
servername=Server1
dbdir=C:\ProgramData\Gupta\Team Developer(x64) 7.1\sqlbase
tempdir=C:\ProgramData\Gupta\Team Developer(x64) 7.1\sqlbase

should not the wifi one point to the dbntsrv.exe and the sqlbase on PC1

:o

Kjell
You do not have the required permissions to view the files attached to this post.

Igor Ivanovic
Site Admin
Site Admin
Croatia
Posts: 761
Joined: 05 Mar 2017, 12:37
Location: Zagreb, Croatia

Setup PC as a SqlServer

Post by Igor Ivanovic » 07 Sep 2018, 07:14

Now I am a little confused...
Which one has the 10.0.0.110 address, and which one has the 193.213.112.4?
It seems to me that your TD PC has the 193.x.x.x address, but just to be sure.

Could you write the wifi configuration on both PC's and post it here?
Do it in this way:
start cmd (windows key + R)
type ipconfig
write down the IPv4 Address and a Default Gateway, from both PC's

Also, the sql.ini of the server should point to itself, so remove the new serverpath and bring back the old one:

Code: Select all

serverpath=Server1,localhost,2155/*
The one on your TD PC should point to the server.
For now I would deactivate the SQLBase from your TD PC, removing the autostartpath from it, and renaming the sql.ini in the TD\sqlbase folder.
We can bring it back later, but for now let's keep thing simple.
Remember, after you have changed the sql.ini you have to restart the SQLBase server.
Is it installed as a service on PC1?
Igor Ivanovic
Image

kjellv
Norway
Posts: 9
Joined: 05 Sep 2018, 07:12
Location: sandefjord/Norway

Setup PC as a SqlServer

Post by kjellv » 07 Sep 2018, 07:29

ipconfig telle this storrey

PC1 IPv4 10.0.0110
Default Gateway . . . . . . . . . : fe80::5e6a:80ff:fe22:db99%2
10.0.0.138
PC2 IPv4 10.0.77
Default Gateway . . . . . . . . . : fe80::5e6a:80ff:fe22:db99%19
10.0.0.138

on PC1

[win32client.ws32]
;serverpath=SERVER1,127.0.0.1:2155/*
serverpath=SERVER1,localhost,2155/*

on PC2

[win32client.ws32]
; running local
;serverpath=Server1,localhost/*
; running wifi
serverpath=server1,193.213.112.4,2155/*
;autostartserverpath="C:\Program Files\Gupta\Team Developer 7.1\sqlbase\dbntsrv.exe"

Igor Ivanovic
Site Admin
Site Admin
Croatia
Posts: 761
Joined: 05 Mar 2017, 12:37
Location: Zagreb, Croatia

Setup PC as a SqlServer

Post by Igor Ivanovic » 07 Sep 2018, 08:16

Ok,
Now everything is clear :-)

Just change the PC2 sql.ini to point to the server:

Code: Select all

serverpath=server1,10.0.0.110,2155/*
and you are done!
Igor Ivanovic
Image

kjellv
Norway
Posts: 9
Joined: 05 Sep 2018, 07:12
Location: sandefjord/Norway

Setup PC as a SqlServer

Post by kjellv » 07 Sep 2018, 12:12

BINGO

it works, thank you for your patience service.


For the PC3-4 and 5 you say:

"As for the PC3,4 & 5, which are located outside the network your server is on, to access the server, you will need to have either a fixed IP address from your ISP for your router."

Is this something I can buy from the ISP or....?

Must all the PC's be hooked up using a cable from the Router, not wifi anymore?

To change the sql.ini, is this the only change I have to do, "serverpath=server1,10.0.0.110,2155/*" with the new IP address?

Also, important, will this work for PC3-4-5 if they all are on the same WiFi - (same office) the way it works for me today on PC1 and PC2 ????????

Again thanks and have a nice weekend

kjell

Igor Ivanovic
Site Admin
Site Admin
Croatia
Posts: 761
Joined: 05 Mar 2017, 12:37
Location: Zagreb, Croatia

Setup PC as a SqlServer

Post by Igor Ivanovic » 07 Sep 2018, 13:36

kjellv wrote:
07 Sep 2018, 12:12
Must all the PC's be hooked up using a cable from the Router, not wifi anymore?
No, they can work over wifi or fixed cable, it doesn't matter.
kjellv wrote: To change the sql.ini, is this the only change I have to do, "serverpath=server1,10.0.0.110,2155/*" with the new IP address?
Yes, that is the only change to get it work.
kjellv wrote: Also, important, will this work for PC3-4-5 if they all are on the same WiFi - (same office) the way it works for me today on PC1 and PC2 ????????
If they are on the same network they will work the same as PC2.

If PC3,4,5 are outside your network, ie. not on the same router, in order for them to reach your PC1 server, you will have to provide them an public IP address.

The address 10.0.0.x (as well as the 192.168.x.x I was writing before) is your private network which cannot be accessed from the outside. It's the address your router DHCP is providing for the devices on your local network, like PC's, tablets, smartphones, etc.

Your router has a public address, it's the one you got with whatsmyip.com, but unless your ISP provides you with a fixed IP address (the one that never change and it's allocated for you) it's a dynamic IP address that changes after some time (usually 24-48 hours or even more, depending on your ISP).
Don't know the prices in your country, but here in Croatia leasing a fixed IP address costs about 5 times more than the dynamic one.

The solution for this is to get a Dynamic DNS account, and tell the router to use it to provide the new IP every time it's changed. One of the services is dyndns which has a small annual fee, or you can use some other free Dynamic DNS services. What they do is that, instead of the ever changing IP address, they provide you a name which you can use to access your router, something like kjellv.is-a-guru.com
So you can use it in your PC3,4,5 sql.ini serverpath:

Code: Select all

serverpath=server1,kjellv.is-a-guru.com,2155/*
For this to work you will need access to you router configuration and configure some things:
  • Enable the use of dynamic dns services and enter the credentials for the service (the one you get from the Dynamic DNS provider), so the router will contact it every time the IP address changes.
  • In the DHCP server settings, set that the PC1 has a static address so it doesn't change after restart.
  • Configure port forwarding on port 2155 (the one SQLBase use) to you PC1 server local address 10.0.0.110, so any traffic to the router on this port will be forwarded to PC1.
  • If your router has a firewall, you should open port 2155 for in/out.
It's a relatively simple task and it should work :-)
Igor Ivanovic
Image

Return to “General Discussion”

Who is online

Users browsing this forum: [Ccbot] and 0 guests