ORA-12162: TNS:net service name is incorrectly specified

用Arduino UNO R4的LED矩阵做游戏:从‘弹球’到‘双人对战乒乓球’的代码升级指南 本文详细介绍了如何利用Arduino UNO R4的LED矩阵从简单的弹球游戏升级为双人对战乒乓球游戏。通过代码示例和架构设计,展示了如何实现球拍控制、碰撞检测和得分系统,并提供了硬件准备、输入控制和显示优化的实用技巧。适合硬件爱好者进阶学习Arduino游戏开发。 阅读详情
【故障处理】ORA-12162: TNS:net service name is incorrectly specified

本文将给大家阐述一个因未设置系统环境变量ORACLE_SID导致ORA-12162错误的案例。希望大家有所思考。

1.获得有关ORA-12162报错信息的通用表述信息
[oracle@asdlabdb01 ~]$ oerr ora 12162
12162, 00000, "TNS:net service name is incorrectly specified"
// *Cause:  The connect descriptor corresponding to the net service name in
// TNSNAMES.ORA or in the directory server (Oracle Internet Directory) is
// incorrectly specified.
// *Action: If using local naming make sure there are no syntax errors in
// the corresponding connect descriptor in the TNSNAMES.ORA file. If using
// directory naming check the information provided through the administration
// used for directory naming.


2.故障现象
本文所要描述的故障与这个通用的问题描述不同,在数据库服务器端使用TNSNAMES.ORA中记录的连接串连接没有问题,但如若未指定连接串,将会报出ORA-12162错误。

1)使用system用户尝试登录系统,此时便会收到报错如下信息
[oracle@asdlabdb01 ~]$ sqlplus system/sys

SQL*Plus: Release 10.2.0.3.0 - Production on Sat Aug 27 22:54:02 2010

Copyright (c) 1982, 2006, Oracle.  All Rights Reserved.

ERROR:
ORA-12162: TNS:net service name is incorrectly specified


Enter user-name:

2)使用sysdba身份登陆会得到同样的错误信息
[oracle@asdlabdb01 ~]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.3.0 - Production on Sat Aug 27 22:54:48 2010

Copyright (c) 1982, 2006, Oracle.  All Rights Reserved.

ERROR:
ORA-12162: TNS:net service name is incorrectly specified


Enter user-name:

3)但此时,如果使用服务名方式连接数据库,是可以成功的,这也是该问题现象的诡异之处。
[oracle@asdlabdb01 ~]$ sqlplus system/sys@ora10g

SQL*Plus: Release 10.2.0.3.0 - Production on Sat Aug 27 22:53:41 2010

Copyright (c) 1982, 2006, Oracle.  All Rights Reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, Oracle Label Security, OLAP and Data Mining Scoring Engine options

system@ora10g>

想象一下,你的目标是快速的进入到数据库中进行维护操作,但此时登录都遭遇障碍,会感到非常的别扭。更让人抓狂的是,如果此时使用连接串登录到数据库进行停起操作,结果将会处于更加惨烈境况:数据库将因为无法正常登录导致无法启动数据库。

3.故障原因
诡异的故障背后的原因竟然是那样的基础:ORACLE_SID没有指定!
确认系统当前的ORACLE_HOME和ORACLE_SID环境变量
[oracle@asdlabdb01 ~]$ echo $ORACLE_HOME
/oracle/app/oracle/product/10.2.0/db_1
[oracle@asdlabdb01 ~]$ echo $ORACLE_SID

[oracle@asdlabdb01 ~]$

可见,此时只设置了ORACLE_HOME环境变量,但ORACLE_SID此时为空,这就是该问题的真实原因。

4.故障处理
给出ORACLE_SID,重新尝试登录。
[oracle@asdlabdb01 ~]$ export ORACLE_SID=ora10g
[oracle@asdlabdb01 ~]$ echo $ORACLE_SID
ora10g
[oracle@asdlabdb01 ~]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.3.0 - Production on Sat Aug 27 23:27:34 2010

Copyright (c) 1982, 2006, Oracle.  All Rights Reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, Oracle Label Security, OLAP and Data Mining Scoring Engine options

sys@ora10g>

OK,此时问题处理完毕。

5.小结
这个案例给我们的启迪是什么?
1)系统默认的错误提示信息有时不具有参考价值。而且,某些情况下这些错误提示还可能给我们带来误导。原因很简单,系统默认的错误提示信息不可能囊括所有故障现象;
2)任何系统级别的设置问题都有可能导致数据库系统出现异常;
3)在遇到故障的时候,我们需要沉着冷静。有些时候可能需要我们Check最原始的信息,切莫想当然。

