Friday, October 10, 2008

Microsoft Tech News Aggregator

Microsoft has recently launched its tech news aggregator platform called /Web. It is a platform for getting all technology related news in a consolidated manner. They allow contents from all other platforms as well. This site is beautifully designed into 6 sections where you can find relevant contents.

Inspiration
Methods
Business
Events
Blogs
Products

You can subscribe to the all articles at this link.

Sphere: Related Content

Tuesday, October 7, 2008

Sum of nth column in a file using awk

Today I had to find sum of nth column entries from one of my csv files. I just googled and found a nice way of doing it using awk.
Suppose my input csv file is named as test.out and I have to find sum of all nth column entries of it.

I just created an awk script file named test.awk for setting the FS variable and providing the summation logic to awk.

#test.awk
BEGIN {FS=","}
{ sum+=$COL}
END { print sum }

Then every thing is easy

Use the awk command as follows with input file test.out. Replace 8 with any column index you want.

awk -f test.awk COL=8 < test.out

Sphere: Related Content

Wednesday, October 1, 2008

Google SMS Channel

Google India has released a new service called Google SMS channel. This service lets you connect to all kind of news services, blog updates, cricket score, rss reader sync features at one single stop. While you can create any public channel, you can also create private channels for your family members and frieds. All you have to go to http://labs.google.co.in/smschannels link and create a nick name for you and enter your mobile no along with the name of the channel. Once created your friends and family member can subscribe to this channel and can send the messages to the channel without paying anything to the carrier services. You can also subscribe to this channel using web or mobile. While using mobile sign up you will have to give your mobile no. to proceed further.

SMS Commands
Almost everything that you can do on the website can be done over SMS. Detailed in the table below is the list of SMS commands and what they do.

All you have to do is to send SMS to 9870807070 with following content


on : Start receiving messages posted on channel

off : Stop receiving messages posted on channel

delete : Delete a channel that you created

send : Send message to channel

Sphere: Related Content

Wednesday, September 3, 2008

Oracle table partitions learning

Today, I was perplexed with a problem related to a partitioned table in oracle. My concern was to determine when I drop a partition of a table what happens the indexes on that table. I figured it out like this.

I created a partitioned test table as follows

CREATE TABLE TEST (
COLUMN1 NUMBER(9),
COLUMN2 NUMBER(9),
)
PARTITION BY LIST (COLUMN1)
(PARTITION LOW_PART VALUES (-1)
);

I created local bitmap indexes on COLUMN1 column of this table using a stored procedure

EXEC CREATE_BITMAP_INDEXES('TEST', 'COLUMN1');

This procedure created a local bitmap index IX_TEST_COLUMN1 on this table.
I then queried oracle about the state of bitmap indexes just created by this query

SELECT INDEX_NAME, STATUS FROM USER_IND_PARTITIONS WHERE PARTITION_NAME = 'LOW_PART';

SQL>
INDEX_NAME STATUS
--------------------- ---------------------
IX_TEST_COLUMN1 USABLE

Hence the created bitmap index is in usable state just after creation.
Now I inserted lots of data into this table from another staging table

INSERT /*+ APPEND */ INTO TEST
(COLUMN1, COLUMN2)
(SELECT COLUMN1, COLUMN2 FROM TEST_STAGING);
COMMIT;

Again I queried oracle about the state of local bitmap index.

SELECT INDEX_NAME, STATUS FROM USER_IND_PARTITIONS WHERE PARTITION_NAME = 'LOW_PART';

SQL>
INDEX_NAME STATUS
--------------------- ---------------------
IX_TEST_COLUMN1 USABLE

Again this index is in usable state. Hence local indexes status does not change upon insertion of data.
Now I tried to be tricky. I just created a new partition named as HIGH_PART on the table TEST.

ALTER TABLE TEST ADD PARTITION HIGH_PART VALUES (1000);

I then again queried oracle about the state of bitmap indexes

SELECT INDEX_NAME, STATUS FROM USER_IND_PARTITIONS;

SQL>
INDEX_NAME STATUS
--------------------- ---------------------
IX_TEST_COLUMN1 USABLE

Hence the created bitmap index is in usable state even after new partition addition.

Now I dropped the default partition as follows

ALTER TABLE TEST DROP PARTITION LOW_PART;

I then again queried oracle about the state of bitmap indexes

SELECT INDEX_NAME, STATUS FROM USER_IND_PARTITIONS;

SQL>
INDEX_NAME STATUS
--------------------- ---------------------
IX_TEST_COLUMN1 USABLE

Hence it is verified that local bitmap indexes on a partitioned table does not become unusable on
1. insertion of data
2. addition of new partition(When you add a partition, actually, a new partition is created for the local bitmap index as well)
3. drop of a partition (When you drop a partition, actually, the corresponding partition from the local bitmap index is dropped as well)

So when and which kind of indexes become unusable.
If you have global indexes on a partitioned table, it will become unusable when
1. you are trying to drop a partition.
2. you are splitting a partition to two new partitions
3. you are moving partitions

In that cases you will have to explicitly rebuild those global indexes as follows.

ALTER INDEX G_IX_TEST_COLUMN1 REBUILD PARTITION HIGH_PART;

Here it is assumed that G_IX_TEST_COLUMN1 is a global index on HIGH_PART partition of TEST table.

Sphere: Related Content

Sunday, August 31, 2008

pagesize in oracle..

Recently I came across a problem of viewing the oracle sql queries results using sqlplus. I selected for this query
"select * from mytable"
Now my table contains 3000 rows. The result contains header breaks repeated after every 14 lines. so it looked very cluttered. I wanted to have it in nice format without any headers repeated. I just googled it and found a very nice command "pagesize"
I used it as follows
set pagesize 3000.
It sets the no of records to be shown at a time on sqlplus pompt without showing headers break. so I was now able to run my same query and it ran like charm.
Voila....no more cluttered line breaks...:)

Sphere: Related Content

Wednesday, August 27, 2008

Google releases Ad Manager

Google has launched a new product from their ad management suite, called Ad Manager. This free and currently beta service is a framework for webmasters, helping them to sell their ad space. It sounds like an interesting offering for all those who directly sell their ad space on some of their sites. Google in return would then make money simply due to the chance that you will (completely optionally) accept their AdSense ads to show whenever you don’t have advertisers yourself.

Google Ad Manager seems to have been in development at Google at least since late 2006.
If you have an AdSense account, you can sign in to Ad Manager today. If not, apply for an AdSense account now. A Google AdSense account is a technical requirement for creating an Ad Manager account.

