Usage:
cleartool lsprivate -tag TAG_NAME -long > c:\viewspec\Private_APBAU_20110708.log
c:\viewspec\Private_APBAU_20110708.log => logpath.
Enjoy.
2014/04/15
How to use BCP in & out? (BCP)
To bcp out (get data from DB), please use the below command.
Explanation
GTDMAST1..DISCREPANCY_CD_DTL -> where you want to get the data from
DISCREPANCY_CD_DTL-> the name of the file where you want it to output to
SGTSCOR_UAT510-> server name
UU649121-> username
Pabc123 -> password
-c -t'~^' -r'AAAAABBBBBCCCCC' -b500-> this is the part to separate the data
Command (OUT):
bcp GTDMAST1..DISCREPANCY_CD_DTL out DISCREPANCY_CD_DTL -SGTSCOR_UAT510 -UU649121 -Pabc123 -c -t'~^' -r'AAAAABBBBBCCCCC' -b500
Explanation
tempdb..DISCREPANCY_CD_DTL -> where you want the data to insert into
DISCREPANCY_CD_DTL -> the source file
SGTSCOR_DEV510 -> the db server
Usa1 -> username
Pabcd7890 -> passowrd
-c -t'~^' -r'AAAAABBBBBCCCCC' -b500 -> this is the separator and has to be the same with the output command.
Command (IN):
bcp tempdb..DISCREPANCY_CD_DTL in DISCREPANCY_CD_DTL -SGTSCOR_DEV510 -Usa1 -Pabcd7890 -c -t'~^' -r'AAAAABBBBBCCCCC' -b500
Explanation
GTDMAST1..DISCREPANCY_CD_DTL -> where you want to get the data from
DISCREPANCY_CD_DTL-> the name of the file where you want it to output to
SGTSCOR_UAT510-> server name
UU649121-> username
Pabc123 -> password
-c -t'~^' -r'AAAAABBBBBCCCCC' -b500-> this is the part to separate the data
Command (OUT):
bcp GTDMAST1..DISCREPANCY_CD_DTL out DISCREPANCY_CD_DTL -SGTSCOR_UAT510 -UU649121 -Pabc123 -c -t'~^' -r'AAAAABBBBBCCCCC' -b500
Explanation
tempdb..DISCREPANCY_CD_DTL -> where you want the data to insert into
DISCREPANCY_CD_DTL -> the source file
SGTSCOR_DEV510 -> the db server
Usa1 -> username
Pabcd7890 -> passowrd
-c -t'~^' -r'AAAAABBBBBCCCCC' -b500 -> this is the separator and has to be the same with the output command.
Command (IN):
bcp tempdb..DISCREPANCY_CD_DTL in DISCREPANCY_CD_DTL -SGTSCOR_DEV510 -Usa1 -Pabcd7890 -c -t'~^' -r'AAAAABBBBBCCCCC' -b500
How to look up file in UNIX? (UNIX)
If you know the file name, the below command will help you to find out a file.
Please notice that the "." means look through everything in the location where you are.
find . -type f -print | grep 'actionfile_inq.xml'
Enjoy.
Please notice that the "." means look through everything in the location where you are.
find . -type f -print | grep 'actionfile_inq.xml'
Enjoy.
How to look up a file in a directory? (UNIX)
In the below example:
CCY_EMU_EXT = filename (it will look up files CCY_EMU_EXT and more CCY_EMU_EXTx, where x can be anything with unlimited number of characters)
After the ">" symbol is the path where you want the result to print it to. CCY_EMU_EXT_1.log is the result file.
find /gtsallsrv/gts/ -name "*" | xargs grep -l CCY_EMU_EXT > /var/tmp/v439333/CCY_EMU_EXT_1.log &
CCY_EMU_EXT = filename (it will look up files CCY_EMU_EXT and more CCY_EMU_EXTx, where x can be anything with unlimited number of characters)
After the ">" symbol is the path where you want the result to print it to. CCY_EMU_EXT_1.log is the result file.
find /gtsallsrv/gts/ -name "*" | xargs grep -l CCY_EMU_EXT > /var/tmp/v439333/CCY_EMU_EXT_1.log &
How do you look up a process in UNIX? (UNIX)
How do you grep a process? And what is grep? grep is actually a function to "grab" the process of a specific name in unix. It helps you to identify which process is actually running on background.
/usr/ucb/ps -auxww | grep -i qm | grep -i GTSD25QM
-i = ignore letter case
Enjoy.
/usr/ucb/ps -auxww | grep -i qm | grep -i GTSD25QM
-i = ignore letter case
Enjoy.
What is sp_lock & sp_who (SQL)
sp_lock (Reports information about processes that currently hold locks.)
sp_who (Run sp_who to get the spid of the locking process.)
sp_who (Run sp_who to get the spid of the locking process.)
Subscribe to:
Posts (Atom)