Quest Toad Default Schema Upon Logon - oracle

Our Oracle database has 500+ database users ( one for each 'human' user ). We are using TOAD Version 11.5
After every logon, I have to switch to the application schema, which means choosing the schema from a very long "users" dropdown list.
Is there a way to set a default schema upon logon ?

If you just want to pre-select the schema in the Schema Browser, for example, then right-click the Schema Dropdown and choose the "Set XYZ as Default Schema" menu item. If you are referring to some other place in Toad then please be specific.

You can set an Auto Connect connection too. From the session/new connection window, scroll right and check the box for "Auto Connect" on the connection you want. When you start Toad, it will auto-connect to the entry you selected.

Related

Why Oracle prepend the Schema name to created procedures?

I'm connecting to a new Oracle database with Toad.
If a create a procedure like:
create or replace procedure MyProc...
After I compile it, the name automatically is changed to
SchemaName.MyProc
This doesn't happen in other Oracle databases where I'm doing the same test.
Is that a database configuration?
Thanks!
If you open TOAD settings, you'll find it here:
Editor - Open/save
Object loading
if set to "Always include", you'll see owner name (SCOTT in my example)
if you set it to "Never include", owner name isn't visible any more

Previous table appearing in new connection in Oracle database

Every time I create a new connection under the same common user on the SQL Developer tool it automatically copies the table(s) of the previous connection.
I am using Oracle Database 19c on the SQL developer tool.
In the below picture, there is a table having 2 columns.
In the below image, I have created a new connection, but it already has the previous tables.
troubleshooting steps I have followed so far -:
disconnected the previous connection: not solved
deleted the previous tables & connection: not solved
restarted SQL developer tool: not solved
deleted user and created again: this works but can't do it every time.
I have created a table using steps on this website: sqlserverguides
Please Advise :-)
The answer to your question here is that you are not doing what you think you are doing.
The objects newfirm and newtable are not tables, these are connections.
A connection needs a username and a password, a hostname to connect to, a port number, and a service name (or SID).
Once you are connected to a database server, all the "folders" you see under that connection are all related to the user used for the connection.
If you want to look at other users (be it sys or service users, or "people"), then you need to go to the folder "other users" in the same tree.
The screenshots you are showing there in your question only show 2 distinct connections (we don't know if the same details such as username + hostname were used) each with their own label/name (newfirm and newtable).
You can't "disconnect" a table, you also can't delete it .. you can drop it however which is likely what you meant.
In your screenshots, what you are pointing at and calling columns are actually tables.
Those things that you are pointing at and calling "previous table" and "new table" are not tables but connections (to a database server using a specific username).
You do not show any code you may be using, which would be useful.
If you want to drop a table (i.e. delete), you use the DROP command:
DROP TABLE user.tablename;
It is not possible for 2 tables with the same name to exist in the same schema (aka user).

Database Schema Mapping of IntelliJ Persistence tool is empty

I already assign data source and get these table, but I still can not Mapping my Column name (like the picture)
How should I do it?
I'm using H2 DB.
I think you have only selected the "current schema" - which is the one you used to create your datasource/connection. You need to add/select the owning schema for the objects you wish to map.
OPTION 1 -
During Datasource Setup:
Data Sources and Drivers Window
Select the "Schemas" tab (the tool opens on the "General" tab) and choose the schema under which the object you are looking to map exists.
OPTION 2 -
After Datasource Setup
You can follow the instructions for new datasource setup if you can get back to the window where you initially set up the datasource, however, there is a shortcut. If you were able to successfully create a datasource, you should see that data source in the IntelliJ "Database Tool Window" (View > Tool Windows > Database). There is a small pill icon that you can interact with. Mine says "3 of 2195" - this is telling you that you have visibility of 3 schemas of a total 2195 available. Click the pill icon. Find the schema that owns the table you need to map and select it.
After Option 1 OR 2
You should then be able to navigate to the persistence tool, right click your project, and select "Generate Persistence Mapping", then click "By Database Schema". Once you select a datasource in the "Import Database Schema Window" you should see all the objects(tables) available for mapping.
NOTE:
I am running IntelliJ Ultimate Edition v2020.1. I am connecting and mapping objects from an enterprise Oracle 12c database (can't really share screenshots so I will try to be descriptive)
I know I was pulling my hair out so I hope someone finds this helpful!

Pl-Sql User Connection

I've been starting oracle on my job. But i've been using MS all the time. Now i have problem on User-Shema structure. I tryed a create table with sql query, but table had been created in somewhere else then i wanted. (I've already created a user named LPA) I just wrote the query, and table is in the (GeneralDatabase) Tablespaces->Users->(Here). I want to create a table in LPA schema, under the table folder. I've been searching for it but i could'nt get it. So need some help please.
PS:I found that i need to connect with user, than write to query with TS_LPA(Thats my tablespace). But i also cant connect with the user LPA.(We can say this is my first problem)
In Oracle there is no "dbo" or default schema, in case that is what you are looking for. You must specify the target user account when you connect (log in) to the database, and that account will be used as the default schema for all of your subsequent actions. (This is similar to a home directory in Linux, where if I log in as williamr and create a file, it will belong to williamr and not some generic default account.)
In your case I suspect you are connecting as SYS or similar, in which case your table now belongs to SYS (or whoever you are connected as). You'll need to drop it and try again.
If you don't want to post the connect string you used to connect initially for some reason, then execute the following query to see your current schema:
select user, sys_context('userenv','current_schema') from dual;
(Normally user and sys_context('userenv','current_schema') will be the same, but worth double-checking.)
In PL/SQL Developer you can only issue connect commands from a Command window (not a SQL window). Alternatively you can use the 'log on' menu tool, or Session > Set Main Connection from the menu, or (best if you want to reuse it later) Tools > Define Connections, which has a 'Test...' button to validate a new connection. You'll need the username, password and database service name (not just username and password).
connect with LPA user.
specify the schema name before table name.
create table LPA.tbl_name(col1 datatype1,....);

How to change schema name in Crystal report 11?

The report is being designed in Crystal Reports XI.
It uses an ODBC connection to an Oracle database using the CR Oracle ODBC driver 4.1.
I need this report to be easily distributed across 14 sites that use the same ODBC DSN, but the database at each site has a different owner and/or schema name.
I followed Business Objects instructions to modify the fully qualified name for each table in a report:
On the 'Database' menu, click 'Set Datasource Location'. The 'Set Datasource Location' dialog box appears.
In the 'Current Data Source' area, expand the list of current connections in order to view each table in the report.
For each table in the report:
i. Expand the 'Properties' list.
ii. Click 'Overridden Qualified Table Name', and then press the F2 key or double-click.
iii. Move the cursor to the end of the text and type the table name.
iv. Press Enter.
I am getting error
Crystal Reports
Failed to retrieve data from the database.
Details: ORA-00942: table or view does not exist
[Database Vendor Code: 942 ]
I either need a fix for these errors or a better way to make these Oracle reports more portable.

Resources