Ad Manager can help you sell, schedule, deliver, and measure both directly-sold and network-based inventory. It offers an intuitive and simple user interface, Google serving speed and reliability, and significant cost savings. Best of all, Ad Manager can be optionally integrated with Google AdSense to offer you an automated way to maximize the revenue of your unsold and network-managed inventory.

Sphere: Related Content

Google Suggest graduates from Labs

Today, while searching for java I found that google.com now offers google suggest feature on its home page. It means that Google suggest feature has been now available to google site after graduating from google labs. The Google Suggest feature originally started as a 20% project in 2004, and has since expanded to Google Labs, Toolbar, Firefox search box, Maps and Web Search for select countries, the iPhone and BlackBerry, YouTube, and now Google.com.

As you type into the search box, Google Suggest guesses what you're typing and offers suggestions in real time. This is similar to Google's "Did you mean?" feature that offers alternative spellings for your query after you search, except that it works in real time. For example, if you type "bass," Google Suggest might offer a list of refinements that include "bass fishing" or "bass guitar." Similarly, if you type in only part of a word, like "prog," Google Suggest might offer you refinements like "programming," "programming languages," "progesterone," or "progressive." You can choose one by scrolling up or down the list with the arrow keys or mouse.

Sphere: Related Content

Monday, August 25, 2008

Google Translate OneBox

Google has a new tool for quick translations.
All you need to have to do is just search for "translate", followed by a word or an expression and the optional "into English". For example, you can search for [translate désormais] and Google shows the entry from an automatically-generated bilingual dictionary.






Unfortunately, you can't use the search box as a shortcut for Google Translate because full texts aren't yet translated. The bilingual dictionary is only available for the following language pairs: English <-> French/Italian/Spanish/Portuguese/German/Russian/Chinese/Korean/Hindi. It's interesting that Google shows results from Google Image Search next to the translations.

Sphere: Related Content

Friday, August 8, 2008

sending multiple attachments using Unix mailx command

Hi, ever tried to send mail from unix command prompt that contains multiple files as attachments, here is how you can do it in just a single command.

(uuencode file1.oldname file1.newname; uuencode file2.oldname file2.newname;
uuencode file3.oldname file3.newname; uuencode file4.oldname file4.newname) |
mailx -s "Subject of the mail" xyz@abc.com


Above snippets sends the file1, file2, file3 and file4 to the xyz@abc.com as attachments in a mail with a subject "Subject of the mail".

I have used a uuencode command that takes files as input and encode them over the network. The file1.oldname appears as file1.newname to the receiver when he/she opens the attachment.

You can send single file as an attachment as follows

mail -s "Subject of the mail" xyz@abc.com < file1

Sphere: Related Content

Wednesday, August 6, 2008

Google Releases AdPlanner


Google has recently launched a free media planning tool called AdPlanner.
It is supposed to be competitor tool of comscore's Media Metrix or Neilson's @Plan. This tool is invitation only and you have to verify your identity to google before signing up. It has some basic reports that shows you data for UV’s, Reach, Page Views and adSense related informations in case the sites contain adSense adverts. It also contains target audience feature but that is specific to US only. I think they will be enhancing it in future. As opposed to AtPlan and Media Metrix, Google's AdPlanner does not support mixing of audience data based on different demographic information. They support a higher no of demographic data as well. Also AdPlanner does not give any input on how the sites outside their own network will be catered out, especially in case if they are good target for advertising.

Sphere: Related Content

Tuesday, August 5, 2008

Google Releases a new Beta Knol

A few months ago we announced that we were testing a new product called Knol. Knols are authoritative articles about specific topics, written by people who know about those subjects. Today, we're making Knol available to everyone.

The web contains vast amounts of information, but not everything worth knowing is on the web. An enormous amount of information resides in people's heads: millions of people know useful things and billions more could benefit from that knowledge. Knol will encourage these people to contribute their knowledge online and make it accessible to everyone.

The key principle behind Knol is authorship. Every knol will have an author (or group of authors) who put their name behind their content. It's their knol, their voice, their opinion. We expect that there will be multiple knols on the same subject, and we think that is good.

With Knol, we are introducing a new method for authors to work together that we call "moderated collaboration." With this feature, any reader can make suggested edits to a knol which the author may then choose to accept, reject, or modify before these contributions become visible to the public. This allows authors to accept suggestions from everyone in the world while remaining in control of their content. After all, their name is associated with it!

Knols include strong community tools which allow for many modes of interaction between readers and authors. People can submit comments, rate, or write a review of a knol. At the discretion of the author, a knol may include ads from our AdSense program. If an author chooses to include ads, Google will provide the author with a revenue share from the proceeds of those ad placements.

We are happy to announce an agreement with the New Yorker magazine which allows any author to add one cartoon per knol from the New Yorker's extensive cartoon repository. Cartoons are an effective (and fun) way to make your point, even on the most serious topics.

Everyone knows something. See what people are writing about, then tell the world what you know: knol.google.com

Sphere: Related Content

Saturday, August 2, 2008

Yahoo! Search BOSS™

BOSS (Build your Own Search Service) is Yahoo!'s open search web services platform. The goal of BOSS is simple: to foster innovation in the search industry. Developers, start-ups, and large Internet companies can use BOSS to build and launch web-scale search products that utilize the entire Yahoo! Search index. BOSS gives you access to Yahoo!'s investments in crawling and indexing, ranking and relevancy algorithms, and powerful infrastructure. By combining your unique assets and ideas with our search technology assets, BOSS is a platform for the next generation of search innovation, serving hundreds of millions of users across the Web.

Sphere: Related Content

Midori from Microsoft

Midori has been reported to be a possible commercial successor to the Singularity operating system, a research project started in 2003 to build a highly-dependable operating system in managed code.

Microsoft is working on a managed-mode operating system, code-named Midori. Managed mode is a computer program code that executes under the management of a virtual machine, unlike an unmanaged code, which is executed directly by the computer's CPU.

Midori has been reported to be a possible commercial successor to the Singularity operating system, a research project started in 2003 to build a highly-dependable operating system in which the kernel, device drivers, and applications are all written in managed code.



According to Microsoft, Midori is being designed from the ground up to tackle challenges that cannot be met by simply evolving its existing technology. Midori's proposed design is Internet-centric and provides an overall "connectedness" between applications and devices. When Windows was first designed,there was no "Internet" as we understand it today, and things were added later in patches. With the Midori however, it will focus on concurrency for both distributed applications and local ones.

Eric Rudder, Senior Vice President for technical strategy at Microsoft and an alumnus of Bill Gates' technical staff, is heading up the effort.

No time frame for development has been set for Midori as its considered a 'research project' at the moment, according to Microsoft technical fellow Burton Smith. A spokesperson added that Midori is one of many projects in incubation at Microsoft Research.

