[DM2] Setting up SQL

Join Discord

1westy1

Dedicated Member
Dedicated Member
Nov 10, 2004
214
13
65
[DM2] Sql Help

Right ive made loads of topics, and ive searched insanely round the forum. But i just cannot find a post or topic on how to set up sql.

So i want to try a different method, could anyone who has set up sql befor for them selves and is willing to help me set it up either leave there msn here or ill pm you mine.

Thanks
Westy
 

jamiedotco

Dedicated Member
Dedicated Member
Nov 16, 2006
140
0
62
Re: [DM2] Sql Help

Setting up the files (offline):

1. download the server files from here http://users.telenet.be/thedeath/Mir2/LOMCNM2.rar

2. run the rar file and extract the files to C:/mirserver
3. got to your legend of mir folder
c:/program flies/wemade/legend of mir
right click on the map folder and click copy.
Go to your m2server folder
c:/mirserver/m2server
and paste the map folder into here

4. Check the following files to make sure they have the correct IP (127.0.0.1), the correct directories (C:/mirserver/…), and the correct server name (test):
/DBServer/!addrtable.txtl
/DBServer/!serverinfo.txtl
l /DBServer/dbsrc.ini
/LoginGate/Config.inil
l /LoginSrv/!addrtable.txt
/LoginSrv/!serveraddr.txtl
l /LoginSrv/!UserLimit.txt
/LoginSrv/Logsrv.inil
l /LogServer/LogData.ini
/M2Server/!runaddr.txtl
l /M2Server/!servertable.txt
/M2Server/!Setup.txtl
l /RunGate/Config.ini
/SelGate/Config.inil

5. Download SQL Server 2000 - Download details: SQL Server 2000 Evaluation Edition Release A (Protects Against the Slammer Worm)

6. Install SQL using Authentication mode, and set a password mir23

7. Once your SQL Server is running open Enterprise Manager and go into your SQL databases, there should already be ‘master’, ‘model’, ‘msdb’, ‘Northwind’, ‘pubs’, ‘tempdb’.

8. Right click any where in this window and then click new database.

9.In the box called name, type "mir23" then click ok.

10. Right click somewhere in the Database window, highlight over ‘All Tasks’ and click ‘Restore Database’.

11. Click the option tab, and then tick all 3 boxes, once you done that click back on the general tab.

12. Check the box that says restore as database, click on the arrow and select mir23.

13. The next line down, where it say restore, click "From Device’ and click the button saying ‘Select Devices’ then ‘Add’ button.

14. On the File Name box click the button saying ‘…’ and select lom2_chardb.bak from \DBServer. Then press OK until the database is restore.

15. Too add your self as a GM, right click on the table admin, then select , open table> return all rows.


16. Now go back to your sever folder and open
DBServer/dbsrc.ini
a few lines down you will see SQL type.
The line under that you need to change so it looks like this.

SQLType=mssql
SQLHost=localhost
SQLPort=3306
SQLDatabase=mir2
SQLUsername=sa
SQLPassword=<the password you entered when you setup mssql>

You now need to do the same in

DBServer/!Setup.txt

so it look like this

[SQL]
UseSQL=True
SQLHost=127.0.0.1
SQLUsername=sa
SQLPassword=<the password you entered when you setup mssql>
SQLDatabase=mir2
SQLType=mssql

17. you can now close MSSQL. The go back to ur server folder and run the following exe's. It don’t matter in which order you run them.