建议:为了避免出现文章中提到的问题,第一,可以将ORACLE_SID等环境变量写入到系统profile中,但需要确保系统profile文件内容的有效性;第二,不在profile中进行填写,每次登录数据库服务器时手工完成数据库环境变量的指定,这种方法虽然增加了键盘的敲击,但它更直观、更有保障。

Good luck.

secooler
10.08.27

-- The End --

微信小程序 - 详细实现打开跳转第三方 H5 网页链接,在微信小程序内直接跳转打开第三方网站链接详细教程(支持跳转公众号文章等,直接复制代码即可) 小程序跳转h5,小程序-Taro小程序中打开h5页面链接,...小程序跳转h5链接(web-view)_微信小程序,小程序如何跳转h5页面,小程序跳转到第三方H5网页,微信小程序跳转第三方H5的方法,小程序-实现怎么跳转打开H5网页链接(或跳转至公众号文章,打开第三方网站,放校验文件,怎么配置业务域名,校验文件验证域名,把校验文件放到对面网站,别人的服务器也打不开没权限怎么放呢,勾选不校验合法域名,txt,打不开别人的网页怎么办,真机调试打不开,无法跳转,有什么其他办法不放校验文件吗,后台配置,怎么 阅读详情

相关推荐

PCB模块化设计24——DCDC电源模块PCB布局布线设计规范

PCB模块化设计24——DCDC电源模块PCB布局布线设计规范

qq_31444421的博客 2万+

【故障处理】ORA-12162: TNS:net service name is incorrectly specified

【故障处理】ORA-12162: TNS:net service name is incorrectly specified 本文将给大家阐述一个因未设置系统环境变量ORACLE_SID导致ORA-12162错误的案例。希望大家有所思考。 1.获得有关ORA-12162报错信息的通用表述信息 [oracle@asdlabdb01 ~]$ oerr ora 12162 12162, 00000, “TNS:net service name is incorrectly specified” // *Cause

u011047145的博客 8129

Oracle-如何修复undo坏快

undo出现坏快,导致数据库宕机,无法启动

qqqyyy0422的博客 573

Oracle“ ORA-12162:TNS:net服务名称指定不正确”错误和解决方案

During the connection to the Oracle Database server with the sqlplus we may get an error with theORA-12162 specifier. This error will prevent to connect to the Oracle Database Server. 在使用sqlplus连接到Or...

cunjiu9486的博客 1万+

学 Simulink——基于递推最小二乘法(RLS)的工业电机转动惯量 J在线辨识仿真

Te 估算 = 1.5·p·(ψ·iq + (Ld-Lq)·id·iq)回归量:φ(k)=−ω˙(k), y(k)=Te​(k), θ=J。仿真:电机加速 0→1500rpm,观测 J^(k)→Jnom​。(可选) Jtrue​切 0.04(双惯量负载)→ 看跟踪。电机机械运动方程:Te​−TL​=J⋅ω˙+B⋅ω。J^(0)=0.005→收敛至0.02kg⋅m2✔。Te​:电磁转矩(Nm),已知(来自电流环输出)仅需 Te​,ω(驱动器已有)→ 无额外传感 ✔。

amy_mhd的博客 45

在 SAP BTP ABAP 环境里直连 ABAP On-Premise OData

摘要 SAP BTP ABAP Environment 2311版本后,OData集成链路迎来重大改进:Service Consumption Model升级为v2版本,通过压缩模型到单一类减少对象数量;通信管理推荐采用Communication Arrangement替代传统Destination,提供更清晰的治理边界。新版支持同时生成OData v2/v4消费模型,并通过标准工厂类创建代理。配置需关注四层对象:Outbound Service声明协议入口,Scenario定义认证方式,System描述通

2007 年 ~ 2025 年,深耕 SAP 技术 18 年 1923

oracle12162错误,ORA-12162: TNS:net service name is incorrectly specified报错问题如何解决?...

今天使用oracle用户登录sqlplus出现“ORA-12162: TNS:net service name is incorrectly specified”。如下:[oracle@oracle ~]$ sqlplusSQL*Plus: Release 10.2.0.1.0 - Production on Wed Feb 29 19:19:26 2012Copyright (c) 1982, ...

weixin_33448555的博客 5763

Android 13.0 展讯平台关机充电动画横屏显示修改

在13.0的系统rom定制化开发中,在关于展讯平台的产品中,系统默认的充电动画是竖屏显示的,但是在像平板的产品中竖屏动画肯定不符合规范, 所以需要在平板TV产品中,充电动画同时也是需要修改为横屏显示的,接下来就来分析下充电动画的相关绘制流程,然后实现功能

安卓兼职framework和app工程师的博客 410

ORA-12162: TNS:net service name is incorrectly specified 错误解决

本文将给大家阐述一个因未设置系统环境变量ORACLE_SID导致ORA-12162错误的案例。希望大家有所思考。 1.故障现象 本文所要描述的故障与这个通用的问题描述不同,在数据库服务器端使用TNSNAMES.ORA中记录的连接串连接没有问题,但如若未指定连接串,将会报出ORA-12162错误。 1)使用system用户尝试登录系统,此时便会收到报错如下信息 [oracle@asd

苏南生的优快云博客 4万+

【DRAM存储器五十一】LPDDR5介绍--DFE与Pre-Emphasis

简述LPDDR5的DFE和预加重应用设置

highman110的博客 712

华为eNSP镜像包全集下载,包含CE6800、CE12800、NE系列等!

你好,这里是网络技术联盟站。昨天给大家介绍了win11、10下安装eNSP最新系列(1.3.00)并完美运行,附下载。从文章发布到发文前,一直有朋友想让瑞哥提供一下华为ENSP镜像包,今天安排!eNSP安装包、以及eNSP中所需要的镜像包(设备包)(CE、CX、NE40E、NE5000E、NE9000、USG)例如:导入一个USG设备包,eNSP中的USG5500和USG6000V都是可以启动的。如果你的报错“40”的话,那么打开Oracle VM VirtualBox这个虚拟机,删除对应报错的虚拟机,然后

网络技术联盟站 3万+

ORA-12162: TNS:net service name is incorrectly specified.

ORA-12162: TNS:net service name is incorrectly specified.

Java学习之道 3558

YOLO11涨点优化:Loss魔改 | WIoU (Wise-IoU) v3版本全面替换,基于动态非单调聚焦机制,让模型更聪明地学习

YOLOv11目标检测中的WIoU v3损失函数改进 本文探讨了YOLOv11目标检测模型中CIoU损失函数的局限性,并提出了WIoU v3改进方案。关键发现包括: CIoU的缺陷:在低质量样本(小目标/遮挡目标)上过度惩罚,导致模型优化方向偏离,小目标AP往往比大目标低30%左右。 WIoU v3的创新: 动态非单调聚焦机制:根据样本"离群度"智能分配梯度 让模型重点优化中等质量样本,减少对低质量样本的无效关注 采用指数移动平均来自适应调整质量评判标准 实际效果:WIoU v3在保持大

2601_95807009的博客 425

Linux下报ora-12162,ORA-12162: TNS:net service name is incorrectly specified

概述因未设置系统环境变量ORACLE_SID导致ORA-12162错误分析原因首先登录数据库主机执行 oerr ora 12162我们首先查看看下 tnsnames.ora文件执行tnsping CC命令 检查下是否可以tnsping通,核对IP和端口以及实例名数据库服务器端使用TNSNAMES.ORA中记录的连接串连接没有问题查看是否指定ORACLE_SID,使用echo $ORACLE_HOM...

weixin_42314399的博客 1257

NTscan扫描工具

ntscan是一个扫描器,可以扫描没有密码和弱密码的共享,先到配置文件中填写猜测的用户名和密码,扫描过程中右侧出现的是扫描日志。

蓝牙模块HM-10手册

蓝牙模块HM-10手册,该手册对蓝牙模块HM-10进行了详细的介绍和使用方法以及一些AT指令。

Oracle案例05——ORA-12162: TNS:net service name is incorrectly specified

Oracle案例05——ORA-12162: TNS:net service name is incorrectly specified 最近在梳理环境,发现环境真的不是一般的复杂,配置不是一般的乱,刚在梳理环境的时候发现一个库通过conn /as sysdba无法连接,具体处理过程如下: 一、错误信息 [oracle@ ~]$ sqlplus /nolog SQL*Plus:...

YunWisdom 535

老版QQ原生表情gif动态

这是老版的QQ表情,不过全是动态的的,Windows照片查看器是不会动的,可以右击用浏览器打开查看,再说一遍是老版的,只是分享给宁愿用老版也要动态的人。

ORA-12162: TNS:net service name is incorrectly specified 如何解决

今天使用oracle用户登录sqlplus出现“ORA-12162: TNS:net service name is incorrectly specified”。     如下: [oracle@oracle ~]$ sqlplus SQL*Plus: Release 10.2.0.1.0 - Production on Wed Feb 29 19:19:26 2012

hua00shao的专栏 7207

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

上一篇: linux下查找某个文件位置的方法
下一篇: WMI Script to List Services
gray13
博客等级 码龄18年 23粉丝 20原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值