Search through text columns in a database.
Install via Chocolatey:
choco install sqlgrep
For other options, including for Linux, see the Download section.
# 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
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 the latest Windows version here, no installation required:
Don't trust random executables from the internet? Build it yourself.
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
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