Friday, February 18, 2011

How to find a file by name in UNIX/Solaris/Linux OS

Find a file by name in UNIX/Solaris/Linux

  • To find a file such as filename.txt anywhere on the system:

find / -name filename.txt -print

  • Recent operating system versions do not require the print option because this is the default. To limit the search to a specific directory such as /usr:

find /usr -name filename.txt -print

I hope this helps you to find a file in unix/linux/solaris system. Leave a comment plz :)

Monday, February 7, 2011

Error Handling in BTEQ Teradata?

Error Handling in BTEQ Teradata?

BTEQ Return Codes:
Bteq return codes are the two digit values that BTEQ returns to the client operating system as a result of any error code occured in BTEQ session. Possible BTEQ return codes are as given below

Return Code Description
00 Job completed with no errors.
02 User alert to log on to the Teradata Database.
04 Warning error.
08 User error.
12 Severe internal error

The return code is decided by the Error messages that BTEQ receives from the Teradata database. Different Teradata database error codes are assigned a specific return code value.
The below table will give what different return codes are returned by BTEQ for different Error codes it receives from Teradata database.

For an Example : If you issue a SQL statement in BTEQ session to create a table which is alrady there, then Teradata database will return an error code of 3803 to the BTEQ session and in turn in BTEQ will send a return code of 04 to the client operating system where you have intiated the BTEQ session.

Return Code = 04 ( BTEQ returns a return code of 04 for the following Teradata error codes )
2580 - Mload not active on table %TVMID.
2667 - Statistics cannot be collected on an empty table. 
3534 - Index already exists.
3666 - This view has too many columns to store or retrieve comments.
3737 - Name is longer than 30 characters.
3747- No start-up string defined for this user.
3803 - Table “%VSTR” already exists.
3804 - View “%VSTR” already exists.
3805 - Macro “%VSTR” already exists.

A Sample Code Part Using BTEQ Conditional Logic:

The Bank offers a number of special services to its Million-Dollar customers.
-------------------------------------------------------------
DELETE FROM Million_Dollar_Customer ALL;
.IF ERRORCODE = 0 THEN .GOTO TableOK
CREATE TABLE Million_Dollar_Customer
(Account_Number INTEGER
,Customer_Last_Name VARCHAR(20)
,Customer_First_Name VARCHAR(15)
,Balance_Current DECIMAL(9,2));
.LABEL TableOK
INSERT INTO Million_Dollar_Customer
SELECT A.Account_Number
,C.Last_Name
,C.First_Name
,A.Balance_Current
FROM Accounts A INNER JOIN
Account_Customer AC INNER JOIN
Customer C
ON C.Customer_Number = AC.Customer_Number
ON A.Account_Number = AC.Account_Number
WHERE A.Balance_Current GT 1000000;
.IF ACTIVITYCOUNT > 0 THEN .GOTO Continue
.QUIT
.LABEL Continue
------------------------------------------------------------

What it does???

- DELETE all rows from the Million_Dollar_Customer table.
- IF this results in an error (non-zero), THEN create the table, ELSE attempt to populate using INSERT/SELECT.
- IF some rows are inserted (ACTIVITYCOUNT>0) THEN arrange services, ELSE terminate the job.

How to Remove and Hide Blogger NavBar (Top Navigation Bar)

How to Remove and Hide Blogger NavBar (Top Navigation Bar)

 

  1. Under the Layout tab, click on Edit HTML tab to view the template’s HTML code.
  2. hide blogger navbar
  3. Search for the following line of code:

 

]]>

Before the line, add in the following line of code:

#navbar { display: none; }

or:

#navbar-iframe { display: none !important; }

Click on SAVE TEMPLATE to make the change effective

Sunday, February 6, 2011

Create Separate Profiles in Google Chrome for Family Members

 

HOW TO CREATE SEPARATE PROFILES FOR MULTIPLE USERS IN CHROME AND ENJOY BROWSING  

 

Step 1: Open your Google Chrome installation folder that is available at:

For Windows Vista - C:\Users\<username>\AppData\Local\Google\Chrome
For Windows XP - C:\Documents and Settings\<user>\Local
Settings\Application Data\Google\Chrome

Step 2: Open Windows Explorer and switch to the "User Data" folder available inside Chrome installation folder.

Then select the subfolder caleld "default" and make a copy of it in the "User Data" folder itself. Give that copy a name, say, Your_Name. (See screenshot).

chrome-profile

 

Step 3: (Optional): We will now initialize this new "Your_Name" profile to the factory default settings.

Open "Command Prompt", switch to the Chrome Application folder and run the following command:

chrome.exe --user-data-dir="..\User Data\Your_Name" -first-run

Step 4: So our new user profile is ready. To run Google Chrome using this profile instead of the default profile, just create a shortcut on your desktop, Quick launch bar or your Windows Start Menu.

 

Right click anywhere on the desktop, choose New -> Shortcut and type the following for location:

For Windows Vista: C:\Users\username\AppData\Local\Google\Chrome\Application\chrome.exe  --user-data-dir="..\User Data\Your_Name"

For Windows XP: C:\Documents and Settings\User\Local Settings\Application Data\Google\Chrome\Application\chrome.exe --user-data-dir="..\User Data\Your_Name"

chrome-icons

 

Tuesday, January 25, 2011

Top best Google Chrome extensions


Top best Google Chrome extensions

LastPass Chrome Extension: LastPass is a password manager and form filler that helps you manage all of your site access information.  All data is stored locally so that not even LastPass has access to it. LastPass is a free online password manager and Form Filler that makes your web browsing easier and more secure.

lastpass chrome extension img

 

 

AVIARY SCREEN CAPTURE Take a screenshot of any webpage (any area you want) and edit it directly in your browser with aviary.com applications. Plus convenient access to the Aviary website and tools. This quick screen capture addon is a must-have for bloggers and designers alike!

Aviary image tools chrome extension

 

 

SCRIBEFIRE A full-featured blog editor lets you easily post to all of your blogs. One of the most popular add-ons for Firefox is now available for Chrome! ScribeFire is a full-featured blog editor that integrates with your browser and lets you easily post to all of your blogs. You can post to blogs from Wordpress, Blogger, TypePad, Windows Live Spaces, Tumblr, Posterous, Xanga, LiveJournal, or any other blog that supports the MetaWeblog or MovableType APIs. You can edit and update existing posts. You can schedule posts for the future (if your blog allows that). You can delete posts. You can save drafts. You can tag and categorize. YOU CAN DO WAHTEVER YOU WANT. ITS AMAZING AND IM SIMPLY LOVING IT :-)

BTW I AM USING THE SAME WHILE WRITING THIS POST :-) BELOW IS THE SCREENSHOT FOR YOU.


SCRIBEFIRE CHROME EXTENSION IMG

Awesome Screenshot: Capture & Annotate 

Capture the whole page or any portion, annotate it with rectangles, circles, arrows, lines and text, blur sensitive info, one-click upload to share. Support PNG and shortcuts.

ITS AMAZING AND IM SIMPLY LOVING IT :-)

awesome chrome extension img


 Proxy Switchy!  Manage and switch between multiple proxies quickly and easily. Very very useful if you have to work on multiple places with multiple proxies.

proxy switchy Google chrome extension

 

FastestChrome - Browse Faster Saves time and enhance your productivity! Get quick definitions, auto-load next pages, search faster, and more.

The most cool feature i love is  "Pages automatically loads the next page just before you reach the end so you don't have to click "Next" or wait"
fastestchrome chrome extension


Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | fantastic sams coupons