# Database issues Multi-Terminal Issues

**URL:** <https://forum.sambapos.com/t/database-issues-multi-terminal-issues/6489>\
**Category:** V4 Question\
**Created:** [August 5, 2015, 5:49pm UTC](https://forum.sambapos.com/t/database-issues-multi-terminal-issues/6489 "2015-08-05T17:49:16Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![jim\_lewis](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/j/5daacb/32.png) [@jim\_lewis](https://forum.sambapos.com/u/jim_lewis)\
**Post date:** [August 5, 2015, 5:49pm UTC](https://forum.sambapos.com/t/database-issues-multi-terminal-issues/6489/1 "2015-08-05T17:49:16Z")

</div>

I am trying to setup multiple terminals and keep running into massive problems. The issue I seem to be having is the walk thru is for 2012 and MySQL is now 2014. The options and such for the walk-thru do not pop up on instillation now. Basically when it goes where you would put in SAMBAPOS4 etc, it just finished install and does not allow you to input those needed things to make the database actually work. Any and all help would be greatly appreciated, menu launch is tomorrow as it is now we will only have one terminal.  
Thanks  
Jim Lewis

---

<div class="post-metadata">

**Author:** ![Jesse](https://forum.sambapos.com/user_avatar/forum.sambapos.com/jesse/32/61493_2.png) [@Jesse](https://forum.sambapos.com/u/Jesse)\
**Post date:** [August 5, 2015, 5:52pm UTC](https://forum.sambapos.com/t/database-issues-multi-terminal-issues/6489/2 "2015-08-05T17:52:16Z")

</div>

First it’s not MySQL, MySQL is a different DB software, it’s MS SQL Express. There is a 2014 tutorial written by me look that one up.

Sounds to me like you downloaded the tools and not the actual server.

My tutorial covers it all even what to download

---

<div class="post-metadata">

**Author:** ![jim\_lewis](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/j/5daacb/32.png) [@jim\_lewis](https://forum.sambapos.com/u/jim_lewis)\
**Post date:** [August 5, 2015, 6:01pm UTC](https://forum.sambapos.com/t/database-issues-multi-terminal-issues/6489/3 "2015-08-05T18:01:33Z")

</div>

Ok thank you, I think you are 100% correct thanks. I will try that. I have been using your guide so I should be good.

---

<div class="post-metadata">

**Author:** ![jim\_lewis](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/j/5daacb/32.png) [@jim\_lewis](https://forum.sambapos.com/u/jim_lewis)\
**Post date:** [August 6, 2015, 4:41pm UTC](https://forum.sambapos.com/t/database-issues-multi-terminal-issues/6489/4 "2015-08-06T16:41:23Z")

</div>

Ok I got everything properly installed and can connect to database though SQL Server 2014 Management Studio. Though I can not get any terminal to connect to the database. This is my Data string as it is, DATASOURCE=localhost\SAMBAPOS; User Id=Lewis  
though have used  
DATASOURCE=localhost\SAMBAPOS;  
DATASOURCE=localhost\SAMBAPOS; DATABASE=SAMABPOS;  
and a few others.  
Though nothing is connecting and cant seem to get any terminal to connect to the database.  
I have also tried with MySQL login and no luck. Though I turned it back to windows login only.

---

<div class="post-metadata">

**Author:** ![emre](https://forum.sambapos.com/user_avatar/forum.sambapos.com/emre/32/39073_2.png) [@emre](https://forum.sambapos.com/u/emre)\
**Post date:** [August 6, 2015, 4:46pm UTC](https://forum.sambapos.com/t/database-issues-multi-terminal-issues/6489/5 "2015-08-06T16:46:54Z")

</div>

What is `DATASOURCE`? There is no such keyword.  
Instead of hand typing it click […] button and fill details.

Read more about it here

> [@SambaPOS Database Configuration](http://forum.sambapos.com/t/sambapos-database-configuration/356):
>
> In this tutorial I want give some details about database configuration. tl;dr; See [Step By Step SQL Server Express Setup](http://sambapos.org/wiki/doku.php/en/installing_sql_express_2012_for_sambapos_v3) document for multi user configuration. Introduction SambaPOS can work in three database modes. Demo mode, single user mode and multi user mode. Demo Mode You don’t need to install a database software just to evaluate SambaPOS. SambaPOS can work with a TXT file to let you understand basic SambaPOS functions. Some features might not work properly in demo mode so if you want…

---

<div class="post-metadata">

**Author:** ![jim\_lewis](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/j/5daacb/32.png) [@jim\_lewis](https://forum.sambapos.com/u/jim_lewis)\
**Post date:** [August 6, 2015, 5:09pm UTC](https://forum.sambapos.com/t/database-issues-multi-terminal-issues/6489/6 "2015-08-06T17:09:56Z")

</div>

Problem is it locks me out out of the pos now and pops up the error message saying it can not connect to database.

---

<div class="post-metadata">

**Author:** ![Jesse](https://forum.sambapos.com/user_avatar/forum.sambapos.com/jesse/32/61493_2.png) [@Jesse](https://forum.sambapos.com/u/Jesse)\
**Post date:** [August 6, 2015, 5:18pm UTC](https://forum.sambapos.com/t/database-issues-multi-terminal-issues/6489/7 "2015-08-06T17:18:05Z")

</div>

You can change the string from inside that error box. Look closely at that tutorial. DATASOURCE= should be Data Source=

If yours is not working then you did not follow tutorial correctly.

PS: MySQL is a different software package. I know you probably didn’t mean it but to prevent confusion in future you should know that we do not use MySQL here, refer to it as MS SQL or just SQL Express

PS2: is SQL server on a different machine than your terminals?

---

<div class="post-metadata">

**Author:** ![jim\_lewis](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/j/5daacb/32.png) [@jim\_lewis](https://forum.sambapos.com/u/jim_lewis)\
**Post date:** [August 6, 2015, 6:32pm UTC](https://forum.sambapos.com/t/database-issues-multi-terminal-issues/6489/8 "2015-08-06T18:32:36Z")

</div>

I followed your guide for SQL Express 2014, the server is up and running on office machine and I can connect using windows login as you said is best in guide. Though when I go to link sambapos to it I get connection errors with those above command strings. Though have tried to connect from other terminals all on same network and no luck.

---

<div class="post-metadata">

**Author:** ![JTRTech](https://forum.sambapos.com/user_avatar/forum.sambapos.com/jtrtech/32/21270_2.png) [@JTRTech](https://forum.sambapos.com/u/JTRTech)\
**Post date:** [August 6, 2015, 6:33pm UTC](https://forum.sambapos.com/t/database-issues-multi-terminal-issues/6489/9 "2015-08-06T18:33:43Z")

</div>

> [@jim\_lewis](#):
>
> Though I can not get any terminal to connect to the database. This is my Data string as it is, DATASOURCE=localhost\SAMBAPOS; User Id=Lewis

Just a commant based on what you said, localhost would only work on the machine with the SQL on it, the other terminals would need to have the server/pc name in place of localhost

---

<div class="post-metadata">

**Author:** ![QMcKay](https://forum.sambapos.com/user_avatar/forum.sambapos.com/qmckay/32/27925_2.png) [@QMcKay](https://forum.sambapos.com/u/QMcKay)\
**Post date:** [August 6, 2015, 9:51pm UTC](https://forum.sambapos.com/t/database-issues-multi-terminal-issues/6489/10 "2015-08-06T21:51:51Z")

</div>

> [@JTRTech](#):
>
> terminals would need to have the server/pc name in place of localhost

@JTRTech is correct. The Terminals must specify the Server Name or the IP address of the Server in the connection string as part of the Data Source. If you use Static IP on Server, or have a Reservation for a consistent IP for the Server in the DHCP service, you can use the Server IP, otherwise use the Server PC Name.

`localhost` means “this computer”, so on a Terminal (where you would _ **not** _ have SQL installed and running), it won’t be able to connect to a DB because there is no DB installed there (on the Terminal).

---

<div class="post-metadata">

**Author:** ![pauln](https://forum.sambapos.com/user_avatar/forum.sambapos.com/pauln/32/12698_2.png) [@pauln](https://forum.sambapos.com/u/pauln)\
**Post date:** [August 7, 2015, 12:56am UTC](https://forum.sambapos.com/t/database-issues-multi-terminal-issues/6489/11 "2015-08-07T00:56:12Z")

</div>

Just in case you are still finding issues I will add the process I used as it highlights all the hotspots where roadblocks can occur. As a “freshman” I had to burn the midnight oil with this as well!

**Platforms**  
Windows 8.1 - fully updated, Workgroups  
PC1 - Server ASUS I7 3ghz 16G Ram 27" Touch  
PC2 - Laptop ASUS I7 2ghc 4G Ram 15.4 Touch

**Check 1 - Services**  
After install SQL Exp 14 as per tutorials highlighted bring up SQL Server Configuration Manager (using Tile created or shortcut) and check **Services are operational** as depicted below:

 ![](https://forum.sambapos.com/uploads/default/original/2X/b/bc9c6ded20b68e6dff3c90b80fac5035be949970.JPG)

**Check 2 - TCPIP**  
Under the same Tool above - **now this is the kicker!** make sure the TCPIP service is running for the SambaPOS database. On default install for mine it was not. Until I got this running there was no life in the connection:  
 ![](https://forum.sambapos.com/uploads/default/original/2X/8/8f5dc185388d17eab1ce59a8d303cc3f1b3e3b6f.JPG)

**Check 3 - Windows Authentication Vs SQL**  
Well using “Windows Athentication” I feel can return different results from different installations like Domains, Workgroups, Logins & Accounts. In a word it sucked for me so SQL Athentication has been much more dependable and takes out the guess work when adding new systems. So using SQL Server Management Studio turn on mixed Authentication and you will need to right click on the node top where I have the red arrow to bring up the property editor:

 ![](https://forum.sambapos.com/uploads/default/original/2X/6/60d9bae421648c17df4efffc6cf6711a37163573.JPG)

Once you have changed the Login Authentication type you should get a choice when you log in to Studio, see below how Authentication is not greyed out:  
 ![](https://forum.sambapos.com/uploads/default/original/2X/6/6776bf9bdd216cb65627215fd45da613bd0876e0.JPG)

**Check 4 - Enable “sa” account**  
Again by defaut after fresh install of SQL Expr the "sa’ account is disabled and if you run with “SQL Authentication” you will need an SQL User Account operating. So bring up the properties as show below and enable the account:

 ![](https://forum.sambapos.com/uploads/default/original/2X/a/aec74a8b04e13dfb251ee28ed7633cfa39bc742d.JPG)

**Check 5 - Check Firewall opened**  
This will depend on if you are using windows firewall or an antivirus firewall but the concept will be the same for both. Below I am using the product that was shipped with the PC and by default there is no enabled port open!. Open up the port as required as depicted below. Make sure you check the properties in the SQL Server Configuration Manager **TCPIP Property Editor to see what port number** is being used:

 ![](https://forum.sambapos.com/uploads/default/original/2X/e/e868661aca4fa11f22364999b368ec0b8726a9c9.JPG)

**Test 1 - DB Connection String SambaPOS**  
Ok once everthing above has been crossed off your list then its time to rock with SambaPOS and test your DB connection under Local Settings as shown below:

 ![](https://forum.sambapos.com/uploads/default/original/2X/c/c9024e98b0b217cadff72666c7f0be68d5b5cdac.JPG)

**Notice** I have used User Name & Password as I am using SQL Authentication. I have also **changed the sa password to “sp”** just to keep it simple for now.

**Test 2 - UDL text file**  
@emre provided this test and I found it really cool 🕶 as it made testing easy! There are plenty of links regarding using a UDL file but in short create a TEXT file using say notepad anywhere and rename it to “somename”.UDL and double click to bring up the screen below:  
 ![](https://forum.sambapos.com/uploads/default/original/2X/f/f5ef10d437fd676a7b5555834e47db1b7166f7c2.JPG)

**Tips**  
I found I had to incorporate the Database Instance into the Server Name (1) above.  
I also found if I could not _drop down_ the “Select Database on Server” option (3) above then your connection will fail.

These are my thoughts and hopefully it will save other users some time 😂  
Regards Paul.

---

<div class="post-metadata">

**Author:** ![QMcKay](https://forum.sambapos.com/user_avatar/forum.sambapos.com/qmckay/32/27925_2.png) [@QMcKay](https://forum.sambapos.com/u/QMcKay)\
**Post date:** [August 7, 2015, 1:03am UTC](https://forum.sambapos.com/t/database-issues-multi-terminal-issues/6489/12 "2015-08-07T01:03:58Z")

</div>

Excellent post @pauln. Great insights and really good information for anyone having trouble with this. Nice to see!

---

<div class="post-metadata">

**Author:** ![pauln](https://forum.sambapos.com/user_avatar/forum.sambapos.com/pauln/32/12698_2.png) [@pauln](https://forum.sambapos.com/u/pauln)\
**Post date:** [August 7, 2015, 1:16am UTC](https://forum.sambapos.com/t/database-issues-multi-terminal-issues/6489/13 "2015-08-07T01:16:33Z")

</div>

Seriously @QMcKay if I can get anywhere near your level competency so I contribute like the amazing stuff you and others do here I would be satisfied…

---

<div class="post-metadata">

**Author:** ![Jesse](https://forum.sambapos.com/user_avatar/forum.sambapos.com/jesse/32/61493_2.png) [@Jesse](https://forum.sambapos.com/u/Jesse)\
**Post date:** [August 7, 2015, 1:22am UTC](https://forum.sambapos.com/t/database-issues-multi-terminal-issues/6489/14 "2015-08-07T01:22:44Z")

</div>

I am going to copy this into a tutorial if you dont mind. Very good thread.

---

<div class="post-metadata">

**Author:** ![pauln](https://forum.sambapos.com/user_avatar/forum.sambapos.com/pauln/32/12698_2.png) [@pauln](https://forum.sambapos.com/u/pauln)\
**Post date:** [August 7, 2015, 1:25am UTC](https://forum.sambapos.com/t/database-issues-multi-terminal-issues/6489/15 "2015-08-07T01:25:51Z")

</div>

Honoured, thanks @kendash,  
respectfully Paul.

---

<div class="post-metadata">

**Author:** ![Wisefix](https://forum.sambapos.com/user_avatar/forum.sambapos.com/wisefix/32/53986_2.png) [@Wisefix](https://forum.sambapos.com/u/Wisefix)\
**Post date:** [August 7, 2015, 3:37pm UTC](https://forum.sambapos.com/t/database-issues-multi-terminal-issues/6489/16 "2015-08-07T15:37:01Z")

</div>

Windows Firewall Script to Allow MSSQL to run without putting your firewall off.

Copy to Notepad and save as a .bat file. Run as Administrator

@echo ========= SQL Server Ports ===================  
@echo Enabling SQLServer default instance port 1433  
netsh firewall set portopening TCP 1433 “SQLServer”  
@echo Enabling Dedicated Admin Connection port 1434  
netsh firewall set portopening TCP 1434 “SQL Admin Connection”  
@echo Enabling conventional SQL Server Service Broker port 4022  
netsh firewall set portopening TCP 4022 “SQL Service Broker”  
@echo Enabling Transact-SQL Debugger/RPC port 135  
netsh firewall set portopening TCP 135 “SQL Debugger/RPC”  
@echo ========= Analysis Services Ports ==============  
@echo Enabling SSAS Default Instance port 2383  
netsh firewall set portopening TCP 2383 “Analysis Services”  
@echo Enabling SQL Server Browser Service port 2382  
netsh firewall set portopening TCP 2382 “SQL Browser”  
@echo ========= Misc Applications ==============  
@echo Enabling HTTP port 80  
netsh firewall set portopening TCP 80 “HTTP”  
@echo Enabling SSL port 443  
netsh firewall set portopening TCP 443 “SSL”  
@echo Enabling port for SQL Server Browser Service’s ‘Browse’ Button  
netsh firewall set portopening UDP 1434 “SQL Browser”  
@echo Allowing multicast broadcast response on UDP (Browser Service Enumerations OK)  
netsh firewall set multicastbroadcastresponse ENABLE

---

<div class="post-metadata">

**Author:** ![JTRTech](https://forum.sambapos.com/user_avatar/forum.sambapos.com/jtrtech/32/21270_2.png) [@JTRTech](https://forum.sambapos.com/u/JTRTech)\
**Post date:** [August 7, 2015, 4:35pm UTC](https://forum.sambapos.com/t/database-issues-multi-terminal-issues/6489/17 "2015-08-07T16:35:14Z")

</div>

> [@Wisefix](#):
>
> Copy to Notepad and save as a .bat file. Run as Administrator

Would this be a one time thing?  
Only ask as only time ive used .bat personally is for a few small scheduled automations

---

<div class="post-metadata">

**Author:** ![Jesse](https://forum.sambapos.com/user_avatar/forum.sambapos.com/jesse/32/61493_2.png) [@Jesse](https://forum.sambapos.com/u/Jesse)\
**Post date:** [August 7, 2015, 4:59pm UTC](https://forum.sambapos.com/t/database-issues-multi-terminal-issues/6489/18 "2015-08-07T16:59:27Z")

</div>

Yes it’s a one time thing. I can’t think of a reason for it not to be.

PS: you can allow the service without having to mess with ports this is the preferred way especially if you run dynamic ports.

---

<div class="post-metadata">

**Author:** ![Raphael9630](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/r/cdc98d/32.png) [@Raphael9630](https://forum.sambapos.com/u/Raphael9630)\
**Post date:** [August 10, 2015, 8:42am UTC](https://forum.sambapos.com/t/database-issues-multi-terminal-issues/6489/19 "2015-08-10T08:42:00Z")

</div>

Good everyone, I have followed this same procedure…still no results connecting to the client, though the server shows a green “connected” at the bottom. I used windows authentication not sql server authentication.

---

<div class="post-metadata">

**Author:** ![Raphael9630](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/r/cdc98d/32.png) [@Raphael9630](https://forum.sambapos.com/u/Raphael9630)\
**Post date:** [August 10, 2015, 8:43am UTC](https://forum.sambapos.com/t/database-issues-multi-terminal-issues/6489/20 "2015-08-10T08:43:59Z")

</div>

Do i have to share my Samba datafiles in “My Documents” over the network…?

[Next page](https://forum.sambapos.com/t/database-issues-multi-terminal-issues/6489.md?page=2)
