从哪里获得 Oracle SERVICE_NAME?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5227398/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Where to get Oracle SERVICE_NAME?
提问by karikari
I just installed Oracle database 10g free version for students on my Windows XP. I am confused how to know the SERVICE_NAME? Am running it at my localhost 127.0.0.1, with username SYSTEM. May I know where can I get to know the SERVICE_NAME?
我刚刚在我的 Windows XP 上为学生安装了 Oracle 数据库 10g 免费版。我很困惑如何知道 SERVICE_NAME?我在我的本地主机 127.0.0.1 上运行它,用户名是 SYSTEM。我可以知道在哪里可以了解 SERVICE_NAME 吗?
回答by Gary Myers
It is normally XE for the free version. ORCL is another typical value.
免费版通常是 XE。ORCL 是另一个典型值。
Once logged in, it can be determined from
登录后,可以从
select sys_context('USERENV','SERVICE_NAME') from dual
If you need to know it so that you can log in, look for a file called TNSNAMES.ORA in $ORACLE_HOME/rdbms/network/admin and the service name will probably be in the connection string.
如果您需要知道它以便您可以登录,请在 $ORACLE_HOME/rdbms/network/admin 中查找名为 TNSNAMES.ORA 的文件,服务名称可能会在连接字符串中。
回答by uncaught_exceptions
Since its windows, you can go to control panel - administrative tools - services : (switch to classic mode in control panel if you do not see admin tools). Once there you will have a service by the name "Oracle service_". The is your service name.
从它的窗口开始,您可以转到控制面板 - 管理工具 - 服务:(如果没有看到管理工具,请在控制面板中切换到经典模式)。到达那里后,您将拥有名为“Oracle service_”的服务。是您的服务名称。