Importing data into SqlServer from Excel

Excel spreadsheets can be imported into SQL server in various ways. The simple and quickest methods are with using Linked Servers and Distributed queries. The difference is how the connection is used. Linked servers uses a persistent configured connection where as Distributed queries uses a dynamic connection. Linked servers are not suitable when we want to import more than one document. For every document there a linked connection should be configured(painful).

You can configure Linked connection through Server Objects->Linked Servers-> New Linked Connection (See below image) from the Management studio object explorer. Use select statement with OPENQUERY to read excel data. Read more

LinQ to SQL or Entity Framework ?

A common question arises when working with .Net 3.5 data models.

A nice article explaining differences between LinQ to SQL and Entity Framework is at party libraries are available for supporting other databases(like LinQtoOracle etc..).

b) Entity Framework is an ORM DB and is based on application-oriented data model. Its a loosely coupled and may differs from existing DB schema. It represents many:many relations(flexible mapping) and provides different layers to your DB.  Entity Framework works with both SQL Server and 3rd party Databases(.edmx files). If your thinking for a common layer for all the databases, loosely coupled(independent of DB Schema), Entity Framework is the best option.