Monday, October 21, 2013

All time favt.

होशवालों को खबर क्या बेखुदी क्या चीज हैं
इश्क कीजिये फिर समझिये, जिन्दगी क्या चीज हैं

उनसे नज़रे क्या मिली, रोशन फिजायें हो गयी
आज जाना प्यार की जादूगरी क्या चीज हैं

खुलती जुल्फों ने सिखाई, मौसमो को शायरी
झुकती आँखों ने बताया, मयकशी क्या चीज हैं

हम नजर से कह ना पाए, उन से हाल-ए-दिल कभी
और वो समझे नहीं, ये खामोशी क्या चीज हैं

इतना ना मुझ से तू प्यार बढ़ा, के मैं एक बादल आवारा
कैसे किसी का सहारा बनू, मैं खुद बेघर बेचारा
इसलिए तुझ से मैं प्यार करू, के तू एक बादल आवारा
जनम जनम से हूँ साथ तेरे, हैं नाम मेरा जल की धारा

मुझे एक जगह आराम नहीं, रुक जाना मेरा काम नहीं
मेरा साथ कहा तक दोगी तुम मैं देस बिदेस का बंजारा

ओ नील गगन के दीवाने, तू प्यार ना मेरा पहचाने
मैं तब तक साथ चलू तेरे, जब तक ना कहे तू मैं हारा

क्यों प्यार में तू नादान बने, एक पागल का अरमान बने
अब लौट के जाना मुश्किल हैं, मैने छोड़ दिया हैं जग सारा

Friday, October 18, 2013

Mysql query for save output in excel sheet

<?php
error_reporting(0);
$hostname='localhost'; 
$user='root';
$pass='';
$dbase='database_name';
$connection = mysql_connect("$hostname" , "$user" , "$pass"); 
$db=mysql_select_db($dbase , $connection);

$filename="filename_".date('d-m-Y')."_info.csv";
$date= date("Y-m-d");
$yesterday = date('Y-m-d', strtotime($date. " - 1 day"));

