Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Readline for NuoManager

DZone's Guide to

Readline for NuoManager

· Database Zone
Free Resource

Whether you work in SQL Server Management Studio or Visual Studio, Redgate tools integrate with your existing infrastructure, enabling you to align DevOps for your applications with DevOps for your SQL Server databases. Discover true Database DevOps, brought to you in partnership with Redgate.

You may already be familiar with a tool called rlwrap. If you aren't, you should check it out. It's a nifty tool. On Unix-like systems, it provides readline functionality for commands that lack it. 

Our nuodbmgr is one such command. If you spend any time managing NuoDB domains in an ad-hoc fashion and you're a fan of the command-line, then you can make your life a little easier and save yourself some keystrokes. First, installrlwrap either with your distribution's package manager, or from the source available at the above link. Next, create a file containing a completion word list:

~/.manager-completions
administrator allowNonDurable apply archive capture categories config create database databases dbFile dbname domain echo graceful help host hostname hosts initialize license licenseFile log manage memory monitor name newHost options password pid process processes property quiesce remove restart set show shutdown sm start status summary targetVersion te trace unquiesce unset user value verify version

Feel free to edit this file however you like, for example, by adding your domain or database name to the list. Now, when you invoke the NuoDB Manager, prefix the command with rlwrap:

rlwrap -r -f ~/.manager-completions nuodbmgr --user domain --password mySecret --broker localhost

The -f option will pre-fill the in-memory completion word list with the words in the supplied file. The -r flag will cause any words that appear as input or output during your nuodbmgr session to be added to the in-memory list for use during that session. One caveat to note is that rlwrap is not context sensitive, so it's perfectly happy to suggest localhost as a NuoDB Manager command (which it is not). Happy hacking!

It’s easier than you think to extend DevOps practices to SQL Server with Redgate tools. Discover how to introduce true Database DevOps, brought to you in partnership with Redgate

Topics:

Published at DZone with permission of Seth Proctor, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}