ilker_arslan ilker_arslan - 4 days ago 5
R Question

Read a sql backup file to R

I have a very large sql backup file (~ 22 gb). Does anyone know how can I read it from R?

Answer

(Assuming you are using SQL Server here. But if it is a backup of another database, the same option is probably available).

The best solution is probably:

  1. Restore the backup file into a (new) Database. This is pretty simple to do: this question covers it (for SQL Server 2008). You can also get the free SQL Server Express if you don't own a version of SQL Server.

  2. Connect to the database using RODBC. There is a quick start example here.

Note: there are some proprietary tools that read SQL server backup files directly (also mentioned in the first link above). But if you want to work with the data in R, being able to access it through the standard RODBC interface will be much more convenient.

Comments