Translate

Tuesday, 18 April 2017

download file from SFTP using WinSCP with batch file(SSIS using process task )

For download
-------------------
option batch on
 option confirm off
 open sftp://UserName:Password@SFTPName:portnumber/ -hostkey="winscphostKey"
 get  SFTPFILEnamewithextension
 close
 exit


For remove file from SFTP
-------------------
option batch on
 option confirm off
 open sftp://UserName:Password@SFTPName:portnumber/ -hostkey="winscphostKey"
 rm  SFTPFILEnamewithextension
 close
 exit



For rename  file from SFTP
-------------------
option batch on
 option confirm off
 open sftp://UserName:Password@SFTPName:portnumber/ -hostkey="winscphostKey"
 mv  oldNamefromSFTPfile userNewname
 close
 exit

MySQL get database table create table in query format

 SHOW CREATE TABLE `Yourtablename`;COMMIT;
example :
I have a table in MySQL ie FredtoMySQL_execution_log and I want to see the definition ie below code

 SHOW CREATE TABLE `FredtoMySQL_execution_log`;COMMIT;

MySQL rename table

 RENAME TABLE ssis_execution_log TO SQLtoMYSQL_execution_log;COMMIT;

Thursday, 13 April 2017

what is .NET Framework ?

.NET Framework is set of tools, libraries, languages to build Desktop, Console , Web , Mobile ,IOS  applications and run time required to run those applications.

The full Form of .NET is Network Enabled Technologies.
 Or Distributed oriented Technologies






Wednesday, 22 March 2017

mysql get current process

SELECT* FROM INFORMATION_SCHEMA.PROCESSLIST;
#or
SHOW FULL PROCESSLIST;
#after that kill the id by this query;
KILL 6718;COMMIT;

Monday, 20 February 2017

retrieve the view definition from a SQL Server using query

select definition
from sys.objects     o
join sys.sql_modules m on m.object_id = o.object_id
where o.object_id = object_id( 'dbo.vw_demo')
  and o.type      = 'V'

Wednesday, 15 February 2017

Serial no in sql query

select  ROW_NUMBER() OVER (ORDER BY customer_id) AS 'SL No',   * from MstCustomer