0% found this document useful (0 votes)
30 views22 pages

Import SQL Configurations

This document provides instructions for connecting BlueSky Statistics to MS Access, SQL Server, and PostgreSQL databases to import data. It describes how to install the necessary database drivers, create an ODBC connection for MS Access, and configure connection settings for SQL Server and PostgreSQL by specifying the host name, user ID, password, and database. It also provides troubleshooting tips for connection issues and screenshots of the import windows.

Uploaded by

Bert Abutal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views22 pages

Import SQL Configurations

This document provides instructions for connecting BlueSky Statistics to MS Access, SQL Server, and PostgreSQL databases to import data. It describes how to install the necessary database drivers, create an ODBC connection for MS Access, and configure connection settings for SQL Server and PostgreSQL by specifying the host name, user ID, password, and database. It also provides troubleshooting tips for connection issues and screenshots of the import windows.

Uploaded by

Bert Abutal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

In order to connect to databases you need to click on File -> Import Data -> SQL

database.

Configure MS-ACCESS and Import MS-ACCESS data into BlueSky Statistics


Requirements:

BlueSky Satistics Uses R Requires DSN (ODBC drivers)


64-bit 64-bit 64-bit
32-bit 32-bit 32-bit
Table: 1

Example : BlueSky Statistics 64-bit application will use R 64-bit. And R 64-bit will only be able to use 64-
bit MS-ACCESS DSN(Data Source Name).

Step 1. Determine whether you need to install 32/64 bit MS-Access Database
Engine:
You Have BlueSky You Need Install This
Statistics
MS-ACCESS (32-bit) 64-bit You need 64-bit Access Drivers to AccessDatabaseEngine_x64.exe
create 64-bit ODBC Data Source
Name (in step 2 of “Creating Data
Source Name (DSN) in Windows”
section below).
32-bit You should already have drivers for Not applicable
32-bit to create 32-bit ODBC Data
Source Name(go to step 2)
MS-ACCESS (64-bit) 32-bit You need 32-bit Access Drivers to AccessDatabaseEngine.exe
create 32 bit ODBC Data Source
Name(in step 2 of “Creating Data
Source Name (DSN) in Windows”
section below).
64-bit You should already have drivers for Not applicable
64-bit to create 64-bit ODBC Data
Source Name(go to step 2)
Table: 2

Visit following link and download “Microsoft Access Database Engine 2010 Redistributable”. It has both
32-bit and 64-bit drivers. Check the table above and see which one you require.

http://www.microsoft.com/downloads/en/details.aspx?familyid=C06B8369-60DD-4B64-A44B-
84B371EDE16D&displaylang=en.
Suppose you need to install AccessDatabaseEngine_x64.exe: Open a Command prompt (in a directory
location where you have your downloaded files) and type the following command:

AccessDatabaseEngine_x64.exe /passive

Installing by double clicking that file may result in an error. So it is better use Command prompt with
/passive option to avoid install errors.
Step 2. Creating Data Source Name (DSN) in Windows:
1. Open “Control Panel” in Windows. Click open “Administrative Tools”
2. In “Administrative Tools” window you should see “ODBC Data Source (32-bit)” and “ODBC Data
Source (64-bit)”. You can create 32-bit Data Source Name using “ODBC Data Source (32-bit)” and
64-bit DSN using “ODBC Data Source (64-bit)”. Please refer to table 2, to determine whether
you need 32 or 64-bit ODBC Data Source Name.
However in our example we will create 64-bit DSN (steps for creating a 32-bit DSN are similar).
So we will click open “ODBC Data Source (64-bit)”.
3. Following window will appear when you click open “ODBC Data Source (64-bit)”. In this window
you need to be on “User DSN” tab. Now click on “Add” button to create a new User DSN (64-
bit).
Following window will appear. In this window you need to select “Microsoft Access Driver (*.mdb,
*.accdb)”. If you do not see this item in your list, that means you do not have Access driver installed for
64-bit DSN. You need to follow the instructions provided in the “Determine whether you need to install
32/64 bit MS-Access Database Engine” section above.
4. After selecting “Microsoft Access Driver (*.mdb, *.accdb)”, click on “Finish” button. You will get
following window.
5. In this window you need to provide Data Source Name of your choice. Then click on the “Select”
button to locate your Microsoft Access file (*.mdb or *.accdb). If you want to assign a User ID
and Password (this is not common), then click on the “Advanced” button. Finally click “OK”.
6. In the “ODBC Data Source Administration (64-bit)” window below, you will see your DSN that
you just created. Now you are ready to use your DSN with the BlueSky Statistics application to
load the data from your Access database which is referenced by your DSN.
7. Now from BlueSky Statistics application go to File -> Import Data… -> SQL Database a window
will appear as shown below. First select “MS-ACCESS” from the list. Now you need to fill in the
name of your DSN (this is the name of the DSN you just created and optionally the
user/password. In our example we do not have user id and password so we leave those fields
blank. Now click “Connect”.
8. If all the fields are correctly filled, clicking “Connect” will pop open following window. In this
window first you need to “Select a database” from drop down. Then you can click on “Tables”
“Views” checkboxes depending on your choice, what you want to see in the list box below, on
the left. Once the Table/Views list box is filled with Table/View names, you can click any one of
those to see its column names in the list box, on the right. Finally, in the text box below, you can
write your select query or sub query with join etc. and the results of the query will be loaded in
the data grid of the BlueSky Statistics application.

9. Click ‘OK’ to load the result of select query in the BlueSky Statistics grid.
Configure Microsoft-SQL Server (MS-SQL server) and Import MS-SQL data into
BlueSky Statistics
To import data from Microsoft-SQL server you must have Microsoft SQL Server JDBC driver installed on
your system. You can download this driver from Microsoft’s website (https://www.microsoft.com/en-
us/download/details.aspx?id=55539). It has been found the matching Java version is necessary for the
JDBC driver to work properly. Please check ‘System Requirements’ and ‘Install Instructions’ sections on
the download page carefully. By default it installs to ‘C:/Program Files’. Do not install it in any other
location.

Other requirements:
1) RJDBC R package must be present. For this you can execute a dialog from the BlueSky Statistics
application ( go to Installation → Install All required R package from CRAN ).
2) Install Java and set JAVA_HOME environment variable to point to Java install location (eg.
C:\Program Files\Java\jdk1.8.0_112)
3) Using SQL server agent make sure that SQL server browser is running.