$qry= "SELECT 'field1','field12',DATE_FORMAT(in_date,'%d-%m-%Y')
as in_date,TIME_FORMAT(in_time,'%H:%i'),DATE_FORMAT(out_date,'%d-%m-%Y') 
as out_date,TIME_FORMAT(out_time,'%H:%i'),shift,remark 
FROM tablename where in_date='$yesterday'
INTO OUTFILE 'c:/foldername/$filename' FIELDS TERMINATED BY ','
ESCAPED BY '''' LINES TERMINATED BY '\n'";


$result = mysql_query($qry,$connection);
if (!$result) {
    die('Invalid query: ' . mysql_error());
}else
echo "Please check file in c:/foldername/$filename";
?>

Monday, October 14, 2013

Start WAMP server and run index file through batch file


Create wamp.bat file and copy following code in it.
this code at localhost will start wamp apache server on specific time as per you schedule it. 
and run this specific file, here index.php file run automatically for the specific purpose , as per your 
requirement.



 
start C:\wamp\wampmanager.exe
start C:\wamp\bin\php\php5.3.13\php.exe -f  C:\wamp\www\index.php

Connect FTP through Batch file and transfer file


Create copy.bat file and copy following code
this code will connect ftp server with its user name and password
this code transfer the local files on to the FTP server, Note this batch file need to scheduled on
windows schedule task to run this specific task


 
@ftp -i -s:"%~f0"&GOTO:EOF

open 210.212.176.115

FTP-Username 

FTP-Password

lcd c:\WEIGHBRIDGE

binary

mput "*.*"

::!move c:\chpdata\data\*.* c:\chpdata\backupdata\

disconnect

bye



pause

Wednesday, October 9, 2013

How to get MAC Address by using PHP

How to get MAC Address by using PHP

 

<?php

$rmIp = rtrim($_SERVER['REMOTE_ADDR']);
$location = rtrim(`arp -a $rmIp`);
//print_r($location);
$location = preg_replace('/\s+/', 's', $location);
$location = split('\s',$location);
$mac="";
$num=count($location);
//var_dump($location);
echo $mac=strtoupper($location[16]);

?>

Scheduling Oracle database backup through Batch file

As per day to day business transactions  saved in a database (Here ref is oracle) . The database
backup in large/small organization is prime importance, follows example depicts how to take backup in routine by using batch file scheduling in windows environment.


Syntax:
EXP userid=`userid/password@sid owner=`schemaowner`
File=`path with filename.dmp `
log=`logfile path with dmp`

Here User ID might be SYSTEM,MANAGER with its password
-sid means  The Oracle System ID (SID) is used to uniquely identify a particular database on a system.


Exporting the Whole schema

Save this 4 lines of code and name the file BUP_NEW_BACKUP.bat

EXP  USERID=SYSTEM/yourpassword@G_PPMS
FILE=D:\backup.dmp OWNER=TRUSTGA(User Name)
LOG=D:\backup.LOG
COPY D:\backup.DMP  \\compname\backup

After saving this file, need to schedule a task in windows environment

To open Scheduled Tasks, click Start, click All Programs, point to Accessories, point to System Tools, and then click Scheduled Tasks.

To schedule a new task:
  1. Double-click Add Scheduled Task to start the Scheduled Task Wizard, and then click Next in the first dialog box.
  2. The next dialog box displays a list of programs that are installed on your computer, either as part of the Windows XP operating system, or as a result of software installation.

    Use one of the following procedures:
    • If the program that you want to run is listed, click the program, and then click Next.
    • If you want to run a program, script, or document that is not listed, click Browse, click the folder and file that you want to schedule, and then click Open.
  3. Type a name for the task, and then choose one of the following options:
    • Daily
    • Weekly
    • Monthly
    • One time only
    • When my computer starts (before a user logs on)
    • When I log on (only after the current user logs on)
  4. Click Next, specify the information about the day and time to run the task, and then click Next.

    Note that the information about the day and time to run the task vary depending on the selection that you made in the previous wizard dialog box. For example, if you chose Weekly, you must indicate the day of the week, the time, and if the task should run every week, every 2 weeks, every 3 weeks, and so on.
  5. Type the name and password of the user who is associated with this task. Make sure that you choose a user with sufficient permissions to run the program. By default, the wizard selects the name of the user who is currently logged on.
  6. Click Next, and then click Finish after you verify the choices that you have made.

 That it! your database backup regularly saved at specified
 location what you write in batch file. Just track that file
 in a daliy basis means rename it manully and check .dmp
 file size for ensuring backup is going right way.
 

Tuesday, October 8, 2013

System Requirements for Implementation of ERP

System Requirements

The minimum system requirements to install SAP ERP
should be known before you decide to install it. Some
minimum hardware and software requirements are
essential and must be looked into so as to install SAP ERP.
Since SAP is client server architecture software, the
application would be running on the server and the
clients would be connected to this server. A user interface
has to be installed at the user’s end which may be a
desktop, laptop or some other device. The number of
clients running on the server will decide the capacity of
the server.

Sizing
A sizing is an approximation of the hardware resources
required to support a specific software implementation.
Several resources are available to assist with sizing.
Solution Sizing Sheets are available to help you effectively
respond to customer requests for ballpark sizing
information. Sizing questionnaires are available to help
you gather customer requirements.
Sizing application systems is an iterative process.
Preliminary sizing’s, based on limited information, may
be rough estimates. As more information about the
implementation becomes available, the sizing estimates
can provide a better understanding of hardware
requirements.

Many hardware vendors provide sizing questionnaires.
Some of the tips to use these questionnaires are given
below:

• For user-based sizing inputs, enter the number of
concurrent, active users. Do NOT enter the number of
licensed users, do NOT double count users (if some of
your users work with several different components


attribute them to the component with which they work
most of the time). IBM uses the following guideline,
@35% of licensed users are concurrent active users. For
example if 1,000 user licenses have been purchased there
are 350 concurrent, active users.

• Read and understand the user definitions for the
different components. For ERP and CRM users, expect
most of the users to be low or medium workload users.
The guideline is that 10-20% of ERP or CRM users will be
high workload users. When in doubt, assume users to be
medium workload users.

BW user definitions are different than the user definitions
for ERP and CRM. SAP guidelines are; @70% of the users
are Info-consumer users, @25-27% is Executive users and
@3-5% or less are Power users.

Portal SAP’s default think time for Portal users is 211
seconds (In a previous version of the Net Weaver Portal
Sizing, the Quick Sizer assumed a distribution of 60%
concurrent active users with a think time of roughly 600
seconds between two Portal navigation steps, 34% with
about 180 seconds think time and 6% with a think time of
30 seconds. These results in an average think time of 211
seconds, which is quite realistic for an Intranet scenario
(NW-EP-INT). Think times of less than 60 seconds or less
will result in large workload estimates.

• Throughput based inputs – Specify the average
number of line items per transaction. For example if
during peak processing you need to process 10,000 sales
orders each with an average of 6 line items, specify “6”
and not 60,000. Also use whole numbers (round up or
down, the tool will not accept “6.5” line items).
• Keep in mind that there are many inputs which
require in-depth knowledge of the application and will
require that you work with a functional consultant to
determine the inputs (e.g. SCM, Utilities, BW Infocubes
and Datastore objects).
It is important to understand that “sizing” the hardware
for each customer’s ERP Software applications
implementation is an iterative process, which may be



refined and repeated a number of times. If you are in the
early stages of planning, you will probably have limited
information about your planned environment. In this
case, we can complete the sizing estimate with general
information about your ERP Software applications users.
When you are further along in your implementation
planning, you will know more about ERP Software
applications, the modules you plan to use, the number of
users and your potential transaction activity. At that
time, you may request another sizing estimate based on
more detailed information. In any case, after receiving the
results of a sizing estimate, you may choose to revise your
input and request a re-sizing.

it cannot generalize the software and hardware
requirements for any ERP Implementation as the
requirements differ from one implementation to other.

International Journal of Scientific & Engineering Research Volume 2, Issue 7, July-2011