Tip: 看不到本站引用 Flickr 的图片? 下载 Firefox Access Flickr 插件 | AD: 订阅 DBA notes -- ![]()
2012-02-06 Mon
有朋友修改服务器的时间后,所有定时任务停止运行,因为其运行时间处于未来,如下范例:
SQL> select job_name,state,enabled,start_date,next_run_date from DBA_SCHEDULER_JOBS;修复这个时间异常可以使用如下方法,先禁用任务,再通过SET_ATTRIBUTE的方式来修改:
JOB_NAME STATE ENABL START_DATE NEXT_RUN_DATE
------------------------------ --------------- ----- ---------------------------------------- ----------------------------------------
GATHER_STATS_JOB DISABLED FALSE 31-OCT-14 11.18.02.000000 PM +08:00 31-OCT-14 11.18.02.000000 PM +08:00
SQL> exec dbms_scheduler.disable('gather_stats_job');
PL/SQL procedure successfully completed.
SQL> exec dbms_scheduler.set_attribute ('GATHER_STATS_JOB','start_date',systimestamp);
PL/SQL procedure successfully completed.
SQL> select job_name,state,enabled,start_date,next_run_date from DBA_SCHEDULER_JOBS;
JOB_NAME STATE ENABL START_DATE NEXT_RUN_DATE
------------------------------ --------------- ----- ---------------------------------------- ----------------------------------------
GATHER_STATS_JOB DISABLED FALSE 04-FEB-12 11.19.30.550122 PM +08:00 31-OCT-14 11.18.02.000000 PM +08:00
SQL> exec dbms_scheduler.enable('gather_stats_job');
PL/SQL procedure successfully completed.
SQL> select job_name,state,enabled,start_date,next_run_date from DBA_SCHEDULER_JOBS;
JOB_NAME STATE ENABL START_DATE NEXT_RUN_DATE
------------------------------ --------------- ----- ---------------------------------------- ----------------------------------------
GATHER_STATS_JOB RUNNING TRUE 04-FEB-12 11.19.30.550122 PM +08:00 04-FEB-12 11.19.46.692031 PM +08:00
可以看到在启用SCHEDULER之后,NEXT_RUN_DATE会自动计算为正常值。
相关文章|Related Articles
- Oracle Release Number Format含义
- Oracle MTS模式下 进程地址与会话信息
- 关注一下Oracle的CPU (Critical Patch Updates)
- 关于Oracle的Dual表
- cursor_space_for_time参数在11.1.0.7中
评论数量(0)|Add Comments
本文网址:http://www.eygle.com/archives/2012/02/scheduler_start_date_set_attribute.html
Francisco Jordano introduces briefly the concepts and provides some good resources for learnign about Twitter Storm just to present his experiment of using Twitter Storm for analyzing the Twitter (nb: the project is on GitHub ):

