|
Answer» Sometimes we have a situation when we cannot perform such activities using SSIS due to multiple types of databases, Different domains, Older version, etc. We have several commands available to import using T-SQL. - BCP – BCP is BULK copy program used to import a large number of rows into SQL server or to TEXT\csv files.
- Bulk INSERT – Bulk insert is used to data files (text \ csv \ excel) into a database table in a user-specified format.
- OpenRowSet – OpenRowSet is used to access remote data from an OLE DB data source. This is an alternative method of Linked server for the one-time or ad-hoc connection.
- OPENDATASOURCE - OPENDATASOURCE is used to access remote data on an ad-hoc basis with 4 part object name without using a linked server name.
- OPENQUERY – OPENQUERY is used to execute a specified query on the specified linked server. OPENQUERY can be referenced in from clause with INSERT, UPDATE, or DELETE statement on the target table.
- Linked SERVERS – Linked Servers are configured to access data outside SQL Server from another SQL instance or DB types (Like Oracle \ DB2, etc.). It has the ABILITY to issue queries & transactions on heterogeneous data sources.
|