为什么要在 sys 模式中创建对象?

why objects are being created in sys schema?

我的问题是,当我创建一个对象时,它总是存储在 sys 架构中。通常当您不指定模式时,应该在当前模式中创建对象。我使用的是 toad 12,选项卡当前架构设置正确。

我做错了什么?有什么想法吗?

当您使用 'AS SYSDBA' 登录时 - 无论以谁身份登录,您的会话的架构上下文都设置为 SYS。

来自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.

最好只在执行备份、关闭数据库或升级等操作时使用 sysdba。