How to import hostip_mmyyyy.sql into SQL Server?

Development discussion about the hostip.info codebase, libraries, and database

Moderator: Moderators

How to import hostip_mmyyyy.sql into SQL Server?

Postby Guest on Thu May 26, 2005 12:06 pm

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.
Guest
Expert
 

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

Postby bfolkens on Fri May 27, 2005 6:53 am

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.
bfolkens
Site Admin
 
Posts: 154
Joined: Tue Feb 22, 2005 8:09 am

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

Postby dmeagor on Wed Jun 01, 2005 4:55 am

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
dmeagor
Expert
 

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

Postby bfolkens on Mon Jun 06, 2005 7:09 am

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)
bfolkens
Site Admin
 
Posts: 154
Joined: Tue Feb 22, 2005 8:09 am

SQL Server...

Postby johnmcgary on Sat Jan 14, 2006 1:08 am

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...
johnmcgary
n00b
 
Posts: 2
Joined: Sat Jan 14, 2006 12:55 am

Re: SQL Server...

Postby bfolkens on Sun Jan 15, 2006 2:57 pm

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
bfolkens
Site Admin
 
Posts: 154
Joined: Tue Feb 22, 2005 8:09 am

rsync

Postby johnmcgary on Mon Jan 16, 2006 4:30 pm

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...?
johnmcgary
n00b
 
Posts: 2
Joined: Sat Jan 14, 2006 12:55 am

Re: rsync

Postby bfolkens on Tue Jan 24, 2006 10:27 am

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
bfolkens
Site Admin
 
Posts: 154
Joined: Tue Feb 22, 2005 8:09 am


Return to Hostip.info code/database devel

Who is online

Users browsing this forum: No registered users and 2 guests

cron