That’s how the information will flow, and the kind of tasks that we will execute. Yes it’s more effective to group some of those tasks, but remember, we just wanted to give this a try ;P
Worth emphasizing is that nowhere in the post is any reference of him having any troubles finding documentation or getting Twitter Storm up and running.
Original title and link: Using Twitter Storm to analyze the Twitter Stream (©myNoSQL)
今天同事在review change的时候看到有个给表空间加数据文件的,发现加的数据文件竟然超过了32G,按照原来的思维,在9i中,非bigfile的单个数据文件单个大小不能超过32G。这个加32G数据文件的change是不是有误?查了一下原来的表空间情况,发现已经存在127.99G的数据文件了。该数据库不是9i,且该表空间下含多个数据文件。
我们先来看一下该表空间的信息:
1* select file_name,BYTES,RELATIVE_FNO,MAXBYTES,AUTOEXTENSIBLE from dba_data_files where tablespace_name='TS_OLB_TOPX_DATA_1'
SQL> /
FILE_NAME BYTES RELATIVE_FNO MAXBYTES AUT
--------------------------------------------- ------------- ------------ ---------- ---
/ora/RPOLAP0/data001/olb_topx_data_1_01.dbf 137438887936 20 0 NO
/ora/RPOLAP0/data003/olb_topx_data_1_02.dbf 26214400000 110 0 NO
......
14 rows selected.
SQL>
SQL> select 137438887936/1024/1024/1024 size_GB from dual;
SIZE_GB
----------
127.999939
SQL>
明确看到datafile id为20的数据文件大小为127.99G。为什么会有这样的情况?难道9i可以有超过32G的单个数据文件?
答案是可以的。首先我们要明白这个32G是怎么来的。
在9i数据库中,默认的数据块是8k,在一个数据文件最多能容纳多少个数据块?
我们随便dump一个看看:
Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP and Oracle Data Mining options
JServer Release 9.2.0.8.0 - Production
ORACLE_HOME = /ora/product/v920
System name: SunOS
Node name: au10qap9p0tels2
Release: 5.9
Version: Generic_118558-39
Machine: sun4u
Instance name: RPOLAP02
Redo thread mounted by this instance: 2
Oracle process number: 42
Unix process pid: 7129, image: oracle@au10qap9p0tels2 (TNS V1-V3)
*** 2012-02-06 17:38:05.674
*** SESSION ID:(79.76) 2012-02-06 17:38:05.673
Start dump data blocks tsn: 20 file#: 20 minblk 3 maxblk 3
buffer tsn: 20 rdba: 0x05000003 (20/3)
scn: 0x0008.e31dbd61 seq: 0x01 flg: 0x04 tail: 0xbd611e01
frmt: 0x02 chkval: 0x839b type: 0x1e=KTFB Bitmapped File Space Bitmap
File Space Bitmap Block:
BitMap Control:
RelFno: 20, BeginBlock: 5, Flag: 0, First: 63261, Free: 165991
我们看到这里的rdba: 0×05000003,这是datafile中data block的地址,该值得取值范围从0×00000000到0xffffffff,也就是说,一个datafile中最多有0xffffffff个数据块。 也就是说,一个datafile最大的大小受到该值的约束。
当在9i的数据库中,默认block size为8k时,我们将0xffffffff转换成十进制即为4294967295:8k×4294967295=32G。
那么对于刚刚系统中的那个数据文件,我们来看看。我们先dump出file header:
(name #39) /ora/RPOLAP0/data001/olb_topx_data_1_01.dbf
creation size=96000 block size=32768 status=0xe head=39 tail=39 dup=1
tablespace 20, index=21 krfil=20 prev_file=0
unrecoverable scn: 0x0008.e31d155c 02/05/2012 18:30:26
Checkpoint cnt:57541 scn: 0x0008.e35ff322 02/06/2012 17:21:01
Stop scn: 0xffff.ffffffff 01/15/2011 20:58:14
Creation Checkpointed at scn: 0x0000.000207a7 11/30/2007 17:16:22
thread:1 rba:(0x50.92.10)
enabled threads: 01000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000
Offline scn: 0x0000.00000000 prev_range: 0
Online Checkpointed at scn: 0x0000.00000000
thread:0 rba:(0x0.0.0)
enabled threads: 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000
Hot Backup end marker scn: 0x0000.00000000
aux_file is NOT DEFINED
FILE HEADER:
Software vsn=153092096=0x9200000, Compatibility Vsn=134217728=0x8000000
Db ID=3761053674=0xe02d1fea, Db Name='RPOLAP0'
Activation ID=0=0x0
Control Seq=7251317=0x6ea575, File size=4194302=0x3ffffe
File Number=20, Blksiz=32768, File Type=3 DATA
Tablespace #20 - TS_OLB_TOPX_DATA_1 rel_fn:20
Creation at scn: 0x0000.000207a7 11/30/2007 17:16:22
Backup taken at scn: 0x0008.e324e3b4 02/06/2012 00:41:11 thread:2
reset logs count:0x2625dcea scn: 0x0000.00000001 recovered at 07/04/2010 15:59:05
status:0x4 root dba:0x00000000 chkpt cnt: 57541 ctl cnt:57540
begin-hot-backup file size: 4194302
Checkpointed at scn: 0x0008.e35ff322 02/06/2012 17:21:01
thread:2 rba:(0x189da.2.10)
enabled threads: 01110000 00000000 00000000 00000000 00000000 00000000
00000000 00000000
Backup Checkpointed at scn: 0x0008.e324e3b4 02/06/2012 00:41:11
thread:2 rba:(0x189be.ae.10)
enabled threads: 01110000 00000000 00000000 00000000 00000000 00000000
00000000 00000000
External cache id: 0x0 0x0 0x0 0x0
Absolute fuzzy scn: 0x0000.00000000
Recovery fuzzy scn: 0x0000.00000000 01/01/1988 00:00:00
Terminal Recovery Stamp scn: 0x0000.00000000 01/01/1988 00:00:00
我们看到block size的大小为32k,那么32k每个block,乘以4294967295个,即为128G了。即在我们这个系统中,这个该表空间的单个数据文件最大可到128G。
最后,我们来看看这个表空间的DDL,我们也会发现它指定了block size为32k:
1* SELECT DBMS_METADATA.GET_DDL('TABLESPACE','TS_OLB_TOPX_DATA_1') FROM DUAL
SQL> /
DBMS_METADATA.GET_DDL('TABLESPACE','TS_OLB_TOPX_DATA_1')
--------------------------------------------------------------------------------
CREATE TABLESPACE "TS_OLB_TOPX_DATA_1" DATAFILE
'/ora/RPOLAP0/data001/olb_topx_data_1_01.dbf' SIZE 3145728000 REUSE
AUTOEXTEND ON NEXT 524288000 MAXSIZE UNLIMITED,
'/ora/RPOLAP0/data003/olb_topx_data_1_02.dbf' SIZE 1048576000 REUSE
AUTOEXTEND ON NEXT 104857600 MAXSIZE UNLIMITED,
'/ora/RPOLAP0/data003/olb_topx_data_1_03.dbf' SIZE 1048576000 REUSE
AUTOEXTEND ON NEXT 104857600 MAXSIZE UNLIMITED,
'/ora/RPOLAP0/data003/olb_topx_data_1_04.dbf' SIZE 104857600 REUSE
AUTOEXTEND ON NEXT 104857600 MAXSIZE UNLIMITED,
'/ora/RPOLAP0/data004/olb_topx_data_1_05.dbf' SIZE 26214400000 REUSE ,
'/ora/RPOLAP0/data004/olb_topx_data_1_06.dbf' SIZE 26214400000 REUSE ,
'/ora/RPOLAP0/data003/olb_topx_data_1_07.dbf' SIZE 20971520000 REUSE ,
'/ora/RPOLAP0/data005/olb_topx_data_1_08.dbf' SIZE 20971520000 REUSE ,
'/ora/RPOLAP0/data005/olb_topx_data_1_09.dbf' SIZE 20971520000 REUSE ,
'/ora/RPOLAP0/data005/olb_topx_data_1_10.dbf' SIZE 20971520000 REUSE ,
'/ora/RPOLAP0/data005/olb_topx_data_1_11.dbf' SIZE 26214400000 REUSE ,
'/ora/RPOLAP0/data005/olb_topx_data_1_13.dbf' SIZE 26214400000 REUSE ,
'/ora/RPOLAP0/data005/olb_topx_data_1_14.dbf' SIZE 5242880000 REUSE ,
'/ora/RPOLAP0/data005/olb_topx_data_1_12.dbf' SIZE 26214400000 REUSE
LOGGING ONLINE PERMANENT BLOCKSIZE 32768
EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1048576 SEGMENT SPACE MANAGEMENT AUTO
SQL>
所以,单个数据文件最大32G只是一个默认情况,知其然,知其所以然,才能更好的了解数据库。
Over the weekend I’ve read two papers presenting products or research related to improving or adding new capabilities to the MapReduce data processing approach. The first of them comes from a team at Microsoft and is describing TiMR a time-oriented data processing system in MapReduce. The second, from a team at Google, presents Tenzin - a SQL implementation on the MapReduce framework. It’s great to learn that while the Hadoop community is eliminating some of the initial limitations and hardening the technical details of the platform, there are already ideas and systems out there that augment the capabilities of the MapReduce data processing model.
Original title and link: Research in the MapReduce Space (©myNoSQL)
This recent paper from a team at Google is presenting details about Tenzing a system that is currently in use at Google:
Tenzing is a query engine built on top of MapReduce for ad hoc analysis of Google data. Tenzing supports a mostly complete SQL implementation (with several extensions) combined with several key characteristics such as heterogeneity, high performance, scalability, reliability, metadata awareness, low latency, support for columnar storage and structured data, and easy extensibility.
A couple of things I’ve highlighted when reading it:
- Tenzing is in production, but doesn’t serve yet a huge amount of queries
- the backend storage can be a mix of various data stores, such as ColumnIO, Bigtable, GFS files, MySQL databases
- when compared with other similar solutions (Sawzall, Flume-Java, Pig, Hive„ HadoopDB), Tenzing’s advantage is low latency
- the paper acknowledges AsterData, GreenPlum, Paraccel, Vertica for using a MapReduce execution model in their engines
- to perform query optimizations, Tenzing is enhancing queries with information from a metadata server
- there is no information about what kind of metadata is needed in Tenzing. I assume it might refer to details about the data sources and data source metadata (indexes, access patterns, etc)
- to reduce query latency, processes are kept running
- Tenzing supports almost all SQL92 standard and some extensions from SQL99
- projection and filtering (for some of these and depending on the data source Tenzing can do some optimizations)
- set operations (implemented in the reduce phase)
- nested queries and subqueries
- aggregation and statistical functions
- analytic functions (syntax similar to PostgreSQL/Oracle)
- OLAP extensions
-
JOINs:
Tenzing supports efficient joins across data sources, such as ColumnIO to Bigtable; inner, left, right, cross, and full outer joins; and equi semi-equi, non-equi and function based joins. Cross joins are only supported for tables small enough to fit in memory, and right outer joins are supported only with sort/merge joins. Non-equi correlated subqueries are currently not supported. We include distributed implementations for nested loop, sort/merge and hash joins.
Read and download the “Tenzing A SQL Implementation on the MapReduce framework” after the break.
Original title and link: Paper: Tenzing A SQL Implementation on the MapReduce Framework (©myNoSQL)
From the “Temporal Analytics on Big Data for Web Advertising” paper:
TiMR is a framework that transparently combines a map-reduce (M-R) system with a temporal DSMS1. Users express time-oriented analytics using a temporal (DSMS) query lan- guage such as StreamSQL or LINQ. Streaming queries are declarative and easy to write/debug, real-time-ready, and often several orders of magnitude smaller than equivalent custom code for time-oriented applications. TiMR allows the temporal queries to transparently scale on offline temporal data in a cluster by leveraging existing M-R infrastructure.
Broadly speaking, TiMR’s architecture of compiling higher level queries into M-R stages is similar to that of Pig/SCOPE. However, TiMR specializes in time-oriented queries and data, with several new features such as: (1) the use of an unmodified DSMS as part of compilation, parallelization, and execution; and (2) the exploitation of new temporal parallelization opportunities unique to our setting. In addition, we leverage the temporal algebra underlying the DSMS in order to guarantee repeatability across runs in TiMR within M-R (when handling failures), as well as over live data.
According to the paper, DSMS work well for real-time data, but are not massively scalable. On the other hand, Map-Reduce is extremely scalable, but computation is performed on offline data. TiMR proposes a solution that is getting closer to a real-time map-reduce.
Read or download the paper after the break.
-
Data Stream Management System ↩
Original title and link: Paper: TiMR is a Time-oriented data processing system in MapReduce (©myNoSQL)
Ron Bodkin interviewed by Michael Floyd over InfoQ describes the Hadoop growing addiction:
People are using Hadoop for a variety of analytics. Many of the first uses of Hadoop are complementing traditional data warehouses I just mentioned, where the goal is to take some of the pressure of the data warehouse, start to be able to process less structured data more effectively and to be able to do transformations and build summaries and aggregates, but not have to have all that data loaded to the data warehouse. But then the next thing that happens is once people have started doing that level of processing they realize there is a power of being able to ask questions they never thought of before the data, they can store all the data in small samples and they can go back and have a powerful query engine, a cluster of commodity machines that lets them dig into that raw data and analyze it new ways ultimately leading to data science being able to do machine learning and being able to discover patterns in data and keep them improving and refining the data.
The interview is only 16 minutes long and you have the full transcript.
Original title and link: Hadoop and NoSQL in a Big Data Environment with Ron Bodkin (©myNoSQL)
2012-02-05 Sun
To alternate a bit after yesterday’s educational CQL: SQL for Cassandra in the Cassandra NYC 2011 video series from DataStax, today’s video is Drew Robb covering Cassandra usage at SocialFlow for capturing real-time data from Twitter and Bit.ly.
For watching more videos from this event follow the Cassandra NYC 2011 tag.
Original title and link: Cassandra at SocialFlow with Drew Robb - Powered by NoSQL (©myNoSQL)
Jonathan Corbet summarizing a presentation about the present and future of XFS by Dave Chinner:
XFS is often seen as the filesystem for people with massive amounts of data. It serves that role well, Dave said, and it has traditionally performed well for a lot of workloads. Where things have tended to fall down is in the writing of metadata; support for workloads that generate a lot of metadata writes has been a longstanding weak point for the filesystem. In short, metadata writes were slow, and did not really scale past even a single CPU.
After the break the video of Dave Chinner’s presentation, “XFS: Recent and Future Adventures in Filesystem scalability”.
Even if it’s very long, make sure you check the comment thread.
Original title and link: XFS: the filesystem of the future? (©myNoSQL)
2012-02-04 Sat
The fine folks from DataStax have made available the presentations from their Cassandra NYC 2011 event.
The first video to post here is Eric Evans’s presentation on Cassandra Query Language.
For watching more videos from this event follow the Cassandra NYC 2011 tag.
Original title and link: CQL: SQL for Cassandra with Eric Evans - NoSQL videos (©myNoSQL)
AnySQL.net
Give you some color to see see!
Oracle Scratchpad
Oracle Life
Channel [K]
Oracle Security Blog
The Tom Kyte Blog
Delicious/Fenng/oracle
O'Reilly Databases
Red Hat Magazine
车东[Blog^2]
blue_prince
玉面飞龙的BLOG
木匠 Creative and Flexible
Brotherxiao's Home
jametong's shared items in Google Reader
DBA Tools
ramarao
Inside the Oracle Optimizer - Removing the black magic
DBA@Taobao
存储部落
OracleBlog.org
知道分子
支付宝官方 Blog - 支付志
木匠的天空 Database Architect and Developer
Hello DBA
OS与Oracle
Cary Millsap
Guy Harrison's main page
eagle's home
DBA Notes
OracleDBA Blog---三少个人涂鸦地!
The Pythian Blog
myNoSQL
OracleDBA Blog---三少个人自留地