m2server/m2sever.exe (run this 1st as it takes the longest to load.
DBserver/dbserver.exe
gamegate/gamegate.exe
logingate/logingate.exe
loginsv/loginsrv.exe
logserver/LogDataServer.exe
selgate.exe

If you get no error in any of these your server is running ok.
16. Go back to your server file folder, then your m2server folder, copy the mir2.exe and paste it in to your legend of mir folder.

18. open your legend of mir folder and then open
mir.ini
change the 3 ip addresses in here to 127.0.0.1 then save this file as
mir2.ini

19. run the mir2.exe and you will be connected to your server.

20. if thats all working and your happy, try downloading the updates from http://users.telenet.be/thedeath/Mir...20of Mir.rar
make sure you read the update document before doing any thing.

21. any problems with the files before the update, feel free to post here
 
Upvote 0

Shabalabalong

Golden Oldie
Golden Oldie
Jul 1, 2006
1,067
30
154
Brighton
Re: [DM2] Sql Help

Setting up the files (offline):

1. download the server files from here http://users.telenet.be/thedeath/Mir2/LOMCNM2.rar

2. run the rar file and extract the files to C:/mirserver
3. got to your legend of mir folder
c:/program flies/wemade/legend of mir
right click on the map folder and click copy.
Go to your m2server folder
c:/mirserver/m2server
and paste the map folder into here

4. Check the following files to make sure they have the correct IP (127.0.0.1), the correct directories (C:/mirserver/…), and the correct server name (test):
/DBServer/!addrtable.txtl
/DBServer/!serverinfo.txtl
l /DBServer/dbsrc.ini
/LoginGate/Config.inil
l /LoginSrv/!addrtable.txt
/LoginSrv/!serveraddr.txtl
l /LoginSrv/!UserLimit.txt
/LoginSrv/Logsrv.inil
l /LogServer/LogData.ini
/M2Server/!runaddr.txtl
l /M2Server/!servertable.txt
/M2Server/!Setup.txtl
l /RunGate/Config.ini
/SelGate/Config.inil

5. Download SQL Server 2000 - Download details: SQL Server 2000 Evaluation Edition Release A (Protects Against the Slammer Worm)

6. Install SQL using Authentication mode, and set a password mir23

7. Once your SQL Server is running open Enterprise Manager and go into your SQL databases, there should already be ‘master’, ‘model’, ‘msdb’, ‘Northwind’, ‘pubs’, ‘tempdb’.

8. Right click any where in this window and then click new database.

9.In the box called name, type "mir23" then click ok.

10. Right click somewhere in the Database window, highlight over ‘All Tasks’ and click ‘Restore Database’.

11. Click the option tab, and then tick all 3 boxes, once you done that click back on the general tab.

12. Check the box that says restore as database, click on the arrow and select mir23.

13. The next line down, where it say restore, click "From Device’ and click the button saying ‘Select Devices’ then ‘Add’ button.

14. On the File Name box click the button saying ‘…’ and select lom2_chardb.bak from \DBServer. Then press OK until the database is restore.

15. Too add your self as a GM, right click on the table admin, then select , open table> return all rows.


16. Now go back to your sever folder and open
DBServer/dbsrc.ini
a few lines down you will see SQL type.
The line under that you need to change so it looks like this.

SQLType=mssql
SQLHost=localhost
SQLPort=3306
SQLDatabase=mir2
SQLUsername=sa
SQLPassword=<the password you entered when you setup mssql>

You now need to do the same in

DBServer/!Setup.txt

so it look like this

[SQL]
UseSQL=True
SQLHost=127.0.0.1
SQLUsername=sa
SQLPassword=<the password you entered when you setup mssql>
SQLDatabase=mir2
SQLType=mssql

17. you can now close MSSQL. The go back to ur server folder and run the following exe's. It don’t matter in which order you run them.

m2server/m2sever.exe (run this 1st as it takes the longest to load.
DBserver/dbserver.exe
gamegate/gamegate.exe
logingate/logingate.exe
loginsv/loginsrv.exe
logserver/LogDataServer.exe
selgate.exe

If you get no error in any of these your server is running ok.
16. Go back to your server file folder, then your m2server folder, copy the mir2.exe and paste it in to your legend of mir folder.

18. open your legend of mir folder and then open
mir.ini
change the 3 ip addresses in here to 127.0.0.1 then save this file as
mir2.ini

19. run the mir2.exe and you will be connected to your server.

20. if thats all working and your happy, try downloading the updates from http://users.telenet.be/thedeath/Mir...20of Mir.rar
make sure you read the update document before doing any thing.

21. any problems with the files before the update, feel free to post here
Or if that confuses u westy go here:

Read the real version from here:
http://forum.ragezone.com/f62/2-3-server-set-up-guide-231197/
 
Upvote 0

1westy1

Dedicated Member
Dedicated Member
Nov 10, 2004
214
13
65
Thanks for all that guys, but ive come accross another small problem.

When i try install it, it says something about other files i installed are stopping it, and that my computer has to be restarted. Which i can do right now because i have a program running that needs to stay running for a few days.

Any ideas?
 
Upvote 0

jasper

Golden Oldie
Golden Oldie
Sep 10, 2005
890
3
125
same happenned to me at one point, theres info i think on ms website (if you google for exactly what it says) about that,, something about removing the entry in the registry to stop it doing it, but whatever way, i think it will mean a reboot :(
 
Upvote 0

1westy1

Dedicated Member
Dedicated Member
Nov 10, 2004
214
13
65
Well, ive got my first error if anyone can help.

When i run m2Server i get this

Loaded client version information and server table...
Loading StdItem.DB...
[22/04/2007 16:41:25] StartTimer exception: [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'sa'. Reason: Not associated with a trusted SQL Server connection
 
Upvote 0

koni

V.I.P
VIP
Mar 14, 2006
1,111
1
185
Southampton UK
you need to make the dbsrc and setup.txt have the same info as your sql database, if you go into the setup.txt in the m2server folder it should look like this :


[SQL]
UseSQL=TRUE <----- make sure yours says TRUE alot say FALSE
SQLHost=127.0.0.1
SQLUsername=sa <---- leave this as sa
SQLPassword= <----- your password you chose when installing sql
SQLDatabase= <----- you databse name, that you made in sql
SQLType=mssql <---- make sure yours says mssql some say mysql
[Setup]
SQLPort=3306


the dbsrc located in the db folder needs to be basicly the same:

Key=0123456789
ServerAddr=127.0.0.1
ServerPort=60320
[SQL]
SQLType=mssql <---- again make sure yours says mssql not mysql
SQLHost=127.0.0.1
SQLPort=3306
SQLDatabase= <---- your database name (the one you made)
SQLUsername=sa <--- leave this as sa
SQLPassword= <------ your password the one you chose on sql install
 
Upvote 0

1westy1

Dedicated Member
Dedicated Member
Nov 10, 2004
214
13
65
When i was setting up sql i didnt put in a password. When i came to the screen where it asked for my computer name user name and password i had to choose the option that didnt need a password. Otherwise it wouldnt let me past... so i left the password section blank in !setup and dbsrc
 
Upvote 0

1westy1

Dedicated Member
Dedicated Member
Nov 10, 2004
214
13
65
ok ive sorted SQL now i got a new problem, when i run my GameGate/RunGate the little bit at bottom doesnt say its connected, and i cant get onto the server past the char select scree.


This is my config in the GameGate folder.

[GameGate]
Title=ktest
ServerAddr=127.0.0.1
ServerPort=5000
GateAddr=0.0.0.0
GatePort=7200
ShowLogLevel=10
ShowBite=0
ServerCheckTimeOut=180000
ClientSendBlockSize=500
MaxConnOfIPaddr=50
BlockMethod=0
MaxClientPacketSize=6420
NomClientPacketSize=190
MaxClientMsgCount=100
kickOverPacket=1
ClientTimeOutTime=5000



and this is what my M2server says


Loaded client version information and server table...
Loading StdItem.DB...
StdItem.DB loaded(737).
Loading MapFiles...
Mapfile loaded(402).
DecoItem loaded..
Loading Guild Territorys...
Loading Monster.DB...
Monster.DB loaded(356).
Loading Magic.DB...
Magic.DB loaded(54).
Loading MonGen.txt...
MonGen.txt loaded(3608).
Loading GenMsg.txt...
GenMsg.txt loaded(6).
Loading UnbindList.txt...
UnbindList information loaded.
Loading MapQuest.txt...
MapQuest.txt : Failure was occurred while reading this file.Code= -14
[23/04/2007 00:07:59] -- SQL KeepAlive


Any ideas?
 
Upvote 0

Kekekeke

Dedicated Member
Dedicated Member
Aug 8, 2006
138
0
63
MapQuest.txt : Failure was occurred while reading this file.Code= -14

To fix this, go to your MapQuest.txt and delete everything in it.



I also got : [23/04/2007 00:07:59] -- SQL KeepAlive

Have had no fix.
 
Upvote 0

Nightwolf

Developer
VIP
Jul 16, 2003
2,133
21
285
Manchester, UK
MapQuest.txt : Failure was occurred while reading this file.Code= -14

To fix this, go to your MapQuest.txt and delete everything in it.



I also got : [23/04/2007 00:07:59] -- SQL KeepAlive

Have had no fix.
the only thing you should have in it is this below as anything else you add you need to check what flags etc.. i think are available for it or you will get errors also txt files in MapQuest_def folder need to exist.

12 [401] 1 RootSpider * Q1401

D10031 [403] 1 BigApe * Q1403
D10032 [403] 1 BigApe * Q1403
D1004 [403] 1 BigApe * Q1403
D10051 [403] 1 BigApe * Q1403
D10052 [403] 1 BigApe * Q1403
D10053 [407] 1 RedEvilApe * Q1407
D10071 [409] 1 RedMoonEvil1 EvilApeOil Q14091
D10054 [412] 1 GreyEvilApe * Q1412
D10062 [413] 1 RedMoonEvil * Q14132
 
Upvote 0

jasper

Golden Oldie
Golden Oldie
Sep 10, 2005
890
3
125
code -14 is an error in line 14 of the mapquest.txt that people heve been getting with the files,, its a ghoul on map d4221, (i think) as you dont have that map in mapinfo, it generates that error, as the one posted by nightwolf doesnt have line 14 about the ghoul on a map you wont have it will work
 
Upvote 0

1westy1

Dedicated Member
Dedicated Member
Nov 10, 2004
214
13
65
Ok, now ive sorted that ive got a new error.


This is what my m2server says

_________________________________

Loaded client version information and server table...
Loading StdItem.DB...
StdItem.DB loaded(737).
Loading MapFiles...
Mapfile loaded(402).
DecoItem loaded..
Loading Guild Territorys...
Loading Monster.DB...
Monster.DB loaded(356).
Loading Magic.DB...
Magic.DB loaded(54).
Loading MonGen.txt...
MonGen.txt loaded(3608).
Loading GenMsg.txt...
GenMsg.txt loaded(6).
Loading UnbindList.txt...
UnbindList information loaded.
Loading MapQuest.txt...
MapQuest information loaded.
Loading QuestDiary\*.txt...
QuestDiary information loaded.
!Abuse.txt loaded..
Loading LineNotice...
Line Notice loaded...
Admin List loaded..
Guild List loaded..
PumpkinLists loaded..
Castle List loaded..
Castle initialized..
IDSoc Initialized..
GrobalEnvir loaded..
MakeStoneMines...
Merchant loaded...
GuardList loaded..
Npc loaded..
MakeItem loaded..
StartPoints loaded...
F-Engine resumed..
U-Engine initialized..
[23/04/2007 14:05:22] Guilds: 1
[23/04/2007 14:05:22] Total Castles: 1
[23/04/2007 14:05:22] Windows socket error: The requested address is not valid in its context (10049), on API 'bind'
[23/04/2007 14:05:23] Script file not found: .\Envir\Market_Def\1AME-GA2.txt
[23/04/2007 14:05:23] Script file not found: .\Envir\Market_Def\1AME-GA2.txt
[23/04/2007 14:05:23] Script file not found: .\Envir\Market_Def\1AME-GA2.txt
[23/04/2007 14:05:23] Script file not found: .\Envir\Market_Def\1BME-GA1.txt
[23/04/2007 14:05:23] Script file not found: .\Envir\Market_Def\1BME-GA1.txt
[23/04/2007 14:05:23] Script file not found: .\Envir\Market_Def\1BME-GA1.txt
[23/04/2007 14:05:30] Windows socket error: The requested address is not valid in its context (10049), on API 'bind'

and ideas?


and my gameGate still doesnt go like this ----][----
 
Upvote 0

koni

V.I.P
VIP
Mar 14, 2006
1,111
1
185
Southampton UK
ive posted this on another thread, please dont think iam being rude but... take the time to read through a file called "updates" this post of mine will help you.

ok.

the map quest fault was nothing to do with the files its an error caused by incorrect information in sql, basicly what you need to do to overcome the problems your getting correctly is, first of all download td's files, get them running so you have no errors in the m2, to get them running you need to read a file called updates.doc READ THE DOCUMENT AND DO EVERYTHING IT TELLS YOU TO.

if you need to add new fields to sql which YOU 100% NEED TO, then add them,

the api bind is nothing to do with anything other then the files them selves someone is bound to say disable upnp but it has fk all to do with it, as i had the map quest error and the api error and a few others to do with envirl=nil or something, its all to do with the new fields that the m2 server and db server are looking for,

ile say it again read the file called "updates" make sure you replace all the exe files ALL OF THEM and then do all the updates that need to be done, if you do it correctly you will NOT get the errors again
 
Upvote 0