Intro - New York University

Download Report

Transcript Intro - New York University

INFO-9339001 Oracle Database
11g: Administration II
Presented By:
Marc S. Paller, CEO
Contact Information:
CNAPTICS Corporation
Business:
(646) 833-3163
E-Mail:
[email protected]
P.O. Box 173
New York, NY 10159
Copyright (c) 2000-2010 by CNAPTICS Corporation. All rights reserved.
1
Accessing the Oracle DB




Oracle db location is on: oit.scps.nyu.edu
Obtain slides from: http://oit.scps.nyu.edu/~pallerm/11g
Access Database Control: https://oit.scps.nyu.edu:1158/em
Access using ssh:
– Download and install Putty


http://www.chiark.greenend.org.uk/~sgtatham/pu
Use host name: oit.scps.nyu.edu
$ ksh
<enter>
$. .profile
<enter>
– Download and install WinSCP



http://winscp.net/eng/index.php
Use host name: oit.scps.nyu.edu
Join Oracle.
– Go to http://www.oracle.com and create an account.
Copyright (c) 2000-2010 by CNAPTICS Corporation. All rights reserved.
2
Using Linux


Unix does use \ it uses / to separate on directory from
another.
Copying files
– cp <name of file to be copied> <path to and/or name of file to be
copied to>





cp oracle1.sql oracle2.sql
cp oracle1.sql ../oracle2.sql
cp oracle1.sql ../../oracle2.sql
Cp oracle1.sql /next/oracle2.sql
#same directory
#to a directory above
#to two directories above
#to a directory below
Deleting files
– rm <path to and/or name of file to be copied to>



rm oracle1.sql
rm ../oracle1.sql
rm /next/oracle1.sql
#same directory
#from directory above
# from a directory below
Copyright (c) 2000-2010 by CNAPTICS Corporation. All rights reserved.
3
Using Linux

Changing directories
–
–
–
–

cd ../
cd /next
cd ../../
cd /next/next
Editing files
– vi
– emacs

#takes you up one directory
# takes you down one directory
#takes you up two directories
#takes you down two directories
Vim
Another editor
Making Directories
– mkdir <directory_name>
– Can only make directories in your own home directory
Copyright (c) 2000-2010 by CNAPTICS Corporation. All rights reserved.
4
Using Linux

Removing Directories
– rmdir <directory_name>
– Can only remove directories in your own home directory

Home directory
– Located in the /home directory.
– You have complete control over this area of the server.
Copyright (c) 2000-2010 by CNAPTICS Corporation. All rights reserved.
5
Using Linux

Other important directories in your home directory
– web directory


This is where you can place web pages that can be accessed remotely
The URL would be
http://oit.scps.nyu.edu/~username/
– cgi-bin directory


This is where you can place server side includes and other scripts that
you want to access remotely.
The URL would be
http://oit.scps.nyu.edu/cgi-bin/username/
Copyright (c) 2000-2010 by CNAPTICS Corporation. All rights reserved.
6
Creating a User in Oracle



Once you have successfully logged you can access the sql
engine by typing: sqlplus
Next, type in for username and password, system/manager.
Next, at the sqlplus prompt type in the following command:
CREATE USER <username>
IDENTIFIED BY <password>
DEFAULT TABLESPACE data
QUOTA 8M ON data
TEMPORARY TABLESPACE temp
Next the user must be granted privileges to access and use the int
database and their tablespace. So, next we type the following:
GRANT RESOURCE, CONNECT TO <username>
Copyright (c) 2000-2010 by CNAPTICS Corporation. All rights reserved.
7