2007-10-24 Wed
I saw two case recently about losing one of the data files for a tablespace, first case was losing a data file totally, second case is one of the data files has no recent backup, so it's equal to missing a data file. In this case how to recover the data from that tablespace? We can offline drop the missing data file and then get the database open. I create tablespace with three data files for demo.
SQL> SELECT FILE_ID FROM DBA_DATA_FILES
2 WHERE TABLESPACE_NAME='USERS01';
FILE_ID
----------
5
6
7
And I create a table on this tablespace, filled in some data, make sure it has extents on all three data files.
SQL> SELECT EXTENT_ID, FILE_ID FROM DBA_EXTENTS
2 WHERE SEGMENT_NAME='T_OBJECTS' AND OWNER=USER;
EXTENT_ID FILE_ID
---------- ----------
0 7
1 5
2 6
3 7
To avoid recover data file every time I online a data file, I put the tablespace in read only mode.
Read Full Text of【When lossing one of the data files for a tablespace】
Related Posts
Leave New Comment(Current: 0)
Link: http://www.dbatools.net/experience/lost_one_data_file.html
在某些情况下,数据库失去响应,sqlplus也无法连接,此时通常只能通过杀掉进程来解决。
但是我们仍然希望能够获得此时的数据库状态信息,以便用于事后诊断。
从Oracle10g开始,sqlplus提供了一个参数选项-prelim,可以在通常sqlplus无法连接的情况下进行连接。
通过以下步骤可以获取系统信息:
sqlplus -prelim / as sysdba
oradebug setmypid
oradebug unlimit;
oradebug dump systemstate 10
这种方法非常有用:
$ sqlplus -prelim / as sysdbaSQL*Plus: Release 10.2.0.1.0 - Production on Thu Oct 25 09:42:20 2007
Copyright (c) 1982, 2005, Oracle. All rights reserved.
SQL>
但是需要注意的是,在Oracle 10.2.0.1中,使用如上方法会出现一个错误:
$ sqlplus -prelim / as sysdbaSQL*Plus: Release 10.2.0.1.0 - Production on Thu Oct 25 09:38:14 2007
Copyright (c) 1982, 2005, Oracle. All rights reserved.
SQL> oradebug setmypid
Statement processed.
SQL> oradebug unlimit
Statement processed.
SQL> oradebug dump systemstate 10
ORA-03113: end-of-file on communication channel
ORA-24323: value not allowed
此时在alert文件中会记录如下错误提示:
Thu Oct 25 09:38:32 2007
System State dumped to trace file
Thu Oct 25 09:38:32 2007
Errors in file /opt/oracle/admin/test201/udump/test201_ora_1402.trc:
ORA-07445: exception encountered: core dump [kgldmp()+1360] [SIGSEGV] [Address not mapped to object] [0x000000030] [] []
这是由于一个Bug导致的,Bug号为5730231,该Bug在10.2.0.3中修正。
记录一下!
-The End-
相关文章|Related Articles
评论数量(1)|Add Comments
本文网址:http://www.eygle.com/archives/2007/10/sqlplus_prelim.html
Contributed by Alexander Todorov
Splitting big files into pieces is a common task. Another common task is to create a tar archive, and split it into smaller chunks that can be burned onto CD/DVD. The straightforward approach is to create the archive and then use ’split.’ To do this, you will need more free space on your disk. In fact, you’ll need space twice the size of the created archive. To avoid this limitation, split the archive as it is being created.
To create a tar archive that splits itself on the fly use the following set of commands:
First create the archive:
tar -czf /dev/stdout $(DIRECTORY_OR_FILE_TO_COMPRESS) | split -d -b $(CHUNK_SIZE_IN_BYTES) - $(FILE_NAME_PREFIX)
To extract the contents:
cat $(FILE_NAME_PREFIX)* >> /dev/stdout | tar -xzf /dev/stdin
The above shown set of commands works on the fly. You don’t need additional free space for temporary files.
A few notes about this exercise:
- ‘tar -L’ prompts you on every chunk created. Compression can not be used with -L option. The above command is not interactive and does not prompt for anything. Compression can be used.
- The number of separate files is 100. This is because we use numerical suffixes - ’split -d.’ If the specified chunk size is small you will get ’split: Output file suffixes exhausted’ error. Try with bigger chunk size or with alphabetic suffixes.
- ‘cat’ will concatenate the files properly if they are not renamed. This is due to the fact that the sort order is retained by the appended chunk suffixes.
- Replace ‘tar -z’ with ‘tar -j’ for bzip2 compression or try your favourite compression program. Almost all ‘tar’ and ’split’ options should be possible.
- The resulting chunk files are not valid tar archives. They can not be extracted separately. If you want such functionality use ’split-tar,’ which also needs more free space.
OK, I am not getting too much people feedback on what would they like to hear about on MySQL Users Conference, so I went ahead and submitted few presentation ideas.
I do not expect all of them would be accepted, furthermore it would be hard to prepare so many good presentations if they are so please let me know if anything of this is of special interest for you. When I would be able to show that to organizers to help with decision.
Also let me know if you have submitted similar talk as in this case there may be way to work together to produce better talk instead.
Hidden Innodb Tuning Options Innodb Storage Engine has a lot of tuning options hardcoded as constants. We investigate if current values are truly optimal for modern systems and if you can get any additional performance.
Investigating Innodb Scalability Limits You may have heard Innodb has limited scalability with multiple CPUs and some of these were fixed in recent MySQL 5.0 versions. In this presentations we will look into which problems are fixed.
MySQL and Social Networks benchmarks We’re looking at typical operations patterns used in Social Networking web applications and analyzing how to implement them most efficiently with MySQL.
MySQL Performance Landscape This presentation compares MySQL Performance with different CPUs, Operation systems, RAID Configuration, File Systems to assist you with your choices next time you select platform for MySQL.
Performance comparison of MySQL 5.0, MySQL 5.1 and MySQL 6.0 Come to see how performance of MySQL 5.1 and forthcoming MySQL 6.0 are different from MySQL 5.0 - we’ll cover different workloads and see when we see gains and when regressions.
Practical MySQL Variables Tuning This session takes practical approach to MySQL variable tuning. Instead of giving you theoretical guesses on what would be right variable values we’ll perform benchmarks and see that.
Searching Billions of documents with MySQL and Sphinx Learn how to build large scale Full Text Search solutions with MySQL and Sphinx. This presentation will talk about architecture of BoardReader.com which indexes over billion of forum posts.
Transactional Storage Engines Performance We’re looking at performance at Open Source Transactional Storage engine MySQL - Innodb, Falcon, SolidDB, PBXT and analyzing how things have changed since last summer.
Using Slave Server Without Breaking User Experience MySQL Replication is asynchronous this means you should be using slaves only for reads and only reads which can read stale data. This presentation teaches you efficient methods of doing so.
Entry posted by peter | One comment
Thanks to Jake, I now have a bunch of my “Web 2.0 accounts” aggregated into one place at FriendFeed: del.icio.us, Flickr, Google Reader, Google Shared Stuff, LinkedIn, YouTube and Twitter.
You can subscribe to my feed here. FriendFeed is great. I like it. It is currently in private beta testing. However, if you’re interested, just leave a comment below and I’ll send you an invite.
Speaking of twitter, I’m starting to like it more. You really have to pick the right friends you follow, otherwise you’ll be overwhelmed by useless chatter. Too bad my employer has blocked twitter, but that’s not a problem. I use:
- twittermail to post tweets by email from work
- itweet to read and post tweets from my iPhone
- twitbin to read and post tweets from my Firefox sidebar from home
- twittergram to post voice tweets from my iPhone (or any phone)
- jott to convert my voice into text tweets from my iPhone (or any phone)
- twitterfeed to publish any RSS feed to twitter.
I use twitterfeed in many different ways, like for example posting photo tweets from my iPhone to Flickr->twitter. I also publish my blog feed to my twitter account. Moreover, OraNA, Oracle and OOW twitter accounts use twitterfeed as well.
There are many other twitter applications, but the ones above are my favorites.
---
Related Articles at Eddie Awad's Blog:
- The Oracle Community on Twitter
- Mini Blogs for 2007-04-07
- Mini Posts Roundup from Twitterland (2007-04-08)
- Oracle OpenWorld 2007 - Social Networking, Twittering, Flickring and Unconferencing
- Quick Posts - 2007-08-06
About three months ago I announced ClickAider to become available to general public. And I think it is about the time to write about the progress we have with this project for those who interested.
The project generates decent interest and we have about 3000 sites Registered over this time, which I consider decent number especially as we did not do much of advertisement and PR keeping it low profile and working out few bugs which we might have.
We use GeoIP DNS based load balancing between “gathering” servers in Europe and US which seems to work very well both providing level of HA if one of the servers goes down and allowing to increase accuracy by reducing round trip. Over time we are planning to get more locations with pair of servers in each so we do not need to use relatively slow DNS based fail over if one of the servers goes down.
We get some 600 tracking events per second on our lighttpd tracking servers which currently works well and there is still some capacity available but we’re still planning to get rid of little PHP code we have left at this layer to get it even more efficient. It would be good to handle some 5000 events/sec per server.
MySQL 5.1 with Partitioning works nicely for data storage with no MySQL bugs hitting us with this project so far. We use Innodb tables now because checking and repairing MyISAM is nightmare and PBXT which could be good for this work is just not ready.
MySQL Performance is in fact the most serious issues we have to work with, even now reporting only clicks statistics for some huge sites like Mininova may take quite a while to generate.
The typical solution for trackers is to have summary data built one way or around and we might need to do some of it for certain most common queries. At this point however we’re looking how much performance we can get from real time aggregation because we want absolutely unrestricted dynamic filters and dynamic timezones and this makes things hard to aggregate. This is surely fun challenge to deal with.
We also continue to work on adding more Advertisers we support and improving a ways we track the old ones. Recently we’ve added support for Vibrant Media Intellitxt (hovers only at this point) . We also now support ShoppingAds even though they are not yet out of private beta version.
Looking at the site we’ve added major improvement of saved reports - now you can create custom reports with all filters you would want to and save them for quick use at later time. For example you can track what are the most popular click directions for US audience compared to general audience or track performance for referrals from given domain name to see if partnership makes any sense for you.
Finally we’ve added Demo Account so you do not have to register any more to see system in action. We used our MySQL Performance Forums site for the demo, which might be a bit low traffic but still good to see how system works. This is the reason why we added Google Adsense Adds on that site.
If you have any other ideas what would you like to see implemented in ClickAider, let us know.
Entry posted by peter | 7 comments
2004年,马云说:阿里不急着上市,我们要做百年老店。从99年创立才五年,不着急。另外,马云说阿里的员工都还年轻,主要是靠使命感驱动的。“这些才20几岁的年青人如果一下子都成为富翁,有可能会产生惰性,不再创新求异,固步自封。”
现在,阿里要上市了,希望马云和阿里的员工不要忘记使命感,不要忘记百年老店。套用马云的话:世界需要阿里这样的世界第一电子商务网站。
昨晚的《IT龙门阵》讨论阿里上市的事情,有位网友问阿里有了钱之后会做什么?
马云的答案:阿里巴巴未来几年将会全力投入电子商务产业链的建设,投入100亿。
完整的电子商务产业链包括什么?包括物流,包括支付,包括服务。细分下去,可能要从产品制造前的准备已知道废品回收的各个环节。
马云之所以这样说,是因为马云很清楚,阿里巴巴(B2B)仅仅是电子商务产业链中信息交流这一个环节的成功,远远不是电子商务的全部。马云说:“产业链今天不建立起来,我们今后很难在国际上参与竞争,电子商务是国家的核心竞争力。”
卫哲在说道阿里有钱后的收购目标:未来的收购重点在三个方面:新技术公司,发展扩大用户数及拥有大量客户基础的公司。
还有一个花钱的地方,海外拓展顺序是:中国香港、中国台湾、日本。
马云的整体布局上,还有淘宝、支付宝、口碑、中国雅虎(搜索)、阿里妈妈,现在只有B2B闪光了,其他珠子还需要一个个嵌在产业链上,串联起来都发光。
CCTV.com这回嫦娥报道太牛了。商业利益也实现得够好。
嫦娥发射这会儿,大家最想看的是电视(我们一堆人看电视)。不能看电视,会找地看视频。
cctv.com在直播的这段时间,首页是:

播放页

之前已经感叹过cctv.com的奥运频道了(2008.cctv.com),至今看到最牛的一个。2008奥运会新媒体权也在cctv.com。

comment
年会的联合主办Feedsky,利用自己的Blog话题平台,发起了“我谈中文网志年会”的公益话题,推荐的三个主题为:
- 聊聊网志年会,聊聊你认识的Blogger;
- 你在年会上认识了谁,或者你最想认识谁;
- 你对本届中文网志年会形式上有什么想法和建议;
- 网志年会对国内互联网会有哪些影响;
可以在这里查看写了这些主题的文章列表:《我谈中文网志年会》

Wow - this is an interesting one.
ProBlogger’s page rank is currently at a 4 - and so is Digital Photography School.
I’d heard blogs had been penalized in their page rank recently for selling text links - bizarre thing is that neither of these two blogs sell links. I’ve never sold text links at DPS and haven’t on ProBlogger for months now - perhaps I was penalized for taking them off!
Both had page ranks of 6 yesterday and previously ProBlogger was a 7. Even jobs.problogger.net has been hit and it’s on a subdomain. Looks like something’s going on over at the Googleplex - is anyone else noticing changes today or did someone over there take offense at something I said? Maybe they don’t like that I took AdSense off ProBlogger (joking).
PS: just noticed Copyblogger is a 4 now too - hmmmm.
Update - Andy Beard and Daniel Scocco are compiling lists of blogs and other sites impacted by this PageRank ‘update’.
2007-10-23 Tue
2007-10-22 Mon
2007-10-21 Sun
AnySQL.net
DBA notes
Oracle & Starcraft
eagle's home
给你点color see see
AnySQL.net English
Oracle Scratchpad
Oracle Life
OracleDBA Blog
Photos from dbanotes
Chanel [K]
xzh2000的博客
Oracle Security Blog
ERN空间
Eddie Awad's Blog
MySQL Performance Blog
The Tom Kyte Blog
del.icio.us/fenng/oracle
AIXpert
O'Reilly Databases
Red Hat Magazine
DBASupport
DB2 Magazine 中文版
developerWorks : AIX 专区的文章,教程
Pythian Group Blog » Log Buffer
车东[Blog^2]
blue_prince
玉面飞龙的BLOG
此生 今世
人生就是如此
Orange Tiger 木匠 的 移民生活
生活帮-LifeBang
Hey!! Sky!
dba on unix
Oracle Notes Wiki
Welcome to brotherxiao's Home
柔嘉维则@life.oracle.eng
Fenng's shared items in Google Reader
jametong's shared items in Google Reader
缥缈游侠-logzgh
Tanel Poder's blog: Core IT for geeks and pros
DBA Tools
DBA is thinking
yangtingkun
NinGoo@Net







