-1

My problem is that when i create an object it is always stored in sys schema. Normally when you do not specify the schema, the object should be created in the current schema. I'm using toad 12, and the tab current schema is setted correctly.

What i did wrong? Any idea?.

Aramillo
  • 3,176
  • 3
  • 24
  • 49
  • 5
    you're probably logging in 'as sysdba' - don't do that – thatjeffsmith May 18 '15 at 18:49
  • Thanks @thatjeffsmith, that was the problem. – Aramillo May 18 '15 at 18:53
  • there are only a few times you should logon as SYS with with any account using the SYSDBA role - to do database maint work, upgrades, shutdowns, recoveries, etc. in 12c we have introduced new roles, like SYSBACKUP, to allow admins to log on w/o SYSDBA – thatjeffsmith May 18 '15 at 18:58

1 Answers1

3

When you login using the 'AS SYSDBA' - the schema context for your session is set SYS no matter who are logged in as.

From the Docs

When you connect with SYSDBA or SYSOPER privileges, you connect with a default schema, not with the schema that is generally associated with your username. For SYSDBA this schema is SYS; for SYSOPER the schema is PUBLIC.

It's much better practice to ONLY use as sysdba when doing something like taking a backup or shutting down the database or doing an upgrade.

thatjeffsmith
  • 20,522
  • 6
  • 37
  • 120