UbuntuThis forum is for the discussion of Ubuntu Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
As I understand the question, you want to run sqlplus from the command line.
So long as your environment variables are set up correctly, all you should need is to type sqlplus.
However, if you want to run this from another machine, that machine would need to have the Oracle client components installed on it. Additionally you would need to have tnsnames.ora file configured with the information about the database instance you want to connect to.
Environment variables to consider are:
ORACLE_HOME (location Oracle has been installed to)
ORACLE_SID (database that you want to connect to)
NLS_DATE_FORMAT (Format Oracle will display dates in)
Ensure that the PATH variable contains $ORACLE_HOME/bin
As I understand the question, you want to run sqlplus from the command line.
So long as your environment variables are set up correctly, all you should need is to type sqlplus.
However, if you want to run this from another machine, that machine would need to have the Oracle client components installed on it. Additionally you would need to have tnsnames.ora file configured with the information about the database instance you want to connect to.
Environment variables to consider are:
ORACLE_HOME (location Oracle has been installed to)
ORACLE_SID (database that you want to connect to)
NLS_DATE_FORMAT (Format Oracle will display dates in)
Ensure that the PATH variable contains $ORACLE_HOME/bin
how to change the path variable???.
which file i have to edit??
(is it in /etc/rc2.d ???)
if i remember correctly i think in windows we have to edit autoexec.bat file and add the the line path=%path%;ORACLE_HOME/bin
(correct me if i am wrong)
insert into pets_like_boys values('fluffy', 'sam');
insert into pets_like_boys values('rover', 'bob');
insert into pets_like_boys values('skippy', 'joe');
insert into boys_like_girls values('bob','jill');
insert into boys_like_girls values('sam','betty');
insert into boys_like_girls values('joe','sue');
insert into boys_like_girls values('george','jill');
insert into girls_like_pets values('sue','fluffy');
insert into girls_like_pets values('jill','skippy');
insert into girls_like_pets values('betty','rover');
alter table pets_like_boys
add constraint pets_like
foreign key (boys_name )
references boys_like_girls
on delete cascade;
alter table boys_like_girls
add constraint boys_like
foreign key (girls_name )
references girls_like_pets
on delete cascade;
alter table girls_like_pets
add constraint girls_like
foreign key (pets_name )
references pets_like_boys
on delete cascade;
select * from pets_like_boys;
select * from boys_like_girls;
select * from girls_like_pets;
delete from boys_like_girls where boys_name = 'bob';
select * from pets_like_boys;
select * from boys_like_girls;
select * from girls_like_pets;
insert into pets_like_boys values('fluffy', 'sam');
insert into pets_like_boys values('rover', 'bob');
insert into pets_like_boys values('skippy', 'joe');
insert into boys_like_girls values('bob','jill');
insert into boys_like_girls values('sam','betty');
insert into boys_like_girls values('joe','sue');
insert into boys_like_girls values('george','jill');
insert into girls_like_pets values('sue','fluffy');
insert into girls_like_pets values('jill','skippy');
insert into girls_like_pets values('betty','rover');
alter table pets_like_boys add constraint pets_like foreign key (boys_name) references boys_like_girls(boys_name) on delete cascade;
alter table boys_like_girls add constraint boys_like foreign key (girls_name) references girls_like_pets(girls_name) on delete cascade;
alter table girls_like_pets add constraint girls_like foreign key (pets_name) references pets_like_boys(pets_name) on delete cascade;
select * from pets_like_boys;
select * from boys_like_girls;
select * from girls_like_pets;
delete from boys_like_girls where boys_name = 'bob';
select * from pets_like_boys;
select * from boys_like_girls;
select * from girls_like_pets;
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.