nzbart / sqlgrep

Search (grep) through text columns in a SQL Server database.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Status Chocolatey GitHub release GitHub commits (since latest release)

sqlgrep

Search through text columns in a database.

Installation

Install via Chocolatey:

choco install sqlgrep

For other options, including for Linux, see the Download section.

Usage

# search for needle in haystack database on localhost using trusted authentication
./sqlgrep haystack_database needle

# search for needle in haystack database on the specified server using trusted authentication
./sqlgrep haystack_database needle -s server

# search for needle in haystack database on localhost using username and password
./sqlgrep haystack_database needle -u user -p pass

# see all options
./sqlgrep --help

Features and limitations

These limitations are currently in place, but it would be great if they could be removed:

  • Only tested against SQL Server.
  • Only supports a basic substring search.
  • Does not output results in an easily machine parseable format, such as XML or JSON.

There are no plans to make a GUI, since there are already some nice GUI tools available with search features, such as HeidiSQL.

Download

Download the latest Windows version here, no installation required:

Don't trust random executables from the internet? Build it yourself.

Building on Windows

You will need Visual Studio with C++ installed. Then run:

git clone https://github.com/nzbart/sqlgrep.git
msbuild sqlgrep/sqlgrep.sln /p:Configuration=Release
sqlgrep/x64/Release/sqlgrep --help

Building on Linux

The instructions below work for Debian 9, but can be adapted for other variants:

sudo apt install unixodbc-dev
git clone https://github.com/nzbart/sqlgrep.git
cd sqlgrep
./LinuxBuild.sh

About

Search (grep) through text columns in a SQL Server database.

License:GNU General Public License v3.0


Languages

Language:C++ 82.3%Language:CMake 11.0%Language:Ada 3.5%Language:Shell 1.2%Language:HTML 0.9%Language:C 0.7%Language:PowerShell 0.2%Language:Batchfile 0.1%Language:Ruby 0.1%Language:CSS 0.0%Language:PLpgSQL 0.0%