SQL Server Performance

Ad-Hoc queries (SQL Server Express Edition)

Discussion in 'SQL Server 2005 General DBA Questions' started by anshubansal2000, Sep 9, 2005.

  1. anshubansal2000 New Member

    Hi,
    Does anybody knows how to allow AD-Hoc queries in MSSQL server express edition evaluation version.
    I am trying to run query
    INSERT INTO city
    SELECT *
    FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0', 'Excel 8.0;Database=D: esting.xls;HDR=YES', 'SELECT * FROM [SheetName$]') AS derivedtbl_1

    but it is showing error that unable to run AD-Hoc queries.
    I tried to switch it on by configuration manager. bUt I am not getting any way for this.
    Please let me know.

    Thanking You
    Anshu

  2. FrankKalis Moderator

    Your OPENROWSET looks strange.
    Will this work?


    OPENROWSET
    (
    'Microsoft.Jet.OLEDB.4.0',
    'Excel 8.0;Database=D: esting.xls;HDR=YES'
    ,SheetName$
    )



    --
    Frank Kalis
    Microsoft SQL Server MVP
    http://www.insidesql.de
    Ich unterstütze PASS Deutschland e.V. http://www.sqlpass.de)
  3. anshubansal2000 New Member

    Hi Frank,
    Guten Tag,

    Thank you for your advice. I also have some problem. Actually I am unable to run AD-Hoc query (OPENROWSET) on my MSSQL Express Evaluation version.
    I tried to switch it on from configuration manager but I couldnot find any method to switch it on.
    Please suggest me on this topic.
    Thanking YOu
    Anshu
  4. satya Moderator

    http://blogs.msdn.com/sqlexpress/ about using SQLExpress etc.

    HTH


    Satya SKJ
    Moderator
    http://www.SQL-Server-Performance.Com/forum
    This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
  5. anshubansal2000 New Member

    Hi Guys,
    SQL EXpress server supports Ad-Hoc Queries. Pplease go to configuration manager and put the server instance then enable AD-Hoc Queries.

    Thanking You
    Anshu
  6. FrankKalis Moderator

Share This Page