Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 407
  • Last Modified:

default

When we create a table what is the default user ... if we do not specify.
same way what will be the default tablespace..
0
dev_dba
Asked:
dev_dba
  • 2
  • 2
1 Solution
 
Naveen KumarProduction Manager / Application Support ManagerCommented:
default tablespace -> check in dba_users with the below query

select default_tablespace from dba_users
where username='SCOTT'
0
 
Steve WalesSenior Database AdministratorCommented:
If you don't specify an owner, the table is owned by who ever who are connected to the database as.

Type "show user" to see who you are connected as (if in sqlplus).

Each user has a default tablespace assigned when the user is created.  If no tablespace is specified in the create table statement, that tablespace is used.

select default_tablespace from dba_users where username = 'YOUR_OWNER_NAME';
0
 
Naveen KumarProduction Manager / Application Support ManagerCommented:
Before creating a table, you would have connected to the database using a database username right. That would be the username in which you have created the table.
0
 
Steve WalesSenior Database AdministratorCommented:
Further to my above, if not using sqlplus (TOAD or some other tool) you can also do this to see your connected username:

SELECT sys_context('USERENV', 'SESSION_USER') FROM DUAL;
0
 
dev_dbaAuthor Commented:
Thank you..
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now