Whether you're bulk loading data or connecting to an OLE DB data source, OPENROWSET is a handy tool for retrieving data. Find out how to use the OPENROWSET function for SQL Server and Microsoft Access. There may be times when you'll want to run an ad hoc query that retrieves data from a remote OLE DB data source... or bulk loads data into a SQL Server table. In such cases, you can use the OPENROWSET function in Transact-SQL to pass a connection string and query to the data source in order to retrieve the necessary data. You can use the OPENROWSET function to retrieve data from any data sources that support a registered OLD DB provider, such as a remote instance of SQL Server or Microsoft Access. If you're using OPENROWSET to retrieve data from a SQL Server instance, that instance must be configured to permit ad hoc distributed queries. To configure the remote instance of SQL Server to support ad hoc queries, use the sp_configure system stored procedure to ...
ChaudharyTechBlog is a technology-focused blog dedicated to providing simple, practical, and easy-to-understand tech guides.
Here, you’ll find tutorials, blogging tips, SEO basics, and helpful resources designed to make technology accessible for everyone.
Our content is carefully researched and written to help you learn, grow, and make informed decisions in the digital world.