Source: Techtree.com

Sphere: Related Content

Friday, August 1, 2008

Google to Extend Reach With Venture-Capital Arm

Google Inc. is working on plans to start a venture-capital arm, according to several people briefed on the discussions.

The group will be led by David Drummond, Google's senior vice president of corporate development and chief legal officer, according to two of these people. Google has hired William Maris, a 33-year-old former entrepreneur who has worked as an investor, to help set up the venture. How the group will be structured and what sort of investments it is likely to target remain unclear.

Google executives previously have bandied about the idea of launching a venture-capital unit, and the plans could still fall through. Mr. Maris couldn't be reached for comment.

The move would make Google the latest technology giant to take on a more-formal role in seeding start-ups. Intel Corp. has had a large venture-capital arm for years, as have Motorola Inc., Comcast Corp. and many others. In the consumer-Internet area, Walt Disney Co.'s Steamboat Ventures has invested in a number of Web start-ups. So has Amazon.com Inc., which has funded a number of young companies without structuring a formal fund.

Their track records have been mixed. Corporate venture-capital arms have been hampered by challenges that traditional venture-capital businesses don't face. Venture capitalists invest in private start-ups at an early stage, usually in hopes of a big payout if the company is sold or if its stock goes public.

Many start-ups fear that taking corporate money limits their options and comes with strings that could turn away other potential investors -- such as a right to buy the company at a later date. Some funds with less competitive compensation have struggled to retain managers, and corporate venture funds often don't allow senior employees to invest personal money in their funds, while other venture funds typically do.

Corporate venture capitalists' share of overall venture-capital dollars invested in U.S. companies fell to 7% in the first half of 2008 from 8.4% in 2007, according to PricewaterhouseCoopers and the National Venture Capital Association. Corporate venture capitalists were involved in roughly 20% of the venture-capital deals signed during the first half of 2008, compared with 21% in 2007.

With an abundance of venture-capital money available today, Google will have to convince entrepreneurs that it has something to offer that other investors don't. It has several advantages, including a brand admired by start-ups and the ability to offer sizable technical resources.

The Mountain View, Calif., Web giant has long preferred to buy companies rather than invest in them, and has plenty of cash to keep doing so. But it has invested millions of dollars in companies ranging from Current Communications, which offers broadband Internet over power lines, to Meraki, a wireless-Internet-equipment manufacturer. The company said last year that it intends to invest hundreds of millions of dollars in renewable-energy projects in conjunction with its philanthropic arm, Google.org. Google also has launched a number of informal funding programs, including contests for software developers.

The new venture could help formalize those efforts and could help Google expand the footprint of some of its online-software products geared at small businesses. Other corporate venture funds have made investments as a way to gain experience in new product areas and markets.

Sphere: Related Content

Yahoo Turns Yelp, Yahoo Local and LinkedIn SearchMonkey Apps On In Search

Yahoo is making a number of changes to its default search experience tonight to add more structured data to results. Yelp, Yahoo Local and LinkedIn SearchMonkey widgets are being added to search results automatically, eliminating the need for users to go into the search gallery and add them manually.

SearchMonkey is a key part of Yahoo’s attempts to embrace the semantic web and open standards in general.

With SearchMonkey, site owners create “applications” for Yahoo search that can be installed by users in the same sense that Facebook applications can be installed. Each application modifies results for a certain URL specification (for example, all reference pages on Wikipedia or product pages on Amazon). Modifications include both changes to the basic elements of a search result (the title and description) and additions such as an image, deep links, and key/value pairs.

Users can also add additional widgets via the Yahoo Search Gallery.

Here’s the Yelp search result example we used in our first post about SearchMonkey:

Sphere: Related Content

Wednesday, July 30, 2008

Cuil - The Next "Google Killer"?

Cuil - The Next "Google Killer"?
With the recent press about Cuil, the latest "Google-Killer Search Engine", it seems that we've forgotten the lessons from the late 90s. Cuil's claim to fame appears to be:


It was founded by Ex-Googlers
They claim to have a larger web-page index than Google
The first point is somewhat interesting, but not exactly a path to success. As for the second point, I'd like to say: (1) How do you know that? (2) What does that mean? (3) So?

How Do You Know That?

Google doesn't release the size of its index.

What Does That Mean?

How did they count the size of Google's index? If two urls have identical content, are those the same page? What if the content is merely very similar? Suppose the only difference is that Google isn't indexing the duplicate pages (or, say, the spammy pages), does it matter that Cuil's index is bigger?

So?

Bigger isn't better. I thought we'd learned that back in the late 90s. For most queries, it doesn't matter if the search engine returns 30 results or 1000. You' generally don't go past the 3rd page. What really matters is the ranking of the pages. If the page you wanted is on the 15th page, it might as well not be there at all.

How Cuil Actually Stacks Up:

Interface:

Pros: Slick and pretty. The content drill down is nice - although it doesn't always display relevant things. I also like having the page numbers locked at the bottom so that I don't have to scroll.
Cons: Ranking of results is unclear. There's 3 columns and the rows don't line up with each other. When I'm trying to actually find a good page, I'm not sure where to read.

Speed, Reliability, Performance

Pros: Speedy
Cons: Searches frequently fail. I got "no results" when I tried searching for "Google Talk". I tried the same search a second time and it worked.

Search Result Quality

Selection Criteria for Sample Queries: All queries were selected from my Google Web History, and were queries in which I was attempting to answer a question.

Query #1 (an error I am getting with Google App Engine): error 403 cpu quota exceeded
Cuil: No Results
Yahoo: #1 Result is Google App Engine article about it
Google: #1 Result is a Google Group question about this. #3 (or #5) is the Google App Engine article
Winner: with Google as a close second.
Answer: Common Error. Try using python's profiling.

Query #2: send pdf to kindle
Cuil: Show articles mentioning that you can do this, but not telling me how.
Yahoo: #1 Result is a discussion about it.
Google: #1 Result is a link to Amazon explaining how to do this.
Winner: Google
Answer: Your Kindle has an email address that you email the pdf to.

Query #3: 99 luftballoons translation
Cuil: #1 Result is a translation
Yahoo: #1 Result is someone asking for a translation
Google: #1 Result is a translation
Winner: Cuil & Google (tie).
Answer: It's about war. And red balloons. :-)

Query #4: "imagine no religion" billboard seattle
Cuil: No results
Yahoo: #1 Result is blog post mentioning it. #2 Result is press release about it.
Google: #1 Result is press release about it. #2 Result is blog post mentioning it.
Winner: Google, with Yahoo as a close second
Answer: This billboard was put up by the Freedom From Religion Foundation.

