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;
CREATE TABLE Million_Dollar_Customer
(Account_Number INTEGER
,Customer_Last_Name VARCHAR(20)
,Customer_First_Name VARCHAR(15)
,Balance_Current DECIMAL(9,2));
INSERT INTO Million_Dollar_Customer
SELECT A.Account_Number
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;
.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; }


#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




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).



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"



Twitter Delicious Facebook Digg Stumbleupon Favorites More

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