Home
Name Modified Size InfoDownloads / Week
Evemssqlimporter (6).zip 2012-06-30 43.6 kB
Evemssqlimporter (5).zip 2012-06-27 37.2 kB
Evemssqlimporter (3).zip 2012-06-26 35.9 kB
Evemssqlimporter (2).zip 2012-06-25 32.7 kB
README.txt 2012-06-23 6.4 kB
Evemssqlimporter.zip 2012-06-23 28.8 kB
Totals: 6 Items   184.6 kB 0
Dependencies:
python 3.2 + (works with 3.2)
pyodbc
MS Sql database2012 (hadn't checked other versions)
Eve fansite kit
Evesqlimporterscript

Windows installation procedure:

Download and install the above program dependencies.  You'll obviously need to install python2.7 or 3.2 before you install pyodbc.  Just grab the appropriate pyodbc module based upon your system and python version.  Then install based upon your system, the MS Sql database 2012 with tools option.  Then grab the fansite kit (just need Inferno_1.0_70633_db.zip).

Once you've installed MS Sql 2012, run Microsoft SQL Server Management Studio.  Firstly I recommend in Object Explorer (left hand side of Studio window) right mouse button clicking on 'Databases' , here select 'New Databases' and then input in the Database field name 'Eve'.  Press Okay.  Next for the pyodbc driver you'll probably want to have SQL authentication enabled, so you'll need to enable this authentication by selecting in the Object Explorer, your Server Name, mine is for example, CHRISTOPHER-PC\SQLEXPRESS, it is the top most object item in the explorer's data tree structure.  Right mouse click on this, and select 'Properties'.  Then under 'Select a page'  (left hand side of pop up dialog), go ahead and select, 'Sql Server and Windows Authentication Mode'.
Next you can create your Sql authentication based user id, by selecting in Object Explorer, YourServerName > Security > Logins.  Right click on 'Logins' and select 'New Login'.  Under  'general' (Select a page tab) of your 'New Login' dialog, select 'Sql Server Authentication'.  Then enter your 'Login name' in the provided field, make note of this, you'll need to add this information to the python script that I have furnished.  While there are many options under the 'Select a page' (left side of dialog, under 'Server Roles', 'User mapping', and 'Securables'.  By default granting permission and check marking all fields for 'Server Roles' and selecting your 'Eve' database, should grant you necessary permissions for your userid.  Make sure you have entered a password.  This has a minimum characters requirement default, so make sure this is at 15 alpanums in length (at least I haven't been able to input anything less).

Next using a favorite text editor or using Server management Studio direct, copy and paste the ebs_DATADUMP sql query data into a new query.  On Server Management Studio, you can select New Query, making sure that YourServerName > Databases > Eve is selected, and then paste the sql query code into the new query window that should be populated, or open the ebs_DATADUMP file directly from Server Management Studio.  Then press execute.  If all goes well should have new tables (with no data) furnished on your new Eve database.

Next you'll need to restore the backup database file for Eve.  You can do this from Object Explorer, selecting YourServerName > Databases  and right clicking Databases, you can select 'Restore Database..'  I've found that owing to the silliness of the file finder dialog here to have the DATADUMP201205212008.bak (or related file depending on what version of Eve is presently current) having this setup in a convenient locations like 'C:\Users' by default.  By default under the 'general' tab, select under 'Source' the 'Device' radio button.  To this right of the now blank field under this radio button, select the '...' button.  To the right of the presently blank 'Backup media' text field, select 'Add'.  Then go to your source directory for the .bak file using the pop up directory tree explorer.  Your backup file should be present in the file field.  Select this, press Okay, and then push Okay again on the 'Select Backup Devices' dialog.  You should now have the .bak file showing on your 'Restore Database' dialog now.  Under 'Select a page' of the 'Restore Database' dialog, you should select 'options'.  Then select 'Overwrite the existing database (WITH REPLACE)' and then select 'Preserve the replication settings (WITH KEEP_REPLICATION)'.  Push 'Okay' on 'Restore Database' dialog here.  If all goes well you should see a confirmation that your database has been restored.  You can check for data in this database, by selecting in Object Explorer,

YourServerName > Databases > Eve > Tables and then selecting any one of the given 'dbo.' tables shown.  You can right click on the table, and select 'Select top 1000 rows' .  This will automatically generate a query  for you populating database information for the given table.  I highly recommend that you have some background in SQL, so that you can create your own custom queries likewise.  Any decent book like SQL Visual Quick Start guide by Peach Pit Press publication for instance, can be an excellent start for learning some basics to query language programming.  I also recommend some requisite knowledge of python here to aid you likewise.

 Now that you have data in the database, using your typical market export methods in game, and presuming you have something in marketlogs folder to import into the database.  You'll just need to furnish your server info, userid, and password at the 'cnxn' variable of the Evesqlimporter script. And put the directory path to your Eve market logs folder at the 'dirpath' variable.  After running the script you may need to close down the existing sql server socket connection manually to populate say added data in Server Management Studio.  Apparently I've run into difficulties with more then one server socket connection utilizing pyodbc and server management studio at the same time.  In this case, just close out the idle terminal, not the script.

Finally while I have a batch file move script, to place a file in a given backup destination, I haven't implemented this.  You could do this on your own if you like, or move the files to a backup destination other then your present directory.  I may add for convenience sake later a file sync script, that records and tracks a list of uploaded files into the given database, thus avoiding having to do anything further other then making sure that files added to the folder or import merged into the database once synchronization is enabled.

To run just run file EveappMainWindow.py 

If you need links to dependencies files/programs just go to my blog site at 

http://lotsofexpression.blogspot.com/2012/06/eve-marketlogs-to-ms-sql-database.html
Source: README.txt, updated 2012-06-23