PLSQL 连接数据库 ORA
在CMD下运行如下命令就可以: lsnrctl status 正在连接到(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=spcc)(PORT=1525))) TNS-12541: TNS:无监听器 TNS-12560: TNS: 协议适配器错误 TNS-00511: 无监听器 32-bit Windows Error: 61: Unknown error 打开监听器
lsnrctl status
正在连接到(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=spcc)(PORT=1525)))
TNS-12541: TNS:无监听器
TNS-12560: TNS: 协议适配器错误
TNS-00511: 无监听器
32-bit Windows Error: 61: Unknown error
打开监听器:
C:\Users\Administrator>LSNRCTL START
LSNRCTL for 32-bit Windows: Version 10.2.0.1.0 - Production on05-11月-2012 15:5
0:53
Copyright (c) 1991, 2005, Oracle.
TNS-01106: 使用名称LISTENER的监听程序已经启动
2.尝试登录本地数据库看是否成功
C:\Users\Administrator>sqlplus /nolog
SQL*Plus: Release 10.2.0.1.0 - Production on 星期一 11月 5 15:53:362012
Copyright (c) 1982, 2005, Oracle.
SQL>
如上所示表示正确连接,且tnsnames.ora文件没有问题,如果连接失败请检查服务是否开启,并且检查tnsnames.ora文件内容是否有误,如下:
orcl =
(DESCRIPTION =
)在orcl前面是不允许出现空格的,并且最好将自己添加的内容放置在原有内容之后。
个人认为上面两项足可以解决该问题了,至于网上其他网友的论述不予评论,本人在检查完上述所有信息后就可以登录了。
这里顺便贴出网友给出的另外的解决方案以便大家参考:
3.如果确保你的tnsnames.ora内容没有错误,那请将%ORACLE_HOME%\product\10.2.0\db_1\NETWORK\ADMIN目录下的所有文件删了,然后重新连接,一般就能解决了。说明一下:那个目录里的文件是在你建立连接的时候动态生成的,不要怕删了会有问题
4.进入PLSQLDeveloper的主界面,在登录界面选择取消即不登录进入主界面,然后选择菜单Tools(工具)-Preferences(首选项),在设置窗口中,选择Oracle-Connection(连接),对应设置窗口中,找到OracleHome(Oracle主目录),选择你本地所安装客户端的版本,保存设置,然后重新启动PLSQLDeveloper,这时就可以正常登录了。
最近买了新电脑,装了64位新系统,突然间又遇到了上面的问题,奇怪了就上面的所有的我都已经验证,到底为什么还是报这个错呢,搞了半天是因为plsql装的位置不对,原来64位win7会把32位应用程序安装到ProgramFiles (x86)目录下,安装的时候我觉得吧这也没什么,结果偏偏是它出问题了,奶奶的,重新装了并且换到C:\ProgramFiles目录下,结果链接正常了,太让人纠结了,还有,为了避免这种问题再度出现,建议oracle客户端也要注意安装路径

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Enter the following command in the administrator command prompt to turn off manage-bde-offC: But sometimes the following prompt appears: Error - This volume stores one or more external keys that can automatically unlock other volumes. This type of key must first be deleted before this volume can be unlocked. At this time, you need to execute the following command first: (If the system partition is not C, change the drive letter below) manage-bde-autounlock-ClearAllKeysc: Error 2: This operation cannot be performed because the volume is locked. manage-bde-unlockc:-rp123456789012345678901234567890123456789012345678 Note:

Apple's latest releases of iOS18, iPadOS18 and macOS Sequoia systems have added an important feature to the Photos application, designed to help users easily recover photos and videos lost or damaged due to various reasons. The new feature introduces an album called "Recovered" in the Tools section of the Photos app that will automatically appear when a user has pictures or videos on their device that are not part of their photo library. The emergence of the "Recovered" album provides a solution for photos and videos lost due to database corruption, the camera application not saving to the photo library correctly, or a third-party application managing the photo library. Users only need a few simple steps

Hibernate polymorphic mapping can map inherited classes to the database and provides the following mapping types: joined-subclass: Create a separate table for the subclass, including all columns of the parent class. table-per-class: Create a separate table for subclasses, containing only subclass-specific columns. union-subclass: similar to joined-subclass, but the parent class table unions all subclass columns.

How to use MySQLi to establish a database connection in PHP: Include MySQLi extension (require_once) Create connection function (functionconnect_to_db) Call connection function ($conn=connect_to_db()) Execute query ($result=$conn->query()) Close connection ( $conn->close())

To handle database connection errors in PHP, you can use the following steps: Use mysqli_connect_errno() to obtain the error code. Use mysqli_connect_error() to get the error message. By capturing and logging these error messages, database connection issues can be easily identified and resolved, ensuring the smooth running of your application.

Using the database callback function in Golang can achieve: executing custom code after the specified database operation is completed. Add custom behavior through separate functions without writing additional code. Callback functions are available for insert, update, delete, and query operations. You must use the sql.Exec, sql.QueryRow, or sql.Query function to use the callback function.

Through the Go standard library database/sql package, you can connect to remote databases such as MySQL, PostgreSQL or SQLite: create a connection string containing database connection information. Use the sql.Open() function to open a database connection. Perform database operations such as SQL queries and insert operations. Use defer to close the database connection to release resources.

JSON data can be saved into a MySQL database by using the gjson library or the json.Unmarshal function. The gjson library provides convenience methods to parse JSON fields, and the json.Unmarshal function requires a target type pointer to unmarshal JSON data. Both methods require preparing SQL statements and performing insert operations to persist the data into the database.
