You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

If your DualShield is using a Microsoft SQL database, please follow the steps below.

Prepare Data

- Open the CSV file "IP2LOCATION-LITE-DB3.IPV6.CSV" in a text editor

- Add the header row below in the CSV

ip_from,ip_to,country_code,country_name,region_name,city_name

- Save the file

Install DBeaver

Unfortunately, the MS-SQL Studio cannot import the IPV6 data into the MS-SQL database! You need to use a tool called DBeaver.

Download and install DBeaver Community Edition from the link below:

https://dbeaver.io/download/

Import Data

- Login to DBeaver console

- Navigate to the DualShield database. By default it is named as "DualShield"

- Locate the table called "ip2location_db3_ipv6"

- Right click the table "ip2location_db3_ipv6"

- Select "Import Data"

- Select "CSV" in the Target list

- Select "IP2LOCATION-LITE-DB3.IPV6.CSV" in the Source pane

- Keep the default settings.

- Click Next

- Select "skip" in the "id" mapping.

- Click Next

- Click Start to start importing the data

- Please note that it can take hours to import the data dpending on the performance of the machine, as there are nearly 5 millions of records to be imported.

Process Data

- After the data has been successfully imported, execute the script below

update ip2location_db3_ipv6 set
ip_from = (SUBSTRING(REPLICATE('0', 39), 1, 39 - LEN(ip_from)) + ip_from),
ip_to = (SUBSTRING(REPLICATE('0', 39), 1, 39 - LEN(ip_to)) + ip_to);








  • No labels