<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>惜分飞 &#187; ORACLE_PDB_SID</title>
	<atom:link href="https://www.xifenfei.com/tag/oracle_pdb_sid/feed" rel="self" type="application/rss+xml" />
	<link>https://www.xifenfei.com</link>
	<description>提供7*24专业数据库(Oracle,SQL Server,MySQL,PostgreSQL等)恢复和技术支持@Tel:17813235971</description>
	<lastBuildDate>Sat, 07 Nov 2026 15:45:44 +0000</lastBuildDate>
	<language>zh-CN</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>非tns方式登录pdb方法</title>
		<link>https://www.xifenfei.com/2023/10/no-tns-login-pdb.html</link>
		<comments>https://www.xifenfei.com/2023/10/no-tns-login-pdb.html#comments</comments>
		<pubDate>Mon, 09 Oct 2023 14:16:04 +0000</pubDate>
		<dc:creator><![CDATA[惜分飞]]></dc:creator>
				<category><![CDATA[ORACLE 19C]]></category>
		<category><![CDATA[ORACLE_PDB_SID]]></category>

		<guid isPermaLink="false">https://www.xifenfei.com/?p=10457</guid>
		<description><![CDATA[联系：手机/微信(+86 17813235971) QQ(107644445)  &#8230; <a href="https://www.xifenfei.com/2023/10/no-tns-login-pdb.html">继续阅读 <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<div id="xifenfeicopyright">
<p>联系：<a href="https://www.xifenfei.com/about_xifenfei" target="_blank">手机/微信(+86 17813235971)   QQ(107644445)</a><a target="_blank" href="http://wpa.qq.com/msgrd?v=3&#038;uin=107644445&#038;site=qq&#038;menu=yes"><img src="https://www.xifenfei.com/wp-content/themes/img/site_qq.jpg" alt="QQ咨询惜分飞" title="QQ咨询惜分飞"/></a></p>
<p>标题：<a href="https://www.xifenfei.com/2023/10/no-tns-login-pdb.html" target="_blank">非tns方式登录pdb方法</a></p>
<p>作者：<a href="https://www.xifenfei.com" target="_blank">惜分飞</a>©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]</p>
</div>
<p>非tns方式登录pdb方法之&#8212;-alter session set container</p>
<pre class="brush: sql; title: ; notranslate">
[oracle@db01 ~]$ env|grep ORA
ORACLE_SID=DCXFF
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=/u01/app/oracle/product/19c/db_1
[oracle@db01 ~]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Mon Oct 9 22:10:34 2023
Version 19.20.0.0.0

Copyright (c) 1982, 2022, Oracle.  All rights reserved.


Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.20.0.0.0

SQL&gt; show pdbs;

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 XFFPDB1                        READ WRITE NO
SQL&gt; show con_name;

CON_NAME
------------------------------
CDB$ROOT
SQL&gt; alter session set container=XFFPDB1;

Session altered.

SQL&gt; show con_name;

CON_NAME
------------------------------
XFFPDB1
SQL&gt; exit
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.20.0.0.0
</pre>
<p>非tns方式登录pdb方法之&#8212;-ORACLE_PDB_SID</p>
<pre class="brush: sql; title: ; notranslate">
[oracle@db01 ~]$ export ORACLE_PDB_SID=XFFPDB1
[oracle@db01 ~]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Mon Oct 9 22:11:30 2023
Version 19.20.0.0.0

Copyright (c) 1982, 2022, Oracle.  All rights reserved.


Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.20.0.0.0

SQL&gt; SHOW pdbs;

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         3 XFFPDB1                        READ WRITE NO
SQL&gt; show con_name;

CON_NAME
------------------------------
XFFPDB1
SQL&gt; exit
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.20.0.0.0
</pre>
<p>参考:How To Connect to PDB By OS Authentication In 19c Container Database Environment (Doc ID 2729416.1)</p>
<div id="crp_related"><ul><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2014/11/%e8%ae%be%e7%bd%aepdb%e9%9a%8fcdb%e4%b8%80%e8%b5%b7%e5%90%af%e5%8a%a8.html" rel="bookmark" class="crp_title">设置pdb随cdb一起启动</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2020/11/19c-root-pdb-undo-lost-recovery.html" rel="bookmark" class="crp_title">模拟19c数据库root pdb undo异常恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2013/08/%e6%9f%90%e4%b8%aapdb%e5%8f%af%e4%bb%a5%e5%9c%a8root-pdb-open%e7%8a%b6%e6%80%81%e4%b8%8b%e8%bf%9b%e8%a1%8c.html" rel="bookmark" class="crp_title">某个pdb可以在root pdb open状态下进行恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2013/05/oracle-12c-pdb-%e7%ae%a1%e7%90%86%e4%bb%8b%e7%bb%8d1.html" rel="bookmark" class="crp_title">ORACLE 12C PDB 维护基础介绍</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2012/12/oracle-12c-move-datafile%e6%b5%8b%e8%af%95.html" rel="bookmark" class="crp_title">ORACLE 12C move datafile测试</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2013/06/oracle-12c-cdb%e4%b8%adpdb%e5%8f%82%e6%95%b0%e7%ae%a1%e7%90%86%e6%9c%ba%e5%88%b6.html" rel="bookmark" class="crp_title">ORACLE 12C CDB中PDB参数管理机制</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2024/07/oracle-23ai-install.html" rel="bookmark" class="crp_title">oracle 23ai（23.5.0.24.07）完整功能版安装体验</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/01/oracle-user-read-only.html" rel="bookmark" class="crp_title">Oracle read only用户&#8212;23ai新特性:只读用户</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2024/07/grant-select-any-table-on-schema.html" rel="bookmark" class="crp_title">Oracle23ai新特性&#8212;SCHEMA级授权( grant select any table on schema)</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2013/08/4629.html" rel="bookmark" class="crp_title">pdb正常运行丢失数据文件相关恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2011/10/sys%e7%94%a8%e6%88%b7%e5%af%86%e7%a0%81%e5%90%ab-sqlplus%e7%99%bb%e5%bd%95%e6%95%b0%e6%8d%ae%e5%ba%93%e8%af%a1%e5%bc%82%e4%ba%8b%e4%bb%b6%e5%88%86%e6%9e%90.html" rel="bookmark" class="crp_title">sys用户密码含$ sqlplus登录数据库诡异事件分析</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2013/07/11gr2%e5%8d%87%e7%ba%a7%e5%88%b012gr1%e5%b9%b6%e6%8f%92%e5%85%a5cdb.html" rel="bookmark" class="crp_title">11GR2升级到12CR1并插入CDB</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>https://www.xifenfei.com/2023/10/no-tns-login-pdb.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