Query #5: percent female math majors in US
Cuil: No results
Yahoo: #1 is a seemingly-relevant but dead link. #2 also seems relevant, but not a direct answer. #3 is about carbon monoxide levels at death. Hmm...
Google: #1 is related article that contains an answer to the question. #2 is a very relevant study, and the summary (which is as far as I read) indirectly answers the question. #3 is about a particular school's gender ratio.
Winner: Google.
Answer: 48% of math majors in the US are female.
Bonus Query: cuil

Cuil: Nothing even remotely related to the search engine.
Yahoo: #1 result is the search engine.
Google: #1 result is the search engine.
Winner: Google and Yahoo. Poor Cuil...
Answer: Google and Yahoo both know what Cuil is (as well as what each other). Cuil, sadly, does not.

Conclusions

While Cuil may claim to have a larger search index, the number of "no result" searches certainly suggest lesser web coverage. The flashy interface is mostly just that - flashy. It's pretty, but the three column layout leave your eyes wandering all over the page unsure of which result is meant to be the most relevant. A more cynical person might even suggest that the three column layout helps mask the fact that Cuil may not know an appropriate ranking.

If you want to get real traction as yet-another-search-engine, you'd better attack a different market from Google (or Baidu in China, or Yahoo in Japan, etc) or you'd better be substantially better than Google. Just being better isn't good enough, and Cuil has a long way to go even on that end.

Sphere: Related Content

Saturday, July 26, 2008

New MySQL Version is available

Drizzle is a newly announced fork of the open source MySQL project. The developers of the project are taking MySQL back to its roots as a light-weight web application database by removing many of the features introduced in MySQL 5. The fifth version of MySQL was in development for years as some users demanded features such as views, stored procedures, transaction handling, clustering and more. The early releases were bulkier and not as stable as the ultra-popular version 4 of MySQL, and now somebody has forked the codebase into a new project to take the database server back to what it was.

For most web application developers, only a basic database system is required. The original popularity of MySQL was because of its simplicity and ease of use. Postgres was always a full-featured open source database server that offered all the enterprise features of competing commercial systems. MySQL was a lighter alternative which was easy to install and learn, but a lot of that simplicity was lost as the development of MySQL progressed towards competing in the enterprise.

Drizzle would seem to have an instant user audience and developer base amongst those longing for the old MySQL. These developers are likely low to medium-end web application developers using a scripting environment and don’t require or don’t need an advanced database system. MySQL was a key part of the default LAMP stack that pioneered simple web application development which went on to open a whole new market. While MySQL 5 can be componentized and customized, developers seeking a smaller and lighter-weight database can revert to Drizzle, at least until the MySQL team see the demand and offer something themselves.

Sphere: Related Content

Wednesday, July 23, 2008

Facebook Responds To MySpace With Facebook Connect

Facebook will announce later today Facebook Connect, which has similar functionality to MySpace Data Availability, announced just yesterday. The actual product won’t be released for at least a few weeks, so the timing on this, coming immediately after MySpace, is somewhat suspicious.

It is essentially a new version of their API for third party websites, which was first launched in August 2006.

It will allow users to “connect” their Facebook identity, friends and privacy to any website. Third party websites will be able to implement and offer more features of the Facebook Platform off of Facebook – the same features available to third party applications today on Facebook.

To make data portable, Facebook believes it’s about giving users the ability to take their identity and friends with them around the Web, while being able to trust that their information is always up to date and always protected by their privacy settings. The next iteration will be available publicly within the next several weeks.

One of their initial launch partners will be Digg.

I spoke with Ben Ling, Director Platform Product Marketing, and Ruchi Sanghai, Product Manager for Facebook Platform, this afternoon about the upcoming changes.

Facebook Connect has four primary features:


Trusted Authentication – Anywhere during the user’s experience that the developer would like to add social context, the user will be able to authenticate and connect their account in a trusted environment. The user will have total control of the permissions granted. This is a proprietary authentication mechanism, but is more streamlined than the existing method and will not require a redirect back to Facebook.

Real Identity – Users can bring their real identity information with them wherever they go on the open Web, including: basic profile information, profile picture, name, friends, photos, events, groups, and more.

Friends Access – Users will be able to take their friends with them wherever they go on the open Web. Developers will be able to add rich social context to their websites, and will be able to show which of their Facebook friends already have accounts on their sites.

Dynamic Privacy – As a user moves around the open Web, their privacy settings will follow, ensuring that users’ information and privacy rules are always up-to-date.
Facebook connect is Facebook’s first honest attempt to allow access to Facebook user data outside of Facebook itself. The company is describing it as giving third party applications access to much of the same data as Facebook applications have today. We’ll know more in a couple of weeks when it formally launches.

Sphere: Related Content

Friday, July 18, 2008

Search and Replace in Oracle

Suppose you want to update String value of a column based on search and replace, you can use Replace function of Oracle. It takes 3 parameters as follows.
1. Column name you are interested in to find and replace values of
2. Search String
3. Replacement String

for example, you can update the values of all names if they contain 'Ram' in themselves by 'Shyam'.

update user_account set user_name = replace(user_name, 'Ram','Shyam');
This will first search all user_names for 'Ram' and then updates them with String 'Shyam';

Sphere: Related Content

Thursday, July 17, 2008

Know IP address of machine on Solaris

You can use host command to know the IP address of your host machine.

$host devzone-ajaved
devzone-ajaved has address 10.27.111.126

for further informations on name server lookup, you can use nslookup command
as follows

$nslookup devzone-ajaved
Server: 10.27.111.126
Address: 10.27.111.126#53

Name: devzone-ajaved.sfo1.us.xxx.net
Address: 10.27.111.126

Sphere: Related Content

Tuesday, July 15, 2008

Microsoft Acquires Data Optimization Provider Zoomix

Zoomix, an Isreali-based company that provides a data optimization and acceleration layer for storage engines, has confirmed today that they have been acquired by Microsoft for an undisclosed amount. The primary product from Zoomix is the Accelerator, a data server that normalizes, links and synchronizes data without requiring user specification or input. It learns from your data sets and associates objects and records that may be related, so its primary goal is to not only clean up data but to automate the mundane tasks that often fall onto DBMs or BA’s.


Microsoft will integrate the tech and R&D team at Zoomix into their existing data team in Israel. Microsoft plan on integrating the technology from Zoomix Accelerator into SQL Server as part of a broader strategy in developing SQL Server into more than just an RDBM but rather a complete data storage and management platform. Microsoft recently confirmed that SQL Server 2008 will be released to manufacturing in August, after being available in release candidate status since January.

