Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> Q: view tables, indexes etc. .. must be simple commands
Hi,
I'm migrating from mysql to Oracle. I'm trying to use the oracle client (sqlplus) and tools as I'm accustomed to with msyql. Seems mysql makes difficult things difficult, easy things easy and oracle makes difficult things easy and easy things difficult.
Does anyone know the oracle commands for the following
Assuming I can log on as the master user ... in mysql I do this from a command line:
mysqlshow -u user -ppassword
I get a list of all databases (maybe tablespaces in oracle?)
I can do this:
mysqlshow -u user -ppassword database
and get a list of all tables in that database
I can do this:
mysqldump -u user -ppassword -d database > database-d.sql
and I get just the schema for all tables (no data) plus all indexes set for each table. very convenient.
Or I can do this
mysqldump -u user -ppassword -d database table > database-table- d.sql
To just get the same as above on just a table in a database.
I found an sql script that was a page long just to do some of these things that are just built in to mysql.
I am hoping there are simple equivalents to the above but that they are not in any of the 3 books I bought because ... you have to spend lots of time or money before you just learn the easy things.
Thanks,
Peter