If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Which editor is good for scripts (sql,shell,bat) ?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-13-11, 08:46
DBFinder DBFinder is offline
Registered User
 
Join Date: Sep 2008
Location: Toronto,Canada
Posts: 606
Which editor is good for scripts (sql,shell,bat) ?

Hello All,

I have been using Crimson Editor for years. It provides good functions.

Now I think if I can find some editor which can edit remote files. Crimson does, but it requires FTP connections.

And these days FTP previliges has to be requested explicitly. Usually SSH connection is everywhere which is not supported by crimson.


Can some one suggest me some simple programmers' editor that supports remote editing through SSH connection ??


My laptop is having windows 7 and the target system is AIX 5.3 with DB2 9.1.


Regards
DBFinder
Reply With Quote
  #2 (permalink)  
Old 10-13-11, 11:48
nvk@vhv nvk@vhv is offline
Registered User
 
Join Date: Jan 2010
Posts: 294
Hi,

UltraEdit (UltraEdit Text Editor | UltraCompare file compare | UEStudio | UltraSentry) can use sftp. But i don't use it, so i don't know how well it works. My remote editing is ssh + vi.

Cheers
nvk
Reply With Quote
  #3 (permalink)  
Old 10-13-11, 20:34
DBFinder DBFinder is offline
Registered User
 
Join Date: Sep 2008
Location: Toronto,Canada
Posts: 606
Great nvk !!

UltraEdit makes sense. Worth the price.

I am grateful to you for the info.

Regards
DBFinder
Reply With Quote
  #4 (permalink)  
Old 10-13-11, 20:43
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
WinSCP is free, but the default editor it uses is fairly basic (although you may be able to invoke other editors, not sure). One nice thing is that it can import all your putty connections into WinSCP without having to manually create them.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #5 (permalink)  
Old 10-13-11, 21:02
DBFinder DBFinder is offline
Registered User
 
Join Date: Sep 2008
Location: Toronto,Canada
Posts: 606
Oh Yeah, I had forgotten that.

I was already using WinSCP till now. Now I am using UltraEdit.

My editor ( crimson ) is simple best ; but WinSCP fails to detect that I had closed the file after completing the change. WinSCP wants me to close the editor to signal my completion of editing.

However still, WinSCP is better than many.

Thanks
DBFinder
Reply With Quote
  #6 (permalink)  
Old 10-14-11, 01:18
dr_te_z dr_te_z is offline
Registered User
 
Join Date: Jan 2009
Location: Zoetermeer, Holland
Posts: 555
Take a look at this: MobaXterm - The free multitab Unix browser for Windows
and you'll find yourself NOT using PuTTy anymore. NOT using winSCP anymore and continue to use your own favorite editor for local & (unix)remote files.
Back on topic: my favourite editor (besides ISPF ) is Notepad++ Home
Reply With Quote
  #7 (permalink)  
Old 10-14-11, 02:44
DBFinder DBFinder is offline
Registered User
 
Join Date: Sep 2008
Location: Toronto,Canada
Posts: 606
Thanks,

MobaXterm seems promissing. I will keep trying it. I seems cygwin based.

I still have to explore the editor interface. My goal is to have common editor for both platforms.

Good thing !

Regards
DBFinder
Reply With Quote
  #8 (permalink)  
Old 10-14-11, 04:07
dr_te_z dr_te_z is offline
Registered User
 
Join Date: Jan 2009
Location: Zoetermeer, Holland
Posts: 555
What is this? You should be asleep right now.
Anyhow, did you already notice how easy the X part works? Just "ssh -X -Y -l db2inst1" to your aix/linux based databaseserver and type "db2cc" and tadaa!
Reply With Quote
  #9 (permalink)  
Old 10-14-11, 04:12
DBFinder DBFinder is offline
Registered User
 
Join Date: Sep 2008
Location: Toronto,Canada
Posts: 606
Yes, I should be asleep now; fast asleep.

Well as you said X part is a breeze. I need midnight commander. I will see this in a day or two.

Quick ques : How can I grant SELECT to a new user on all database tables in one shot.
Like assign a role so that I do not have to re-do for each new table ??


Thanks

DBFinder
Reply With Quote
  #10 (permalink)  
Old 10-14-11, 08:20
db2girl db2girl is offline
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,816
What's wrong with using putty + vi/vim for AIX files?
Reply With Quote
  #11 (permalink)  
Old 10-14-11, 10:24
DB_N00b DB_N00b is offline
Registered User
 
Join Date: Jan 2010
Posts: 152
WinSCP und VI! :-)
Reply With Quote
  #12 (permalink)  
Old 10-14-11, 10:26
DBFinder DBFinder is offline
Registered User
 
Join Date: Sep 2008
Location: Toronto,Canada
Posts: 606
Hey Bella,

I was wondering where were you.

Actually, nothing wrong with it. Infact this combination is great. My friend "ROCKY" really rocks with this !!

I have been coding with ME ( microsoft editor ) in olden (1992) days.
In short I have seen may editors and they all have some kind of uniqueness.
For past few years I was using crimson.
Today I am using UltraEdit.
My current assignment requires that I connect to multiple dev machines to complete a monitoring script and I feel with UltraEdit I am 10% faster.

A matter suitability. Or you can say personal choice.

Reagrds
Reply With Quote
  #13 (permalink)  
Old 10-14-11, 10:29
DBFinder DBFinder is offline
Registered User
 
Join Date: Sep 2008
Location: Toronto,Canada
Posts: 606
Quote:
Originally Posted by DB_N00b View Post
WinSCP und VI! :-)
WinSCP and VI is good definitely ; but as I believe currently using UltrEdit I am faster in current setup.

Thanks for your input.

Regards
Reply With Quote
  #14 (permalink)  
Old 02-01-12, 09:39
dr_te_z dr_te_z is offline
Registered User
 
Join Date: Jan 2009
Location: Zoetermeer, Holland
Posts: 555
Have been playing/experimenting with mobaXterm (v4.2 already there). I found a way to access db2 using this shell instead of the db2cmd box.
I created a script in the home dir called prepareDB2.sh
Code:
export PATH=${PATH}:~/drives/c/ibm/sqllib/bin/
export DB2INSTANCE=db2
export DB2CLP=**$$**
db2set db2dbdft=sample
This script must be executed like this (after chmod +x prepareDB2.sh)
Code:
. ./prepareDB2.sh
and then you can type
Code:
db2 "select * from employee"
Because I am bound to use the "db2set db2dbdft=sample" option the functionaly is limited to databases which you can access without specifying your userid/passwd. But the result so far is nice

(when I try ". db2 connect to sample" (notice the 'dot space' preceding the db2 command) to prevent the subshell issue I get a strange error: bash: $'MZ\220': command not found. (almost the same as the motorcycle I used to drive many years ago (motorencyclopedie****/motorencyclopedie/mz-ts250-1/ts250-1) I know: ugly bike but that was the only thing I could afford back then))

Can somebody smarted than me help to figure this out?

Last edited by dr_te_z; 02-02-12 at 01:36. Reason: cannot get the url right. There should be dot nl there
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On