SmartFox server with sql server

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

Skills07
Posts: 103
Joined: 07 Nov 2016, 14:54
Location: Italy

SmartFox server with sql server

Postby Skills07 » 10 Jun 2018, 18:54

hello everybody

i have a little question, is it possible to use smartfox server with SQL Server??

in the past i've used smartfox with mysql and now i want to try an integration with sql server.
We're creating a unity game and we would like to use all sdk in microsoft system.

Thanks to all for the reply
User avatar
Lapo
Site Admin
Posts: 23009
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: SmartFox server with sql server

Postby Lapo » 11 Jun 2018, 07:54

Hi,
by SQL server you mean Microsoft SQL Server?

SmartFoxServer uses standard JDBC drivers to interface with SQL databases so almost all vendors are supported.
You can find the drivers here:
https://docs.microsoft.com/en-us/sql/co ... erver-2017

Then you can read the brief instructions to set it up in SFS2X here:
https://smartfoxserver.com/blog/how-to- ... -database/
Lapo
--
gotoAndPlay()
...addicted to flash games
Skills07
Posts: 103
Joined: 07 Nov 2016, 14:54
Location: Italy

Re: SmartFox server with sql server

Postby Skills07 » 11 Jun 2018, 08:33

yes Lapo i need to try to connect Smartfox with Microsoft SQL Server
Skills07
Posts: 103
Joined: 07 Nov 2016, 14:54
Location: Italy

Re: SmartFox server with sql server

Postby Skills07 » 25 Jun 2018, 09:31

hello Lapo

i'm setting up smartfox to use microsoft sql server

see the smartfox attachment

but i have this error in console:

Code: Select all

25 giu 2018 | 11:41:39,431 | ERROR | main | v2.db.SFSDBManager |     | com.microsoft.sqlserver.jdbc.SQLServerException:
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Exception: com.microsoft.sqlserver.jdbc.SQLServerException
Message: Connection reset ClientConnectionId:b25d7008-7322-4099-8392-5223eacccf02
Description: The DBManager Test SQL failed: select COUNT(*) from dbo.athletes
Please double check your SQL code and make sure that Database server is running.


how can i solve? my server is running
Attachments
smartfox.png
(100.1 KiB) Not downloaded yet
User avatar
Lapo
Site Admin
Posts: 23009
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: SmartFox server with sql server

Postby Lapo » 25 Jun 2018, 09:59

Hi,
this is likely an issue with MSSQL, probably how it is configured.
I am not an expert of this database, but searching a bit returned this page:
https://stackoverflow.com/questions/113 ... -from-java

Read the first reply in that page and see if your current config satisfies the first two points (enabling TCP and configuring firewall)

Cheers
Lapo

--

gotoAndPlay()

...addicted to flash games
Skills07
Posts: 103
Joined: 07 Nov 2016, 14:54
Location: Italy

Re: SmartFox server with sql server

Postby Skills07 » 25 Jun 2018, 10:24

Lapo wrote:Hi,
this is likely an issue with MSSQL, probably how it is configured.
I am not an expert of this database, but searching a bit returned this page:
https://stackoverflow.com/questions/113 ... -from-java

Read the first reply in that page and see if your current config satisfies the first two points (enabling TCP and configuring firewall)

Cheers



Lapo ok i have solved. But now smartfox when i click on sfsstandalone starts and close immediately.

Where is located the service? i thinks it's a problem on service
User avatar
Lapo
Site Admin
Posts: 23009
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: SmartFox server with sql server

Postby Lapo » 25 Jun 2018, 13:48

That's the sign that there's an error at startup. When SFS2X fails to complete the startup process it quits, and therefore your prompt window will close down.

Just open the log files (under SFS2X/logs/ ) and you should see the last error before the shutdown.

Cheers
Lapo

--

gotoAndPlay()

...addicted to flash games
Skills07
Posts: 103
Joined: 07 Nov 2016, 14:54
Location: Italy

Re: SmartFox server with sql server

Postby Skills07 » 26 Jun 2018, 07:28

I have solved with a reinstall of smartfox.
Something was broken.
I have resetted my game zone, with same parameters and all works.
The problem was when i have clicked sfs2x-service instead of sfs2x-standalone.

Now i can work well.
Thanks

Return to “SFS2X Questions”

Who is online

Users browsing this forum: heroumi and 65 guests