Table or view is not exist


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Table or view is not exist
# 1  
Old 02-26-2013
Table or view is not exist

If I select the statement on db is ok, but same statement on UNIX script I get

table or view is not exist. what should I do?Smilie
# 2  
Old 02-26-2013
Can you post your script? Without seeing it we can't possibly tell what is wrong.
# 3  
Old 02-26-2013
So:-
  • What database are we talking here?
  • Where is the database hosted?
  • What user do you connect with in each case?
  • What rights to the table does that user have?
  • Anything else relevant that might give us a clue?

Give us a fighting chance please! It's like me asking where I put the pasta in my kitchen. Entering through door A, I put it in a cupboard, then later I walked through door B and blindly picked a cupboard hoping it would have what I wanted. I'm not even sure that door B goes into the kitchen with the detail we have so far.



Robin
# 4  
Old 02-27-2013
just select * from table student.test
What user do you connect with in each case?

/oracle DB
What rights to the table does that user have?
student account on DB environment
# 5  
Old 02-27-2013
Well, the first question is "Is the homework?" because you are looking for a rather unusual table name select * from table student.test
I'm not actually sure what database you are using as that is syntactically incorrect anyway. Try
Code:
select * from student.test

You still not really made clear what you problem is, so can you show us your query transcript, e.g.:-
My OS is this:-
Code:
$ uname -a
Linux dlvmrhpliv01 2.6.32-279.22.1.el6.x86_64 #1 SMP Sun Jan 13 09:21:40 EST 2013 x86_64 x86_64 x86_64 GNU/Linux
$

I set up my environment with this:-
Code:
$export ORACLE_SID=DB
$ export ORACLE_HOME=/opt/oracle/11
$ export PATH=$PATH:$ORACLE_HOME/bin

I can contact the database like this:-
Code:
tnsping db

TNS Ping Utility Version 11.1.0.1.0 - Production on 27-FEB-2013 14:38:45

Copyright (c) 1997, 2006, Oracle Corporation.  All rights reserved.

Used parameter files:
/opt/oracle/11/network/admin/sqlnet.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = db-host1.mycompany.com)(PORT = 1521))) (CONNECT_DATA = (SID = DB)))
OK (0 msec)

I connect as this user:-
Code:
$ sqlplus

SQL*Plus: Release 11.1.0.1.0 - Production on Wed Feb 27 14:38:24 2013

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.

Enter user-name: linc
Enter password: 

Connected to:
Oracle9i Enterprise Edition Release 11.1.0.1.0 - 64bit Production
With the Partitioning option
JServer Release 11.1.0.1.0 - Production
DB>

I run my query like this:-
Code:
DB > select count(*) from user_tables ;

  COUNT(*)
----------
       558

DB >

This will give us some clue as where it's getting stuck and then we can try to work out what diagnostics to get and other questions about what you may be missing.


Robin
Liverpool/Blackburn
Uk
# 6  
Old 02-27-2013
In addition check and verify that you are trying to connect to same DB instance from script:
Code:
select ora_database_name from dual;

Also check and verify if you have given all privileges to user: student on table: test if not, grant privileges:
Code:
grant all on test to student;

Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Web Development

Getting Rid of Annoying Bootstrap Table Borders and Wayward Table Lines

Bootstrap is great; but we have had some issues with Bootstrapped <tables> (and legacy <fieldset> elements) showing annoying, wayward lines. I solved that problem today with this simple jQuery in the footer: <script> $(function(){ $('tr, td, fieldset,... (0 Replies)
Discussion started by: Neo
0 Replies

2. What is on Your Mind?

Moving from Desktop View to Mobile View

See attached video for a demo on how to move back and forth from the desktop view to the mobile view. Currently this only works for the home page, but I will work on some new PHP code in the future to make this work with the page we are currently on. Edit: The issue with making every page ... (2 Replies)
Discussion started by: Neo
2 Replies

3. Shell Programming and Scripting

Build a table from a list by comparing existing table entries

I am new to this shell scripting.... I have a file which contains list of users. This files get updated when new user comes into the system. I want to create script which will give a table containing unique list of users. When I say unique, it means script should match table while parsing... (3 Replies)
Discussion started by: dchavan1901
3 Replies

4. UNIX for Dummies Questions & Answers

Creating a condensed table from a pre-existing table in putty

Hello, I'm working with putty on Windows 7 professional and I'd like to know if there's a way to gather specific lines from a pre-existing table and make a new table with that information. More specifically, I'd like the program to look at a specific column, say column N, and see if any of the... (5 Replies)
Discussion started by: Deedee393
5 Replies

5. Shell Programming and Scripting

Read Table,View,Package,Function and Procedure Name in a File

Hi I am new to Unix shell scripting. But i need help to slove the below issue. Issue description: I want to read table, view names and package names in a file my plan to find the table name is : search "From" key word find the table or view To find the packge name : Search "Package... (5 Replies)
Discussion started by: sboss
5 Replies

6. Shell Programming and Scripting

select values from db1 table and insert into table of DB2

Hi I am having three oracle databases running in three different machine. their ip address is different. from one of the DB am able to access both the databases.(means am able to select values and insert values in to tables individually.) I need to fetch some data from DB1 table(say DB1 ip is... (2 Replies)
Discussion started by: aemunathan
2 Replies

7. Shell Programming and Scripting

Check the record count in table (table in oracle)

I have requirement: 1) Check the record count in table (table in oracle) 2) If records exists generate the file for existing records and wait for some time then Go to sleep mode and Again check the record count after 10 min.......... (Loop this process if record count >0). 3) Generate touch... (1 Reply)
Discussion started by: kamineni
1 Replies

8. Shell Programming and Scripting

Check the record count in table (table in oracle)

I have requirement: 1) Check the record count in table (table in oracle) 2) If records exists generate the file for existing records and wait for some time (Go to sleep mode) and Again check the record count after 10 min.......... (Loop this process if record count >0). 3) Generate touch... (1 Reply)
Discussion started by: kamineni
1 Replies

9. Programming

how to view symbol table in unix

hi , How to view the contents of a "c" program symbol table information in unix. (1 Reply)
Discussion started by: saravanan_nitt
1 Replies
Login or Register to Ask a Question