`

how to use sqlserver2008 to search in files

阅读更多
example:
select   *   from    
  OPENROWSET('MICROSOFT.JET.OLEDB.4.0'  
  ,'Text;HDR=No;DATABASE=D:\Data\FullIdList'
  ,'select * from [b.txt]')


problem 1:
SQL Server blocked access to STATEMENT 'OpenRowset/OpenDatasource' of component 'Ad Hoc Distributed Queries' because this component is turned off as part of the security configuration for this server. A system administrator can enable the use of 'Ad Hoc Distributed Queries' by using sp_configure. For more information about enabling 'Ad Hoc Distributed Queries', see "Surface Area Configuration" in SQL Server Books Online.
solution :
--0 show sys.configurations, if the value of 'Ad Hoc Distributed Queries' is 0 ,go ahead
SELECT * FROM sys.configurations
ORDER BY name ;
--1. Use below script to enable to update the configurations:
sp_configure 'show advanced options',1
reconfigure
--2.Enable 'Ad Hoc Distributed Queries':
sp_configure 'Ad Hoc Distributed Queries',0
reconfigure


problem 2:
solution :
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\4.0\Engines\TEXT]
分享到:
评论

相关推荐

    Microsoft SQL Server 2005 Analysis Services Step by Step

    Provides information on ...based security and restrict data access•Deploy and maintain a database in a production environmentCD features•All practice exercises and answer files•Fully searchable eBook

    Microsoft SQL Server2005 Analysis Step by Step

    Manage role-based security and restrict data access •Deploy and maintain a database in a production environment CD features •All practice exercises and answer files •Fully searchable eBook

    Microsoft SQL Server2005 Analysis Services Step by Step

    Manage role-based security and restrict data access •Deploy and maintain a database in a production environment CD features •All practice exercises and answer files •Fully searchable eBook

    Inside SQL Server 2005 Tools

    Now there's a comprehensive guide <br>to SQL Server 2005's toolset, straight from the Microsoft team that created it. <br>This book covers the entire toolset in unprecedented depth, guides ...

    Microsoft BizTalk Server 2010 Patterns

    methods for parallel processing in BizTalk server, and how to use them to shorten processing time and increase scalability, as well as when not to. Chapter 14, Processing Message Convoys: The final ...

    微软内部资料-SQL性能优化2

    Before we look at how SQL Server uses and manages its memory, we need to ensure a full understanding of the more common memory related terms. The following definitions will help you understand how SQL...

    微软内部资料-SQL性能优化5

    Without a useful index, Microsoft® SQL Server™ must search every row on every page in table to find the rows to return. With a multitable query, SQL Server must sometimes search a table multiple ...

    Docker-in-Action.pdf

    learned how to use their internal build, dependency modeling, and deployment tool- ing. This was the kind of automated management I had always known was possible but had never seen. I was coming from ...

    Pro Tableau(Apress,2016)

    Connect to various data sources such as spreadsheets, text files, relational databases (Microsoft SQL Server, MySQL, etc.), non-relational databases (NoSQL such as MongoDB, Cassandra), R data files, ...

    Pro Tableau: A Step-by-Step Guide

    Connect to various data sources such as spreadsheets, text files, relational databases (Microsoft SQL Server, MySQL, etc.), non-relational databases (NoSQL such as MongoDB, Cassandra), R data files, ...

    VB编程资源大全(英文源码 数据库)

    <END><br>34,DAOLike.zip This program Demonstrates how to use LIKE operator in Jet SQL Query (uses DAO).<END><br>35,xmlcreator.zip This project is a demonstration of how to convert a recordset ...

    C# 7 and .NET Core: Modern Cross-Platform Development - Second Edition

    reading and writing to databases, such as Microsoft SQL Server and SQLite, using the object-relational mapping technology known as the Entity Framework Core. Chapter 9, Querying and Manipulating Data ...

    hibernate_reference.pdf

    - **Query Language Substitution**: Explains how to use placeholders in HQL and criteria queries. - **Hibernate Statistics**: Describes how to enable statistics collection and view performance metrics....

    VB编程资源大全(英文源码 其它)

    cube.zip This example demonstrates how to rotate a cube in visual basic.<END><br>17 , sprite1.zip This is an Excellent example on how to use sprites in your program.<END><br>18 , charcreate.zip...

    Extending SSIS with .NET Scripting(Apress,2015)

    Extending SSIS with .NET Scripting is a timeless and comprehensive scripting toolkit for SQL Server Integration Services to solve a wide array of everyday problems that SSIS developers encounter....

    VB编程资源大全(英文源码 ASP)

    <END><br>16,SiteGalaxyUpload.zip The SiteGalaxy ASP Upload is free Active Server component that parses RFC-1867 HTTP requests. It can be used in ASP pages to accept files sent by client browser ...

    Python for Informatics

    5. **Database Interaction**: Knowledge of SQL and how to connect Python scripts with databases is essential for managing large datasets. The book likely includes practical examples using SQLite, MySQL...

Global site tag (gtag.js) - Google Analytics