locked
Incorrect syntax near external RRS feed

  • Question

  •   I have a SQL Server 2005 database, compatibility level 90. I am trying to create the dbschema using vsdbcmd and get the following error  "Incorrect syntax near external". I have enabled everything CLR etc from Surface Area configuration but still continue to get this error.

    Environment: VS 2008 SP1, Sql Server 2005, Windows Server 2003
    Wednesday, December 17, 2008 10:30 AM

Answers

All replies

  • When you say "create dbschema file" I assume you are doing a vsdbcmd.exe /a:Import is that correct?

    You can dowload this utility to turn on tracing
    http://cid-526eb9977609d51e.skydrive.live.com/self.aspx/DataDude/VSDB2008GDR-Trace.zip

    Set the trace level to 4 - verbos tracing
    Set the output to a log file

    Run the import again and post or send me the log file that was created in the %APPDATA%\Microsoft\VisualStudio\9.0\VSTSDB\Trace directory.

    -GertD
    Monday, December 22, 2008 7:44 PM
  • Is there a version of this for VS 2010?

    Tuesday, June 5, 2012 1:32 PM
  • There is a reg file in the dir for the tools you can use to enable tracing.

    %Program Files%\Microsoft Visual Studio 10.0\VSTSDB\Tracing.reg

    Enable Database Project Trace

    You enable tracing for database projects by running the reg file in the product directory. To enable tracing:

    1. Open registry file located in the product directory. %Program Files%\Microsoft Visual Studio 10.0\VSTSDB\Tracing.reg
    2. Edit the file and save a copy of it to your temp directory. Set TraceSwitch = 00000001, TraceToLogFile= 00000001, DisplayCallStack= 00000001, LogDir = “c:\\Temp\\VSTSDB”
    3. Add the entry to the registry by double clicking the new file from your temp directory
    4. Restart Visual Studio if open. All instances of Visual Studio need to be closed before logging set will become active for the next instance of Visual Studio.

    You should find the log directory and log added for each session of database project usage. When an error occurs, you should have a complete log entry for the error including the stack.

    The Tracing.reg file should look like the following before adding to registry.

    Windows Registry Editor Version 5.00

    [HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0\VSTSDB\Tracing]

    "LogDir"=“c:\\Temp\\VSTSDBTRACE

    "PrefixTime"=dword:00000001

    "PrefixPid"=dword:00000001

    "PrefixThreadId"=dword:00000001

    "TraceSwitch"=dword:00000001

    "TraceToLogFile"=dword:00000001

    "TraceToDebugOutput"=dword:00000000

    "DisplayCallStack"=dword:00000001

    "UniqueLogFile"=dword:00000001

    "EventIdsToTrace"=dword:0001ffff


    Thanks,
    Barclay Hill http://blogs.msdn.com/bahill
    Sr. Program Manager, SQL Server Data Tools | Microsoft Corporation
    Please mark the responses as the answer if it resolves your question/issue.

    Tuesday, June 5, 2012 2:54 PM
    Moderator