Creat A Local Copy Of Dbsnp
2
0
Entering edit mode
11.9 years ago

I am trying to create a local copy of dbSNP , I am following the instruction step by step from the website below. http://www.ncbi.nlm.nih.gov/books/NBK21088/#ch5.ch5_s6 My problem is that, I am in step 3 now, and try to create a dbSNP table, and it mentioned to use dbSNPmaintable file to create a table, how can I use this file? I mean, this is a sql script file, how can I run it on SQL server? I did search on internet, but still confused. Thanks in advance for anyone who can help.

dbsnp local dbsnp • 3.1k views
ADD COMMENT
0
Entering edit mode
11.9 years ago
Vikas Bansal ★ 2.4k

Have a look at this question. I think it will solve your problem. So this dbSNP_main_table.sql contains sql statements and you can open this in some editor eg Notepad++. These statements are used to create different tables with different fields with right datatypes. You can just copy and paste these statements, if you are using some front end. Just pasting an answer from aforementioned link.

The *.sql file is a text file with SQL statements to be executed by the mysql server. 

You can run it through a tool like phpMyAdmin - just open a query window there and copy and paste the content of that text file in there. phpMyAdmin and possibly other frontends will also allow to upload a *.sql file through the web browser. In phpMyAdmin click on the SQL tab. 

If you don't have any such front end installed, you can also go to the shell (assuming you're on a Linux box here). If your site is hosted somewhere, you'll need putty (or a similar tool) to connect to the server. 

Ftp your *.sql file to the (remote) machine if not done yet. 

Execute this command and you'll be fine: 

mysql <my_db_name> -u<user_name> -p<password> <mysql.sql
ADD COMMENT
0
Entering edit mode

@Vikas Bansal : Unfortunately, I dont have a phpAdmin in my computer, and the computer is not installed with Linux, it has a Windows System instead. The only tool I have is MS SQL server.(even no MS SQL Management studio). I would like to know, under this situation, is it still possible for me to install the local database? Thanks

ADD REPLY
0
Entering edit mode
11.9 years ago
Paulo Nuin ★ 3.7k

EDIT: I haven't seen your comment before answering. You should have a MSSQL command line application to run it. There are other options like this, but I don't know if NCBI stuff will work with MSSQL. You can install MySQL and Postgres on Windows easily.

A sql file is just a set of instructions for a SQL engine to create databases and tables. You can run from the command line. If you are trying to create a MySQL database use something like this

> mysql _dbname_ < _sqlfile_

where dbname is your database name and sqlfile is your sql file. More here

For Postgres it would be similar, but you can find instructions for this too.

ADD COMMENT

Login before adding your answer.

Traffic: 2420 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6