SQL Server 2008 integrates the new Always On technology, a clustering and failover technology aimed to increase the reliability of SQL Server and increase its penetration potential within medium and higher end enterprise customers. SQL Server now also supports multiple new data types at both the storage level (with binary BLOB’s) and higher structure level (XML sets and particular data types such as email, calendar entries, and more). The new features of SQL Server 2008, along with incorporated technologies such as those from Zoomix, are forming the foundations of a solid set of data products from Microsoft.

Sphere: Related Content

which process is using a specific port

how to check which process is using a specific port on your linux server.

"lsof -i :"

For example to see which process is using port 80 simply enter

"lsof -i :80" (without the quotes of course)

Sphere: Related Content

Sunday, July 13, 2008

AOL to launch Platform-A

Its raining networks in India
from TechnoTrail by Rajat

AOL is all set to launch Platform-A in August or September.
In the process advertising.com, which is part of Platform-A, will make its Indian debut.

Invizi Ad Network, has been launched by Games2Win, with adSense like model for in game advertising.

Sphere: Related Content

Google Ad Manager for publishers

Google has launched (in beta) hosted ad management solution for publishers-AdManager,the solution helps deliver and optimize ad inventory for both directly sold and network based inventory (including adSense) and yes its free.

Another player in the same space is OpenAds now known as OpenX ,which at the moment is not a hosted solution."

Sphere: Related Content

Detect invisible users on Yahoo

Detect invisible users on Yahoo

Sphere: Related Content

Saturday, July 12, 2008

Exporting the results of a sql query in HTML format

