明净

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

 

 

 

 

 

 

 

 

 

 

 

首先win10权限问题,

搜索设置->更新和安全 ->恢复->高级启动立即重启 疑难解答-高级选项-启动设置-重启-选择“4”

  1. 按“WIN+R”组合键,输入“control userpasswords2”,

    属性-组成员-把你的账户设置为管理员-确定

     

     

     重启电脑

     

====================================================================================

 有了权限就可以修改文件了

listener.ora
# listener.ora Network Configuration File: D:\app\oracle\product\12.1.0\dbhome_1\network\admin\listener.ora
# Generated by Oracle configuration tools.
 
SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = CLRExtProc)
      (ORACLE_HOME = D:\app\oracle\product\12.1.0\dbhome_1)
      (PROGRAM = extproc)
      (ENVS = "EXTPROC_DLLS=ONLY:D:\app\oracle\product\12.1.0\dbhome_1\bin\oraclr12.dll")
    )
  (SID_DESC =   
     (GLOBAL_DBNAME = orcl)   
     (ORACLE_HOME = D:\app\oracle\product\12.1.0\dbhome_1)   
     (SID_NAME = orcl)   
   )
  )
 
LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
    )
  )
 
 
================================
 
 
# sqlnet.ora Network Configuration File: D:\app\oracle\product\12.1.0\dbhome_1\network\admin\sqlnet.ora
# Generated by Oracle configuration tools.
 
# This file is actually generated by netca. But if customers choose to 
# install "Software Only", this file wont exist and without the native 
# authentication, they will not be able to connect to the database on NT.
 
SQLNET.AUTHENTICATION_SERVICES= (NTS)
 
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
 
 
 
 
================================================================================
 
 
# tnsnames.ora Network Configuration File: D:\app\oracle\product\12.1.0\dbhome_1\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.
 
ORACLR_CONNECTION_DATA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
    (CONNECT_DATA =
      (SID = CLRExtProc)
      (PRESENTATION = RO)
    )
  )
 
ORCL =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl)
    )
  )
ORCL1 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.66)(PORT = 1521))
    (CONNECT_DATA =
      (SERVICE_NAME = orcl)
    )
  )

 

=====================================================================================

cmd进入命令,输入LSNRCTL

 

start listener              提示

 

LSNRCTL> start listener
启动tnslsnr: 请稍候...

TNSLSNR for 64-bit Windows: Version 11.2.0.1.0 - Production
系统参数文件为D:\app\product\11.2.0\dbhome_1\network\admin\listener.ora
写入d:\app\diag\tnslsnr\DESKTOP-OOQT5PK\listener\alert\log.xml的日志信息
监听: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
TNS-01155: 在 LISTENER.ORA 中指定的 SID_LIST_listener 参数不正确
NL-00303: NV 字符串中存在语法错误

监听程序未能启动。请参阅上面的错误消息...

 

解决方法:
 将HOST=红色字体处,由原有的127.0.0.1修改为计算机名称,即可正常启动

===================================================================--

LSNRCTL> start listener
启动tnslsnr: 请稍候...

TNSLSNR for 64-bit Windows: Version 11.2.0.1.0 - Production
系统参数文件为D:\app\product\11.2.0\dbhome_1\network\admin\listener.ora
写入d:\app\diag\tnslsnr\DESKTOP-OOQT5PK\listener\alert\log.xml的日志信息
监听: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=DESKTOP-OOQT5PK)(PORT=1521)))

正在连接到 (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=1521)))
LISTENER 的 STATUS
------------------------
别名 listener
版本 TNSLSNR for 64-bit Windows: Version 11.2.0.1.0 - Production
启动日期 12-5月 -2018 16:21:30
正常运行时间 0 天 0 小时 0 分 3 秒
跟踪级别 off
安全性 ON: Local OS Authentication
SNMP OFF
监听程序参数文件 D:\app\product\11.2.0\dbhome_1\network\admin\listener.ora
监听程序日志文件 d:\app\diag\tnslsnr\DESKTOP-OOQT5PK\listener\alert\log.xml
监听端点概要...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=DESKTOP-OOQT5PK)(PORT=1521)))
服务摘要..
服务 "CLRExtProc" 包含 1 个实例。
实例 "CLRExtProc", 状态 UNKNOWN, 包含此服务的 1 个处理程序...
服务 "orcl" 包含 1 个实例。
实例 "orcl", 状态 UNKNOWN, 包含此服务的 1 个处理程序...
命令执行成功
LSNRCTL>

===================================================================

 sysdba 权限不足

===============文件名:加入组策略.cmd  内容如下====================

@echo off

pushd "%~dp0"

dir /b C:\Windows\servicing\Packages\Microsoft-Windows-GroupPolicy-ClientExtensions-Package~3*.mum >List.txt

dir /b C:\Windows\servicing\Packages\Microsoft-Windows-GroupPolicy-ClientTools-Package~3*.mum >>List.txt

for /f %%i in ('findstr /i . List.txt 2^>nul') do dism /online /norestart /add-package:"C:\Windows\servicing\Packages\%%i"

pause


==============================================================

 以管理身份运行

执行结果

部署映像服务和管理工具
版本: 10.0.16299.15

映像版本: 10.0.16299.98

正在处理 1 (共 1) - 正在添加程序包 Microsoft-Windows-GroupPolicy-ClientExtensions-Package~31bf3856ad364e35~amd64~zh-CN~10.0.16299.15
[==========================100.0%==========================]
操作成功完成。

部署映像服务和管理工具
版本: 10.0.16299.15

映像版本: 10.0.16299.98

正在处理 1 (共 1) - 正在添加程序包 Microsoft-Windows-GroupPolicy-ClientExtensions-Package~31bf3856ad364e35~amd64~~10.0.16299.15
[==========================100.0%==========================]
操作成功完成。

部署映像服务和管理工具
版本: 10.0.16299.15

映像版本: 10.0.16299.98

正在处理 1 (共 1) - 正在添加程序包 Microsoft-Windows-GroupPolicy-ClientTools-Package~31bf3856ad364e35~amd64~zh-CN~10.0.16299.15
[==========================100.0%==========================]
操作成功完成。

部署映像服务和管理工具
版本: 10.0.16299.15

映像版本: 10.0.16299.98

正在处理 1 (共 1) - 正在添加程序包 Microsoft-Windows-GroupPolicy-ClientTools-Package~31bf3856ad364e35~amd64~~10.0.16299.15
[==========================100.0%==========================]
操作成功完成。
请按任意键继续. . .

 

 输入:gpedit.msc

 

 ======================看成用户组了,原来是组策略,,没办法添加用户吧==========================================================================

 

 

 

 win+r    control userpasswords2

 

 

 

 更改为 ora_dba

 

无法登陆!!!

 

幸好,sys用户,用sys用户可以创建工作目录,数据导入完成

 

posted on 2018-05-12 16:33  明净  阅读(1662)  评论(0编辑  收藏  举报