To successfully read the source data you must grant the account used by the SQL Server Database Engine, access to the source data. Therefore, when a BULK INSERT command is initiated by a login using SQL Server authentication, the connection to the data is made using the security context of the SQL Server process account (the account used by the SQL Server Database Engine service). A login using SQL Server authentication cannot be authenticated outside of the Database Engine. If a user uses a SQL Server login, the security profile of the SQL Server process account is used. Use a Format File to Skip a Data Field (SQL Server).INSERT.SELECT * FROM OPENROWSET(BULK.) statements - examples: For more information, see Table Hints (Transact-SQL).įor information about additional uses of the BULK option, see OPENROWSET (Transact-SQL). In addition to the regular table hints, such as TABLOCK, the BULK clause can accept the following specialized table hints: IGNORE_CONSTRAINTS (ignores only the CHECK constraints), IGNORE_TRIGGERS, KEEPDEFAULTS, and KEEPIDENTITY. When used in an INSERT statement, OPENROWSET(BULK.) supports table hints. The basic syntax for bulk importing data is: To bulk import data, call OPENROWSET(BULK.) from a SELECT.FROM clause within an INSERT statement. The OPENROWSET(BULK.) function allows you to access remote data by connecting to a remote data source, such as a data file, through an OLE DB provider. The OPENROWSET bulk rowset provider is accessed by calling the OPENROWSET function and specifying the BULK option.
0 Comments
Leave a Reply. |