Page 1 of 1

How to import hostip_mmyyyy.sql into SQL Server?

PostPosted: Thu May 26, 2005 12:06 pm
by Guest
From reading the Download page, the hostip_mmyyyy.sql file is for MySQL. How can I import this into MS SQL? I downloaded the file and it is 512MB. There is no way I can open this file in Notepad or something equivilant.

Thanks for any help.

Re: How to import hostip_mmyyyy.sql into SQL Server?

PostPosted: Fri May 27, 2005 6:53 am
by bfolkens
Anonymous wrote:From reading the Download page, the hostip_mmyyyy.sql file is for MySQL. How can I import this into MS SQL? I downloaded the file and it is 512MB. There is no way I can open this file in Notepad or something equivilant.

Thanks for any help.


The file is zipped up using gzip and bzip2 (.gz for gzip, .bz2 for bzip2) and the resulting file is a sql file. This file is just standard ANSI SQL, which I'm not so sure how well microsoft's product supports, but it's worth a try just trying to execute it. All the CREATE's are in there, so it should create the tables it needs.

On another thread someone else is working on getting it to load in MSSQL, you may want to do a search of the forums to keep up2date with it.

Can't execute an SQL file this large in SQL server

PostPosted: Wed Jun 01, 2005 4:55 am
by dmeagor
The SQL code looks pretty standard but I am unable to execute the script as it is just too big. I have tried using the query analyser, isql.exe and osql.exe but nothing works.

Has anyone else managed this?

David Meagor
http://MultiTaskTools.com

Re: Can't execute an SQL file this large in SQL server

PostPosted: Mon Jun 06, 2005 7:09 am
by bfolkens
dmeagor wrote:The SQL code looks pretty standard but I am unable to execute the script as it is just too big. I have tried using the query analyser, isql.exe and osql.exe but nothing works.

Has anyone else managed this?

David Meagor
http://MultiTaskTools.com


I'm not familiar with MSSQL but is there some sort of command line tool that would do the trick? (Some of M$'s windows interfaces tend to try to load it all up into memory)

SQL Server...

PostPosted: Sat Jan 14, 2006 1:08 am
by johnmcgary
Yeah, I messed around with a bunch of command line utilities-- no dice. I just threw mysql on a machine, imported hostip.info, then used DTS to dumps everything straight into SQL server... then threw together a script to create all the indexes... PAIN? yes. EASY TO UPDATE? no. ACTUALLY WORKS? ya...

Re: SQL Server...

PostPosted: Sun Jan 15, 2006 2:57 pm
by bfolkens
johnmcgary wrote:Yeah, I messed around with a bunch of command line utilities-- no dice. I just threw mysql on a machine, imported hostip.info, then used DTS to dumps everything straight into SQL server... then threw together a script to create all the indexes... PAIN? yes. EASY TO UPDATE? no. ACTUALLY WORKS? ya...


If you try using the rsync methods now you might be able to import the CSV format alot easier - worth a shot

rsync

PostPosted: Mon Jan 16, 2006 4:30 pm
by johnmcgary
hey,

i rsync'ed the CSV folder and came up with three files:

hip_ip4_city_lat_lng.csv
hip_ip4_country.csv
hip_ip4_countries.csv

now, ehh... what the heck is all this? i was expecting all of the tables in "ip4_XXX" format...?

Re: rsync

PostPosted: Tue Jan 24, 2006 10:27 am
by bfolkens
johnmcgary wrote:hey,

i rsync'ed the CSV folder and came up with three files:

hip_ip4_city_lat_lng.csv
hip_ip4_country.csv
hip_ip4_countries.csv

now, ehh... what the heck is all this? i was expecting all of the tables in "ip4_XXX" format...?


the ip4_XXX tables are the mysql dump found in the updates section - broken up to make it faster (in the older format)

We're in the process of changing the database structure - and these new rsync methods are part of that.

Also - the CSV files aren't the mysql dump ;) that's in the mysql directory I believe