Getting Started
This guide introduces users with new data storage allocations to Data Central. It provides instructions on logging in to various points of entry, as well as transferring data once logged in. Please note that a user must have a data storage allocation, which is different from a compute allocation. To apply for a data storage allocation, please visit the Data Cental "Applying for Data Resources" page.
Although Data Central is a collection of various data storage resources, in the scope of this guide it is treated as a single resource to provide for simplicity and better understanding. For more information on the infrastructure and composition of Data Central, please see the Data Central Resources page.
Logging In
Data-login Node
Most Data Central resources are available from our main login node, data-login.sdsc.edu. Access the host via ssh. The command to log in as user is:
% ssh user@data-login.sdsc.edu
Once you are logged in, you can find your files or data through the UNIX file system. For disk and tape collections, you will have a subdirectory located in /archive/science.
Database Login
DB2
Access to the DB2 database on DataStar is managed through additional permissions for a user's system account on DB2.
- Log in to DataStar using ssh. The command to log in as user on machine dsxxx
(e.g., ds001, ds003, etc.) is:
% ssh user@dsxxx.sdsc.edu
or if you need X11 forwarding:
% ssh -X user@dsxxx.sdsc.edu
- Type your DataStar password after the prompt.
- Set up the database environment by running the startup script for your shell:
- For sh, ksh, or bash shells:
$ . $INSTHOME/sqllib/db2profile
- For csh or tcsh shells:
% source $INSTHOME/sqllib/db2cshrc
$INSTHOME is the home directory of the database instance. For example, the db2i002 instance home is located in /dbms/db2/home/db2i002. So, the correct command would be:
$ . /dbms/db2/home/db2i002/sqllib/db2profile
- For sh, ksh, or bash shells:
- Use the DB2 Command Line Processor (CLP) to connect and issue SQL statements. The command
db2 starts the CLP:
% db2
At this point, you can issue SQL statements. For example:
db2 =>
db2 => connect to test;
db2 => select * from test_table
Oracle
Access to the Oracle database is managed through an Oracle user account.
To log in from data-login.sdsc.edu:
- Update your data-login environment variables.
Log into data-login and add the following variables to your .login file in your home directory: - Reinitialize your environment by issuing the source command.
% source .login
- Download the tnsnames.ora file to your home directory
- Use sqlplus to connect using your Oracle user account and issue SQL statements. To connect
as user to Oracle 10g RAC environment:
suda > sqlplus user@srb_rac.sdsc.edu
To connect as user to Oracle 9i environment:
suda > sqlplus user@qrc.sdsc.edu
At this point, you can issue SQL statements. For example:
SQL> select * from cat;
setenv ORACLE_HOME
/usr/local/apps/oracle/product/10.2.0.2setenv LD_LIBRARY_PATH
/usr/local/apps/oracle/product/10.2.0.2/
lib:$LD_LIBRARY_PATHsetenv ORACLE_PATH
/usr/local/apps/oracle/product/10.2.0.2/binsetenv PATH ${ORACLE_PATH}:${PATH}
To log in from a local client:
- Download Oracle client software (if you do not have it installed already) from www.oracle.com.
- Download the tnsnames.ora file to your local $ORAHOME/network/admin directory, where ORAHOME is the location of your Oracle home directory.
- You can now run sqlplus locally and connect to the dac instance at Data Central.
To log in as user, use the following command from a command line or shell prompt:
% sqlplus user@dac.sdsc.edu
At this point, you can issue SQL statements. For example:
SQL> select * from cat;
SRB
If you are an SRB data allocation user without compute allocations, your account may already be set up. To find more information on activating your SRB account, see the SRB User Guide.
Command-line access
- Log in to a machine with Scommand binaries installed (via ssh from UNIX machines or win32
binaries from command window). TeraGrid clusters have the SRB Scommands installed.
Or: download and compile Scommand source. - Set up your connection parameters:
- Verify the ~/.srb/.MdasEnv file:
mdasCollectionHome '/home/<username>.<domain>'
srbUser '<username>'
mdasDomainName '<domain>'
AUTH_SCHEME 'ENCRYPT1'
srbHost 'srb.sdsc.edu'
srbPort '<srbPort>'
defaultResource '<disk or tape resource name>'
- Create or verify the ~/.srb/.srbAuthFile file with the Sauth command:
$ Sauth
- Enter your current SRB password. You will see:
Successfully wrote ~/.srb/.srbAuthFile
- Verify the ~/.srb/.MdasEnv file:
Once you have verified and/or created these files, you have access to your SRB-related files.
Windows GUI access
- Download Scommand binaries.
- Connect to SRB:
- Enter Connection Parameters
Name: <username>
Host: srb.sdsc.edu
Domain: <domain>
Port: <srbPort>
Authorization: ENCRYPT1 - Click the Add New Connection button.
- Enter your password.
- Connect.
- Enter Connection Parameters
Transferring Data
This information is specifically for data allocations users. Some users with TeraGrid allocations may have other commands available to them. For more information on TeraGrid data transfer, see the help on tgcp and globus.
Data-login directory
Disk and/or tape allocations are located in a directory under /archive/science on the data-login node. Store all data files in this directory. The directory will be named after your username, project name, or project code.
SCP
For data files up to 2 GB, scp is recommended for transferring files on the data-login node. For example, to copy test_file.tst to your (user) subdirectory named /archive/science/mydir:
% scp test_file.tst user@data-login.sdsc.edu:/archive/science/mydir
BBFTP
For files greater than 2 GB, bbftp is recommended for transferring files on the data-login node. bbftp is similar to ftp. For example, to copy test_file.tst to your (user) /archive/science/mydir subdirectory, the command is:
% bbftp -s -e 'put test_file.tst /archive/science/mydir/test_file.tst' -u user -p 10 -V data-login.sdsc.edu
- Linux/Unix: download bbftp from http://doc.in2p3.fr/bbftp/download.html. Installation instructions are found at http://doc.in2p3.fr/bbftp/doc.3.2.0.html.
- Windows: To use bbftp from Windows, Cygwin must be installed on your machine. Download the Cygwin compiled client bbftp-client-cygwin-3.2.0.zip.
TGCP
For high performance transfers, tgcp is recommended for transferring files on the data-login node. tgcp is similar to scp. For example, to copy test_file.tst to your (user) /archive/science/mydir subdirectory, the command is:
% tgcp test_file.tst archive.sdsc.edu/archive/science/mydir
Transferring data through SRB
Upload/Download with checksum verification
The following command recursively uploads a local directory testdir. The server then computes the checksum by reading back the files just uploaded and verifies them with the checksum values computed locally.
% Sput -Kvr testdir
Download SRB files and verify the checksum value by comparing the registered value with the checksum of the local file just downloaded.
% Sget -kvr testdir testdir1

