EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   General::General Discussion (https://www.eqemulator.org/forums/forumdisplay.php?f=586)
-   -   SQL Server 2008 (https://www.eqemulator.org/forums/showthread.php?t=27926)

blackdragonsdg 04-16-2009 09:46 PM

SQL Server 2008
 
I was wondering if anyone has tried using SQL Server 2008 in place of MySQL for their database? If so, are there any pitfalls to be aware of? I would think compatibility might be an issue as it was with MySQL versions.

I was thinking about trying it but I thought I would ask here and see if anyone had any advice for or against the idea.

image 04-16-2009 10:06 PM

Last I checked it was made for mysql, are you talking about Microsoft SQL? Then I really don't think thats going to work :)

blackdragonsdg 04-16-2009 10:52 PM

Yes, I was referring to Microsoft SQL Server 2008.

Andrew80k 04-16-2009 11:35 PM

You could probably get it to work, but it would take a bit of work. You'd have to look at the database stuff to see. It's not really abstracted out completely though. You could likely use any database you wanted but you'd pretty much have to do the work.

blackdragonsdg 04-17-2009 06:51 AM

So after about four hours of tinkering around with SQL Server 2008 I am not having much luck even getting the database to import/source in. For some reason the program doesn't want to use .sql files it wants .txt or .csv and I have never heard of .csv until today. I think I am way outta my league on this idea.

I think SQL Server 2008 would be much more useful in hands of an experienced database administrator. Seems to have lots and lots of tools and a whole bunch of other gadgets I don't know what to do with.

So_1337 04-17-2009 08:54 AM

.csv files are simply comma separated values. It's a popular export method for a lot of Windows-based programs like Excel, Access, and MySQL.

I've gone through the work before of exporting entire tables from MySQL into .csv, opening them in Excel, adding a blank column before all the information, and then using it to write queries. From there, I just copy the whole deal into a text file, save it as a .sql file, and source it in. So for most tables that are just simple integers or text, that would work for you, though it'd take some work. I have no idea how you'd handle anything like the player profile or blobs.

nosfentora 04-17-2009 11:28 AM

This might help.

If not, I believe you can run a new query on the existing connection, copy and paste the text from the .sql file and run the query.

The last I've used was SQL Server 2005, I'm not sure what they've changed in 2008.

you could also try renaming the .sql file to a .txt file and see if that'll import. - you might have to change some of the syntax tho.

blackdragonsdg 04-17-2009 05:23 PM

What was happening was when I went to import the sql file it would start the process then start giving row and column errors and then just end the import operation. That is most likely because I did not have the program configured correctly or just made a simple mistake out of inexperience.

The sql file I was using was a database export of my minilogin which I know works or atleast it does on mysql. I'll probably put it in text format and try again later when I have more time to tinker with it.

nosfentora 04-27-2009 08:41 AM

You might want to try selecting all the data in your database (via Navicat or something similar), copying and pasting into excel. Then save to a .CSV file.

That should import easier into SQL Server.

drakelord 04-27-2009 06:45 PM

Not sure if the queries that world/zone server use are compatible with SQL Server either. You might end up having to make changes and recompile the code. And it would be quite a few changes.

nosfentora 04-28-2009 04:12 PM

yea the queries are a little different, which is why exporting via navicat (to a csv format) and then importing with 2008 choosing a csv format should work.

EvoZak 04-28-2009 11:56 PM

I think drake's point is that the emulator doesn't really have a data layer per se. Rather, a bunch of embedded sql queries throughout the code.

Not that there's anything wrong with that. Just not easy to switch back ends.

nosfentora 04-29-2009 09:01 AM

Duh - if I could actually read.... =)

drakelord 04-29-2009 09:35 AM

What EvoZak said. And the reason changing it would be hard, is that there isn't really a "Query builder" for all of the queries in the program. A lot of them are literally the queries that they want thrown in, like, "INSERT INTO suchandushch WHERE blabla=y". So you'd have to hunt down every one of these queries and match it to the sql server format. A daunting task.

Yeormom 05-13-2009 11:59 PM

My server uses Microsoft SQL 2008. So yeah, it can be done. My crude benchmarks showed a 19% increase in performance but I've still got database related bugs to work out. If you hit Google, you can find some replication tools that can aid you in keeping one database instance replicated on a MySQL database and SQL server database in real time but that kills the performance factor.


All times are GMT -4. The time now is 06:00 PM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.