htmlrun.sql
set termout off
set markup HTML ON HEAD " -
<style type='text/css'> -
body {font:10pt Arial,Helvetica,sans-serif; color:black; background:White;} -
p { font:10pt Arial,Helvetica,sans-serif; color:black; background:White;} -
table,tr,td {font:10pt Arial,Helvetica,sans-serif; color:Black; background:#f7f7e7; -
padding:0px 0px 0px 0px; margin:0px 0px 0px 0px; white-space:nowrap;} -
th { font:bold 10pt Arial,Helvetica,sans-serif; color:#336699; background:#cccc99; -
padding:0px 0px 0px 0px;} -
h1 { font:16pt Arial,Helvetica,Geneva,sans-serif; color:#336699; background-color:White; -
border-bottom:1px solid #cccc99; margin-top:0pt; margin-bottom:0pt; padding:0px 0px 0px 0px;} -
h2 { font:bold 10pt Arial,Helvetica,Geneva,sans-serif; color:#336699; background-color:White; -
margin-top:4pt; margin-bottom:0pt;} a {font:9pt Arial,Helvetica,sans-serif; color:#663300; -
background:#ffffff; margin-top:0pt; margin-bottom:0pt; vertical-align:top;} -
</style> -
<title>&1</title>" -
BODY "" -
TABLE "border='1' align='center' summary='Script output'" -
SPOOL ON ENTMAP ON PREFORMAT OFF
spool AhsanJaved.html
prompt &1
clear buffer
1 &1
/

spool off
set markup html off spool off
host start AhsanJaved.html
set termout on

Sphere: Related Content

Formatting the output of a sql query in HTML

html.sql
set termout off
set markup HTML ON HEAD " -
<style type='text/css'> -
body {font:10pt Arial,Helvetica,sans-serif; color:black; background:White;} -
p { font:10pt Arial,Helvetica,sans-serif; color:black; background:White;} -
table,tr,td {font:10pt Arial,Helvetica,sans-serif; color:Black; background:#f7f7e7; -
padding:0px 0px 0px 0px; margin:0px 0px 0px 0px; white-space:nowrap;} -
th { font:bold 10pt Arial,Helvetica,sans-serif; color:#336699; background:#cccc99; -
padding:0px 0px 0px 0px;} -
h1 { font:16pt Arial,Helvetica,Geneva,sans-serif; color:#336699; background-color:White; -
border-bottom:1px solid #cccc99; margin-top:0pt; margin-bottom:0pt; padding:0px 0px 0px 0px;} -
h2 { font:bold 10pt Arial,Helvetica,Geneva,sans-serif; color:#336699; background-color:White; -
margin-top:4pt; margin-bottom:0pt;} a {font:9pt Arial,Helvetica,sans-serif; color:#663300; -
background:#ffffff; margin-top:0pt; margin-bottom:0pt; vertical-align:top;} -
</style> -
<title>SQL*Plus Report</title>" -
BODY "" -
TABLE "border='1' align='center' summary='Script output'" -
SPOOL ON ENTMAP ON PREFORMAT OFF
spool AhsanJaved.html
1
/
spool off
set markup html off spool off
host start AhsanJaved.html
set termout on

Sphere: Related Content

Script to return the output of a sql query in CSV Format

csv.sql
set linesize 2000
alter session set nls_date_format ='dd-mon-yyyy hh24:mi:ss';
set termout off feedback off colsep ,
--column buy_id clear
column log_file clear
--column load_status clear
column load_date clear
column load_comment clear
--column load_count clear
--column buy_id format 10
column log_file format a20
--column load_status format 5
column load_date format a20
column load_comment format a20
--column load_count format 10
clear buffer
prompt &1
prompt &2
spool &1
2 &2
/
--column buy_id clear
column log_file clear
--column load_status clear
column load_date clear
column load_comment clear
--column load_count clear
spool off
set colsep " "
set termout on feedback on

Sphere: Related Content

Cleaning up a schema in Oracle

BEGIN
FOR cur_rec IN (SELECT table_name, constraint_name
FROM user_constraints
WHERE constraint_type = 'R') LOOP
EXECUTE IMMEDIATE 'ALTER TABLE ' || cur_rec.table_name || ' DROP CONSTRAINT ' || cur_rec.constraint_name;
END LOOP;
FOR cur_rec IN (SELECT object_name, object_type
FROM user_objects) LOOP
BEGIN
IF cur_rec.object_type != 'DATABASE LINK' THEN
EXECUTE IMMEDIATE 'DROP ' || cur_rec.object_type || ' ' || cur_rec.object_name;
execute immediate 'purge recyclebin';
END IF;
EXCEPTION
WHEN OTHERS THEN
NULL;
END;
END LOOP;
END;
/

Sphere: Related Content

command to know the command

command to know the command for given pid

ps -eaf | grep 28885

Sphere: Related Content

command to know the full command

command to know the full command for given pid

/usr/ucb/ps awwx | grep

Sphere: Related Content

Know the all arguments for a command

command to know the all arguments for a command for given pid
ps -eaf | pargs -a

Sphere: Related Content

Using import and export command on oracle.

to export and import one schema to another schema.(All schemas should be present already. It will not create new schema, it will create only schema objects and fill their data into objects.)

1. open cmd and type
EXP {schema you want to export from} FILE=exp_database.dmp COMPRESS=N CONSISTENT=N CONSTRAINTS=Y GRANTS=Y INDEXES=Y RECORD=Y ROWS=Y Feedback=1000 LOG=exp_database.log

for example
EXP ahsan_apr/welcome@adapp FILE=exp_database.dmp COMPRESS=N CONSISTENT=N CONSTRAINTS=Y GRANTS=Y INDEXES=Y RECORD=Y ROWS=Y Feedback=1000 LOG=exp_database.log

This will export all tables to a new dump file called exp_database.dmp

To export the selected tables to dump file
EXP {schema you want to export from} FILE=exp_database.dmp tables=TFR_MEDIA_DIM,TFR_SITE_DIM COMPRESS=N CONSISTENT=N CONSTRAINTS=Y GRANTS=Y INDEXES=Y RECORD=Y ROWS=Y Feedback=1000 LOG=exp_database.log

This will export selected tables TFR_MEDIA_DIM and TFR_SITE_DIM to a new dump file called exp_database.dmp

To export only a subset of rows use
EXP {schema you want to export from} FILE=exp_database.dmp tables=TFR_MEDIA_DIM COMPRESS=N CONSISTENT=N CONSTRAINTS=Y GRANTS=Y INDEXES=Y RECORD=Y ROWS=Y Feedback=1000 LOG=exp_database.log QUERY=\"WHERE id \> 13\".

Make sure you escape special char properly with \ because this will be translated into
SELECT * FROM TFR_MEDIA_DIM WHERE id > 13

2. open cmd and type
IMP userid={schema you want to import data to} fromuser={schema you exported data from} touser={schema you want to import data to} file=exp_database.dmp

for example
IMP userid=ahsan_report/welcome@orcl fromuser=ahsan_apr touser=ahsan_report file=exp_database.dmp

Sphere: Related Content

Which port is being used by which command

command to know which port is being used by which command

/usr/bin/ps -ef -o pid -o args | egrep -v "grep|pfiles"

Sphere: Related Content

Passing argument to java files through sh file

use $1 and $2 etc in sh file such as
inside run.sh write

java -cp ./lib/abc.jar com.test.myetes.NoadLoader $1 $2

Sphere: Related Content

How to make a cron job

Cronjobs can be declared using default crontab editor

EDITOR=vi
This will first set the default editor to vi

and then execute
crontab -e
this will open the default crontab editor.

You can now add few lines to it that will be your cron jobs
20 04 * * * /mnt/users/ajaved/test.sh >> /mnt/users/ajaved/test.log 2>&1

This will basically be executing test.sh each 04:20 AM on each day each week and each month, and writes the ouput to a file called test.log present in the same directory. It also appends the error to the same file if any.

Sphere: Related Content

How much space a directory and its contents are taking up

Need to know how much space a directory and its contents are taking up on your UNIX system? Here’s what I use

du -ksh directory

Sphere: Related Content

Enable remote debugging in Java

Use following arguments in front of your java command

-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005

It will start remote debugging at port 5005. Now you can connect to this port using any IDE of Java

Sphere: Related Content

for executing a script file from sqlplus

for executing a script file from sqlplus we use @ meta character on sqlplus as follows

SQL>@{path}/{file}

like
SQL>@/mnt/users/ajaved/test.sql

Sphere: Related Content

command to know java processes running on a machine

Sun has introduced a new command to know the java process running in the system.
jps

Sphere: Related Content

starting vnc server on solaris

use vncserver command to start with depth and geometry parameters

vncserver -depth 24 -geometry 1280x1024

this will start a vncserver at some random ports and from hereon you can use that port to connect to this vncserver

Sphere: Related Content

To view and save the output from a command at the same time:

Tee command is used to take the output of one command as its own input and pass it to a new file like

lint program.c | tee -a program.lint

It will take the output of lint command as its own input and will append the output to a file called program.lint

-a option is used for appending. You can remove this if you want it to override the previous contents of the program.lint file

Sphere: Related Content

To View the SQL Being executed in Ibatis.

To View the SQL Being executed in Ibatis.
Use com.ibatis.sqlmap.engine.mapping.SimpleDynamicSql.java's getSql() method in Ibatis.jar. This method gives you the sql being executed by the ibatis data mapper after all the dynamic elements have been replaced.

Sphere: Related Content

To see explain plan of oracle query

There are two ways to view explain plan

1. Go to sql prompt

set autotrace traceonly explain
select 1 from dual
set autotrace off

2. Go to sql prompt
EXPLAIN PLAN FOR
select 1 from dual

and then select from DBMS_XPLAN.DISPLAY table that stores the explain plan for last executed query

SELECT * FROM table(DBMS_XPLAN.DISPLAY);

Sphere: Related Content

To view table storage size of all tables in schema

declare
sz varchar2(100);
begin
for i in (select table_name from user_tables) loop
select bytes/1024/1024 into sz from user_segments where segment_name=i.table_name;
dbms_output.put_line(i.table_name || ':' || sz || 'MB');
end loop;
end;
/

Sphere: Related Content

Printing the lines that does not contain a pattern

printing the lines that does not contain a pattern use -v option like

ggrep -v 'ahsan'

it will print all the lines where ahsan is not present

Sphere: Related Content

Passing regular expression to grep

ggrep -E 'abc|def'

-E is used for regex and inside quotes you can pass any regex.

Sphere: Related Content

To view all table rows count in a stored procedure

set head on
set echo on
declare
a number;
str varchar2(500);
begin
for i in (select table_name from user_tables) loop
str:='select count(*) from ' || i.table_name;
execute immediate str into a;
dbms_output.put_line(i.table_name || ':' || a);
end loop;
end;
/

Note:
table name can not be dynamic in select c1,c2..from . Use the above approach instead.

Sphere: Related Content

Jprofiler setup on solaris

1. For 32 bit JVM
(A) Please insert the agent.jar path into the start command of your remote application right after the java command.

-agentlib:jprofilerti=port=8849 -Xbootclasspath/a:/mnt/users/ajaved/jprofiler4/bin/agent.jar

(B) Please add jprofiler installation path to your LD_LIBRABRY_PATH
like add /mnt/users/ajaved/jprofiler4/bin/solaris-x86 to the environment variable LD_LIBRARY_PATH.

2. For 64 bit JVM
(A) Please insert the agent.jar path into the start command of your remote application right after the java command.

-agentlib:jprofilerti=port=8849 -Xbootclasspath/a:/mnt/users/ajaved/jprofiler4/bin/agent.jar

(B) Please add jprofiler installation path to your LD_LIBRABRY_PATH
like add /mnt/users/ajaved/jprofiler4/bin/solaris-x64 to the environment variable LD_LIBRARY_PATH.

Sphere: Related Content

Explain plan for mview refresh in oracle

Explain plan for mview refresh

alter session set tracefile_identifier=ahsan

alter session set events '10046 trace name context forever, level 12';

exec dbms_mview.refresh ('MY_MVIEW_NAME','C');

alter session set events '10046 trace name context off';

then go in /mnt/oracle-dev1/admin/adapp/udump
search the last file with "ahsan" in it

tkprof

It will give you the output of input trace file in a readable format.

Sphere: Related Content

To see the indexes for a table

To see the indexes for a table

SQL> select owner, table_name, index_name, column_name
FROM dba_ind_columns
Order by owner, table_name, column_position
Where owner=’SCOTT’
AND table_name=’EMP’;

TABLE_OWNER TABLE_NAME INDEX_NAME COLUMN_NAME
--------------- -------------------- -------------------- ----------
SCOTT EMP PK_EMP EMPNO

Sphere: Related Content

To convert an integer to binary string using oracle pl/sql

-- Converts a given decimal number to binary.
-- Ignores decimals - only converts integer portion of a number,
-- but it keeps the sign.

CREATE OR REPLACE FUNCTION f_to_binary ( in_num IN NUMBER )
RETURN NUMBER
IS
ln_max NUMBER := FLOOR ( LN ( ABS ( in_num ) ) / LN(2) );
ln_num NUMBER := ABS ( in_num );
lv_bin VARCHAR2(4000) := '0';
ln_Sign NUMBER;
BEGIN
IF in_num >= 0 THEN
ln_Sign := 1;
ELSE
ln_Sign := -1;
END IF;

FOR i IN REVERSE 0..ln_max
LOOP
IF ln_num >= POWER ( 2, i ) THEN
lv_bin := lv_bin || '1';
ln_num := ln_num - POWER ( 2, i );
ELSE
lv_bin := lv_bin || '0';
END IF;
END LOOP;

RETURN TO_NUMBER ( lv_bin ) * ln_Sign;
END f_to_binary;
/

execute it as follows
SET SERVEROUTPUT ON
declare
out_num NUMBER;
begin
out_num := f_to_binary(10);
DBMS_OUTPUT.PUT_LINE('output = ' ||out_num);
end;
/

Sphere: Related Content

To format the width of column in oracel query

To format the width of column in oracel query
column table_owner format a15

This will format the length of table_owner named column to 15 alphanumeric characters.

Sphere: Related Content

To set pagesize in oracle sqlplus

To set pagesize
set pagesize 1

Sphere: Related Content

To set the linesize in oracle sqlplus

To set the linesize
set linesize 300

Sphere: Related Content

To set the server output on oracle sqlplus

SET SERVEROUTPUT ON

Sphere: Related Content

Query that gives us a list of blocking sessions and the sessions that they are blocking:

To see what session is blocking other sessions or query that gives us a list of blocking sessions and the sessions that they are blocking:

select blocking_session, sid, serial#, wait_class, seconds_in_wait From v$session
where blocking_session is not NULL order by blocking_session;

BLOCKING_SESSION SID SERIAL# WAIT_CLASS SECONDS_IN_WAIT
---------------- ---------- ---------- -------------------- --------
148 135 61521 Idle 64

In this case, we find that session 148 is blocking session 135 and has been for 64 seconds.

We would then want to find out who is running session 148, and go find them and see why they are having a problem.

to view current Oracle users
SQL> select sid, serial#, username, osuser, machine from v$session where username is not NULL;

SID SERIAL# USERNAME OSUSER MACHINE
---------- ---------- ------------------------- ---------- -------------------
122 49671 GRUMPY grummy htmldb.com
141 45178 IMPORTANT_STUFF oracle htmldb.com

Sphere: Related Content

To know which query is executed on a particular session

To know which query is executed on a particular session or to see what SQL queries, users are running on the system, you can execute following on sqlplus

select a.sid, a.serial#, b.sql_text from v$session a, v$sqlarea b where a.sql_address=b.address and a.username='AHSAN_REPORT';

SID SERIAL# SQL_TEXT
---------- ---------- ----------------------------------------------
122 61521 select count(*) from gen_person where gen_person_id=95000

Change your user name here with 'AHSAN_REPORT'

Sphere: Related Content

To kill locked sessions in Oracle

To view the locked session on oracle
SQL> select oracle_username,object_id,session_id from v$locked_object;
ORACLE_USERNAME OBJECT_ID SESSION_ID
------------------------------ ---------- ----------
AHSAN_REPORT 321876 130
AHSAN_REPORT 320431 130
AHSAN_REPORT 320429 130
AHSAN_REPORT 320427 130
AHSAN_REPORT 320415 130
AHSAN_REPORT 320413 130
6 rows selected.

Now you would like to see which objects are actually locked. For this do as follows:

SQL> select object_name from dba_objects where object_id = 321876;
OBJECT_NAME
--------------------------------------------------------------------------------
APR_MOSAIC_GEO_CODE_DIM

After being sure that this object indeed belongs to you, you can kill it by:

1) first obtain the object Id from session.

SQL> select sid,serial# from v$session where sid=130;
SID SERIAL#
---------- ----------
130 8655

2) Kill the disturbing session.

SQL> alter system kill session '130,8655';
System altered.

Now you can verify that there are no more blocked objects.

SQL> select oracle_username,object_id,session_id from v$locked_object;
no rows selected

Sphere: Related Content

Find command to execute same command to multiple directories

If you want to apply a command to a directory recursively, use find.
Here's how:

find . -exec echo {} \;

The above code will execute the command "echo" on every filename in the current directory, and all subdirectories recursively.

The '.' means 'current directory' (you could put any directory name instead of it), 'echo' is a command you want to execute.
'{}' is like a variable that represents the filename for each file.

find /mnt/users/ajaved -exec echo {} \;

Sphere: Related Content

Using TKPROF in Oracle

You can use tkprof utility provided by oracle to analyze your sql query execution

first generate a input trace file and then use

tkprof "input_trace_file" "output_file"

it will generate a output file for your analysis in readable format.

Sphere: Related Content

Printing the context of a matching line in grep

You can use grep to print context of matching lines as follows

ggrep -A 4 -B 5 -f uniq.txt outapr.* > qasim.txt

this will print 4 lines above matching line and 5 lines below matching line.

Sphere: Related Content

Screen in Unix

Screen provides multiple window capability in Unix, just like firefox provides you the capabilities of multiple tabs opened at a time
Here is how you can work with screen command

Create a screen by
screen -S "screen name" for creating a screen with name "screen name".

List all screens using
screen -ls for listing all the screens.

To attach a detatched screen
screen -dr "screenName" to attach to a screen.

To share a screen across the users
screen -x "screen name" to share the screen.

CTRL-a is the base command to work with all screen commands in unix.

CTRL-a-c to create a new window in screen

CTRL-a-d to detach from all screens and return to main shell.

CTRL-a-CTRL-a to move back and forward in your multiple windows.

CTRL-a-SHIFT-a to rename your current window.

CTRL-a-k to kill current window.

CTRL-a-SHIFT-" to navigate to all screens in a tabular fashion.

CTRL-a-num to move num window

CTRL-a-n to move to next window

CTRL-a-p to move to previous window

CTRL-a-BACKSPACE to move to previous window

You can also customize how screen window looks like. For that you have to make change to .screenrc file found in your user directory. Insert these lines in .screenrc file to have a nice looking tabs in each of your screen window.

startup_message off
vbell off
caption always "%{= bb}%{+b w}%n %h %=%t %c"
hardstatus alwayslastline "%-Lw%{= BW}%50>%n%f* %t%{-}%+Lw%<"
activity "Activity in %t(%n)"
shell -/bin/bash

Sphere: Related Content

To see the index size of a table columns in oracle

Suppose you want to know the name of indexes and column names for a table in oracle,
Here is how you can do it.
Replace TEST_TABLE with your table name.

SELECT A.INDEX_NAME, A.TABLE_NAME, A.COLUMN_NAME, B.SIZE_MB FROM
(SELECT INDEX_NAME , TABLE_NAME, COLUMN_NAME FROM USER_IND_COLUMNS WHERE TABLE_NAME = 'TEST_TABLE') A,
(SELECT SEGMENT_NAME, SUM(BYTES)/1024/1024 SIZE_MB FROM USER_SEGMENTS GROUP BY SEGMENT_NAME) B
WHERE A.INDEX_NAME = B.SEGMENT_NAME ;

Sphere: Related Content

How do I turn a path into an Ant property

http://www.jguru.com/faq/view.jsp?EID=471917

For example:

<path id="tools.class.path">
<pathelement location="${xerces.jar}"/>
<pathelement location="${testlet.jar}"/>
<pathelement location="${junit.jar}"/>
<pathelement location="${tools.jar}"/>
<fileset dir="${tools.dir}/lib">
<include name="*.jar" />
<exclude name="testlet.jar"/>
<exclude name="xerces.jar"/>
</fileset>
</path>

It would be nice to be able to print the contents of this path, for debugging. The obvious approach:

<echo message="Classpath is ${tools.class.path}"/>

Doesn't work.

Here's how: First declare a property, referring to the path. Then print the property:

<property name="cp" refid="tools.class.path"/>
<echo message="Classpath is ${cp}"/>

Sphere: Related Content

accessing system and environment vaiables in ant

Suppose you want to access your environment variable in your ant execution path.
You can do it like follows:
Access the environment using property tag of ant and then add the value of that variable to your path element.
<property environment="env">
<path>
<pathelement path="${env.PATH}:scripts">
</path>
</property>


Sphere: Related Content

Ant java task to start application

http://www.velocityreviews.com/forums/t131651-ant-java-task-to-start-application.html
I can't help you get the debugger to work when you're launching with Ant, but there are a number of ways to work around the command line problem.
One is to put all of the jars you're using into a single directory, and make that the extension directory like this:

java -Djava.ext.dirs=C:/myjardir -classpath C:/myclasses MyAppClassBe

careful though, only files with names ending in .jar will be foundin that directory, not .zip.

Rename *.zip to *.jar and they'll be found.

Another way would be to have an empty jar file in the classpath, andthe Class-Path header of its manifest file would reference all of the other jars you need, so you don't need to include them in the classpath.
See:http://java.sun.com/j2se/1.4.2/docs/...ons/index.html for more info.

Sphere: Related Content

Bash Shell Command to Find or Get IP address

http://www.cyberciti.biz/faq/bash-shell-command-to-find-get-ip-address/
Type /sbin/ipconfig command to display IP address:

$ /sbin/ifconfig

OR type the following command:

$ /sbin/ifconfig less

Under Solaris and other Unixish oses you may need to type ifconfig command with -a option as following:

$ /sbin/ifconfig -a

Sphere: Related Content

to kill blocked process in oracle

suppose you know the session id which is blocking you program. you can kill that process using this.

select spid from v$process where addr in (select paddr from v$session where sid = 130)
and then execute

kill -9 spid

or
Suppose you know the session name or user name which is blocking you can kill that process like this.

select '!kill -9 ' spid from v$process where addr in ( select paddr from v$session where username='AHSAN_DEV');

this will give list of all process ids to be killed that is blocking, execute them one by one...

Sphere: Related Content

assigning the output of a unix command to a shell variable

Suppose you have to obtain the output of ls command in a variable called var,
then you could do following.

var=`ls`

echo $var

Sphere: Related Content

making a logon trigger for session tracing in oracle

CREATE OR REPLACE TRIGGER
enable_10046_trace_trigger after logon on database
begin
if user ='AHSAN_DEV' then
execute immediate 'alter session set timed_statistics = true';
execute immediate 'alter session set max_dump_file_size = unlimited';
execute immediate 'alter session set tracefile_identifier = ''AHSAN''';
execute immediate 'alter session set events ''10046 trace name context forever, level 12'' ';
end if;
end;/

Sphere: Related Content

to find duplicate rows in Oracle Db

SELECT BUY_GROUP_ID, EXPOSURE_ID, TF_CATEGORY_SET_ID, HOUSEHOLD_SIZE_ID FROM EXPSR_CHNL_HHOLD_SIZE_TEMP A WHERE rowid > (SELECT min(rowid) FROM EXPSR_CHNL_HHOLD_SIZE_TEMP B WHERE A.BUY_GROUP_ID = B.BUY_GROUP_ID AND A.EXPOSURE_ID = B.EXPOSURE_ID AND A.TF_CATEGORY_SET_ID = B.TF_CATEGORY_SET_ID AND A.HOUSEHOLD_SIZE_ID = B.HOUSEHOLD_SIZE_ID);

Sphere: Related Content

running ftp target in ant

add commons-net-1.4.1.jar and jakarta-oro-2.0.8.jar in your ant lib and use ftp task

Sphere: Related Content