From BlueSky Statistics application, go to Options -> Configuration Settings now switch to SQL settings
tab. Enter MSSQL server instance name . Also specify the path to the driver jar file. The path must
defined using forward slashes, as shown below.

To connect to a remote MS-SQL server that is maintained by your admin, you need to get the SQL server
name (‘host’ address), user id and password from the admin.

1. From BlueSky Statistics main window, click File -> Import Data… -> SQL Database. Following
window will pop open. Select MSSQL from the list by clicking on it. Enter SQL server name, user
id and password.
2. Click “Connect” button and you will see following window. In this window you need to select a
database name from the dropdown and then based on choice you can check “Table” and/or
“Views” checkbox to see tables and/or views in the list box below, on the left. If you click any
table or view name in the left table, you will see its column names in the list box, on the right.
Finally, in the text box below, you can write your select query or sub query with join etc. and the
results of the query will be loaded in the data grid of the BlueSky Statistics application.

3. Click ‘OK’ to load the result of select query in the BlueSky Statistics grid.

Troubleshooting Connection issues


1) If you see TCP/IP related error like following and follow the steps to resolve it.

To fix above issue please follow these steps:


a) Open ‘Sql Server Configuration Manager’ and locate ‘Protocols for MSSQLSERVER’.
Where MSSQLSERVER is an instance name (you may have a different instance
name).

b) On the right panel if ‘TCP/IP’ is disabled, right click on ‘TCP/IP’ and choose ‘Enable’
from the popup menu.
c) You will see a warning message. Click OK.

d) Now we need to restart the Sql server. In ‘Sql Server Configuration Manager’ select
‘SQL Server Services’ from the left panel.

e) From the right panel, right click ‘SQL Server (MSSQLSERVER)’ and select ‘Stop’ from
the popup menu.
f) Right click ‘SQL Server (MSSQLSERVER)’ again and select ‘Start’ from the popup
menu.

Configure PostgreSQL and Import PostgreSQL data into BlueSky Statistics


To get PostgreSQL “host” address, user id, password and database name, you need to contact your
PostgreSQL server admin.

1. Steps for connecting to PostgreSQL are similar to MS-SQL. Except you need to specify database
name in ‘Database Name’ field.
2. Click “Connect” button and you will see following window. In this window you need to select a
database name from the dropdown and then based on choice you can check “Table” and/or
“Views” checkbox to see tables and/or views in the list box below, on the left. If you click any
table or view name in the left table you will see its column names in the list box, on the right.
Finally, in the text box below, you can write your select query or sub query with join etc. and the
results of the query will be loaded in the data grid of the BlueSky Statistics application.

3. Click ‘OK’ to load the result of select query in the BlueSky Statistics grid.
Configure MySQL and Import MySQL data into BlueSky Statistics
Contact MySQL server admin to get “host” address, user id and password of MySQL server.

1. Connection step are similar to MS-SQL connection steps. Enter MySQL server name, user id and
password.
2. Click “Connect” button and you will see following window. In this window you need to select a
database name from the dropdown and then based on choice you can check “Table” and/or
“Views” checkbox to see tables and/or views in the list box below, on the left. If you click any
table or view name in the left table you will see its column names in the list box, on the right.
Finally, in the text box below, you can write your select query or sub query with join etc. and the
results of the query will be loaded in the data grid of the BlueSky Statistics application.

3. Click ‘OK’ to load the result of select query in the BlueSky Statistics grid.

You might also like