#!/oracle/product/11g/db/perl/bin/perl
use lib '/oracle/product/11g/db/perl/lib/site_perl/5.10.0';
use DBI;
use DBD::Oracle qw(:ora_session_modes);
print $DBI::VERSION,"\n";
print $DBD::Oracle::VERSION,"\n"; $ENV{ORACLE_SID} = "MY"; my $dbh = DBI->connect( "dbi:Oracle:", "", "",{ ora_session_mode => ORA_SYSDBA } ) || die( $DBI::errstr . "\n" ); $dbh->{AutoCommit} = ; $dbh->{RaiseError} = ; $dbh->{ora_check_sql} = ; $dbh->{RowCacheSize} = ; my $SEL = "SELECT * FROM my.m\$audit_log";
my $sth = $dbh->prepare($SEL);
$sth->execute(); while ( my @row = $sth->fetchrow_array() ) {
foreach (@row) {
$_ = "\t" if !defined($_);
print "$_\t";
}
print "\n";
} END {
$dbh->disconnect if defined($dbh);
}

Perl Connect to Database without password as sysdba的更多相关文章

  1. dblogin userid ogg ERROR: Unable to connect to database using user ogg

    测试环境,初步配置ogg,添加ogg用户连接数据库,提示无权限报错. 1.0 报错信息 GGSCI (enmo) > dblogin userid ogg,password ogg ERROR: ...

  2. Connect to Database Using Custom params链接数据库配置参数说明

    使用RF的关键字Connect to Database Using Custom params链接数据库,对应的参数说明: a)     第一个参数我使用的是cx_Oracle,就写这个 b)     ...

  3. Failed to connect to database. Maximum number of conections to instance exceeded

    我们大体都知道ArcSDE的连接数有 48 的限制,很多人也知道这个参数可以修改,并且每种操作系统能支持的最大连接数是不同的. 如果应用报错:超出系统最大连接数 该如何处理? 两种解决办法: 第一,首 ...

  4. mysql进阶(十七)Cannot Connect to Database Server

    Cannot Connect to Database Server 缘由 由于不同的项目中使用的数据库用户名与密码出现了不一致的情况,在其中之前较早一个项目执行过程中出现"The user  ...

  5. Cannot connect to database because the database client

    问题描述: arcgis server10.1  arcgis sde10出现下面问题 Cannot connect to  database because the database client ...

  6. greenplum全量恢复gprecoverseg -F出现Unable to connect to database时的相关分析及解决方法

    之前有两位朋友碰到过在对greenplum的系统构架更改后,出现全量恢复gprecoverseg -F也无法正常执行的情况. 报错信息为Unable to connect to database. R ...

  7. 解决;R语言使用sqldf库是报错"Failed to connect to database: Error: Access denied for user '..'@'localhost' (using password: NO) Error in !dbPreExists : invalid argument type"

    原因:在使用sqldf时,不需要加载RMySQL库 解决方案:在控制台执行释放RMySQL库加载 detach("package:RMySQL", unload=T);

  8. [Node.js] 09 - Connect with Database

    简介两个数据库: Node.js 连接 MySQL Node.js 连接 MongoDB Node.js 连接 MySql 导入已有数据库: unsw@unsw-UX303UB$ mysql -u r ...

  9. Oracle Created Database Users: Password, Usage and Files References (文档 ID 160861.1)

    This document is no longer actively maintained, for info on specific (new) users in recent product e ...

随机推荐

  1. 【Spark】DAGScheduler源代码浅析

    DAGScheduler DAGScheduler的主要任务是基于Stage构建DAG,决定每个任务的最佳位置 记录哪个RDD或者Stage输出被物化 面向stage的调度层.为job生成以stage ...

  2. LeetCode 69. Sqrt(x) (平方根)

    Implement int sqrt(int x). Compute and return the square root of x. x is guaranteed to be a non-nega ...

  3. linux命令:find命令

    http://blog.csdn.net/pipisorry/article/details/39831419 linux find命令语法 find [起始文件夹] 寻找条件 操作 find PAT ...

  4. Unity游戏小地图生成

    孙广东  2015.6.25 这个在AssetStore上有几个不错的插件, 除了知道原理,能自己实现还是好的. 非常多插件是不会直接使用的.而是要依据自己项目的需求进行改动或者就是自己写. 那么我们 ...

  5. BeautifulSoup中各种html解析器的比較及使用

    Beautiful Soup解析器比較 ·Beautiful Soup支持各种html解析器.包含python自带的标准库.还有其它的很多第三方库模块. 当中一个就是lxml parser,至于lxm ...

  6. E - 吃糖

    题目描述: 某人买了n兜糖果,第i兜有Ai块糖.此人把所有这些糖果用一个数字标记起来:他这样标记这些糖,第一袋糖用用数字1到A1,第二袋糖用数字A1+1到A1+A2,如此类推.如果还没明白看样例可以更 ...

  7. 54. Extjs组件render说明

    转自:http://blog.chinaunix.net/uid-450400-id-2119168.html 1. 1.调用组件的render方法 panel.render('div'); 2.在配 ...

  8. 基于spark和flink的电商数据分析项目

    目录 业务需求 业务数据源 用户访问Session分析 Session聚合统计 Session分层抽样 Top10热门品类 Top10活跃Session 页面单跳转化率分析 各区域热门商品统计分析 广 ...

  9. 云栖社区> > 正文 永久免费SSL安全证书Letsencrypt安装使用方法

    ./letsencrypt-auto certonly --standalone --email admin@thing.com -d thing.com -d www.thing.com

  10. jsp中的setHeader页面跳转备忘录

    1 <!-- response.setHeader("refresh","3;url=你想跳的页面")--> <%-- response.se ...