« Previous Next »

Not Answered Thread: SQLEXPRESS

Last post 06-16-2010 1:26 PM by jflaurel. 6 replies.

 

RSS

Page 1 of 1 (7 items)

Sort Posts:

  • 06-21-2007, 1:54 PM

    SQLEXPRESS

    All,

    I am trying to import a merged W3C Extended log into a SQLEXPRESS instance.

    My LogParser 2.2 query is as follows:

    LogParser -i:W3C -o:SQL "SELECT date, time, s-computername, c-ip, cs-uri-stem, cs-uri-query, sc-status, sc-substatus, sc-win32-status, time-taken, sc-bytes, cs-bytes FROM MERGED_LOG.log TO W3CLogs" -driver:"SQL Server" -server:.\sqlexpress -database:IISLogs -createtable: ON -fixColNames: ON

    I get the following error:

    Task aborted.
    An error occurred while uploading data to SQL table
      SQL State:     42000
      Native Error:  7202
      Error Message: [Microsoft][ODBC SQL Server Driver][SQL Server]Could not
      find server 'IANBE-LT-M5\SQLEXPRESS' in sys.servers. Verify that the
      correct server name was specified. If necessary, execute the stored
      procedure sp_addlinkedserver to add the server to sys.servers.

    Statistics:
    -----------
    Elements processed: 81
    Elements output:    80
    Execution time:     0.83 seconds

    I see that the table is created in the database but is never populated.

     

    Any help you can offer would be greatly appreciated

  • 08-31-2007, 5:08 PM In reply to

     I am having the same problem. Did you ever find a resolution.

     

    Shawn S 

  • 02-15-2008, 7:21 AM In reply to

    • jose_gisbert
    • Not Ranked
    • Joined on 02-15-2008, 11:15 AM
    • Santiago del Estero
    • Posts 3

    with Sql 2005,  and instance named sqlexpress, and creating table, AND mixed database mode ( windows + sql) auth

    LogParser "SELECT * FROM Application TO Apptable" -o:SQL -server:"server\sqlexpress" -driver:"SQL Server" -database:logparser   -createtable:ON 

    tip: (-server:"server\sqlexpress") the quotes are important.

      

    Works 2 me. 

     Enjoy!

    ------------------
    José Gisbert
    SDE-Argentina
  • 03-19-2008, 10:27 AM In reply to

    • offirg
    • Not Ranked
    • Joined on 03-19-2008, 2:22 PM
    • Posts 1

    I am getting the same error,

    and tried to use the example you gave with the IIS SQL2005 reports pack

    logparser "select top 10 date,time,strcat(strcat(strcat(TO_STRING(TO_TIMESTAMP(date, time),'hh'),':00-'), TO_STRING(TO_TIMESTAMP(date,time),'hh')),':59')AS Hour, TO_Int(TO_String(date,'MM')) as Month,TO_Int(TO_String(date,'yyyy')) as year,c-ip,cs-username,s-sitename,s-computername,s-ip,s-port,cs-method,cs-uri-stem,cs-uri-query,sc-status,sc-substatus,sc-win32-status,sc-bytes,cs-bytes,time-taken,cs-version,cs-host,cs(User-Agent),cs(Cookie),cs(Referer) From C:\WINDOWS\system32\LogFiles\W3SVC1\ex080229.log to GlobalIIsLog" -i:IISW3C -o:SQL -oConnString:"Driver={SQL Server};Server=10.101.104.10;db=IISLogs;uid=XXX;pwd=XXX"

    and i am still getting the error

    Task completed with errors.
    An error occurred while uploading data to SQL table
      SQL State:     42000
      Native Error:  7202
      Error Message: [Microsoft][ODBC SQL Server Driver][SQL Server]Could not
      find server 'IADPSCOUTDB01P' in sys.servers. Verify that the correct server
      name was specified. If necessary, execute the stored procedure
      sp_addlinkedserver to add the server to sys.servers.

     

    I would really appreciate if someone can give me a hint

     

     

  • 04-29-2008, 4:18 PM In reply to

    • jfer
    • Not Ranked
    • Joined on 08-18-2005, 2:51 AM
    • Posts 2

    I got the same issue but was able to solve it by specifying my connection info using a connection string:

     

    logparser -i:EVT -o:SQL "select * into EventsTable from SomeEventLog" -oConnString:"Driver={SQL Native Client}; Server=.\sqlexpress; Database=LogParser;Trusted_Connection=yes;" -ignoreMinWarns:OFF -createTable:ON -maxStrFieldLen:8000

     

    The driver is now SQL Native Client, does anyone know if this matters?

     

  • 01-26-2009, 8:54 AM In reply to

    For me the solution was simply to install and use the SQL Native Client!

  • 06-16-2010, 1:26 PM In reply to

    • jflaurel
    • Not Ranked
    • Joined on 06-16-2010, 5:10 PM
    • Posts 1

    If you get the error message above it means SQL Server is searching for a server that no longer valid. Perhaps you've changed the server name?

     

    In LogParser process, SQL client query first the master database, then switch to desired database. This can be evident using WireShark.

     

    If you run a query against sysservers table in master database, you'll see list of registered server. To find out the name of your SQL Server, run query "select @@servername"



    To fix this error, simply run the following sql commands:

     

    Use master

    exec sp_dropserver 'old server name'
    exec sp_addserver 'new server name', 'local'

     

    Restart SQL Server service and check out your server name.

     

    Try LogParser again.  

     

    Good Luck

     

    Reference: http://itdevcorner.blogspot.com/2010/02/could-not-find-server-ls-in-sysservers.html

    Juan Laurel

     

     

Page 1 of 1 (7 items)