Splunk Search

SQL table is log data and I want to export it into a text file???Help....

kleeterps
Explorer

Anybody have any suggestions on how to export a SQL table which are full of logs to export it into a text file so that we can import it into splunk???

Tags (1)

Ron_Naken
Splunk Employee
Splunk Employee

If this is for a one-time export of data, the newer versions of Microsoft SQL have SQL Server Integration Services (SSIS). SSIS provides a very simplified Export wizard that should accomplish your goal.

Here's a walkthrough that depicts how to export tables to flat files:
http://www.databasejournal.com/features/mssql/article.php/3580216/SQL-Server-2005-Import--Export-Wiz...

gkanapathy
Splunk Employee
Splunk Employee

With Microsoft SQL, you can use many mechanisms:

  • Via Microsoft Excel, connecting using and ADO or ODBC connector. You would add the table as an external data source, load/import it, then save/export it.
  • Write your own code. Most programming environments on Windows have easy ways to connect to a database, issue a query, and iterate over and output the resulting values in many ways.
  • Use the MSSQL Server DTS (Data Transformation Services) tools, which can be accessed via the MSSQL MMC Console. This allows you to use a wizard to specify the source data and the target.

Note that the above are effective and easy for a one-time dump and export of data, but not for monitoring and real-time indexing of live database insertions.

kleeterps
Explorer

It's MSSQL, there couple caveats like not adding any duplicates...the question is how to export the logs from MSSQL table into text file so we can import into splunk...

0 Karma

southeringtonp
Motivator
0 Karma

kleeterps
Explorer

thanks, I will look into it...

0 Karma

ftk
Motivator

What kind of SQL database are you talking about?

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

What Is Splunk? Here’s What You Can Do with Splunk

Hey Splunk Community, we know you know Splunk. You likely leverage its unparalleled ability to ingest, index, ...

Level Up Your .conf25: Splunk Arcade Comes to Boston

With .conf25 right around the corner in Boston, there’s a lot to look forward to — inspiring keynotes, ...

Manual Instrumentation with Splunk Observability Cloud: How to Instrument Frontend ...

Although it might seem daunting, as we’ve seen in this series, manual instrumentation can be straightforward ...