locked
Deploy failed RRS feed

  • Question

  • I'm trying to deploy debug CLR DLL for Sql Server 2005 but always i got deploy failed with no explanation.

    I really need debug!!


    Il saggio è quello che sa di non sapere
    Thursday, June 17, 2010 9:45 AM

Answers

  • The error message in English should be:

    Cannot use 'varchar' column in the result table of a streaming user-defined function (column 'Client').
     
    I haven’t got this error and I think the error message is explanatory that we cannot use varchar as the data type of column Client. Could you use another data type for column Client, like char or nvarchar?


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    • Marked as answer by VincentITA Thursday, June 24, 2010 9:22 AM
    Thursday, June 24, 2010 7:55 AM

All replies

  • It sounds like you are trying to deploy using Visual Studio SQL Server Projects, which are sometimes pretty "light" on information when deployment fails.

    First, make sure you have the Visual Studio "Error" and "Output" windows open (off the View menu). These provide some information about why deployment failed in some cases. If that information is not enough, you can view the generated SQL (and which SQL statement caused deployment to fail) by using SQLProfiler. If you don't have SQLProfiler (it doesn't come with Express edition, for example), then you need to use "manual" deployment (ie write your own CREATE ASSEMBLY, CREATE PROCEDURE, CREATE FUNCTION, etc statements) to see what's going wrong.

    Hope this helps, Bob Beauchemin, SQLskills

     

    Thursday, June 17, 2010 5:47 PM
  • I just made it.

    1) Output window is completely empty (no error, no messages, no warning, no Build output). There is nothinh else to see.


    2)I used SQL Server Profiler and i can see VS process making a lot of queries (i can't read now, SQL is full working at this time, i will try this night).

    3)Manual deployment works, but it's annoying build, transfer, delete procedures and functions, delete assembly, create again assembly, create again procedures.

     

    Thank you!

     

    Monday, June 21, 2010 9:02 AM
  • There has to be messages somewhere, whether deployment was successful or unsuccessful. They can be in the Output window or Error window or both, but there is always some message AFAIK. Even if deployment wasn't attempted because the compile/build failed, the compile error(s) are reported in the Error window.

    Also be aware of the fact that autodeploy doesn't work with every possible condition. If, for example, one of your UDFs is used in a computed column or T-SQL function/view defined with schemabinding, autodeploy won't drop associated SQL objects automatically. That's a benefit, that it doesn't drop computed columns, for example.

    But, because manual deployment works without affected any other SQL objects, I'm guessing you don't have any related objects. Profiler will let you know what its trying to do...

    Cheers, Bob Beauchemin, SQLskills

    Monday, June 21, 2010 7:50 PM
  • I got the error, it was in output box, not in error's one :D

     

     The following error might appear if you deploy a SQL CLR project that was built for a version of the .NET Framework that is incompatible with the target instance of SQL Server: "Deploy error SQL01268: CREATE ASSEMBLY for assembly failed because assembly failed verification". To resolve this issue, open the properties for the project, and change the .NET Framework version.
    C:\USERS\VINCENZO\DOCUMENTS\VISUAL STUDIO 2010\PROJECTS\SPVC_FINDINVOICES\SPVC_FINDINVOICES\BIN\RELEASE\VINCSP.DLL(1,1,1,1): Deploy error SQL03006: Assembly: [VincSp] has an unresolved reference to object [sa].
    


    Il saggio è quello che sa di non sapere
    Wednesday, June 23, 2010 6:15 PM
  • I managed it installins SQL Server Service Pack 3.

    But now i got this problem

     

    C:\Users\Vincenzo\Documents\Visual Studio 2010\Projects\spvc_FindInvoices\spvc_FindInvoices\bin\Release\VincSp.sql
     
      Creating [VincSp]...
      Adding files to assembly [VincSp]
      Creating [dbo].[doReport]...
      Creating [dbo].[sendPostEmail]...
      Creating [dbo].[sendPreEmail]...
      Creating [dbo].[spvc_FindInvoices]...
    C:\Users\Vincenzo\Documents\Visual Studio 2010\Projects\spvc_FindInvoices\spvc_FindInvoices\bin\Release\VincSp.sql(150-150): Deploy error SQL01268: .Net SqlClient Data Provider: Msg 6514, Level 16, State 3, Procedure spvc_FindInvoices, Line 1 Impossibile utilizzare la colonna 'varchar' nella tabella dei risultati di una funzione di flusso definita dall'utente (colonna 'Cliente').
      An error occurred while the batch was being executed.

     

    Having it in this function

     

      [Microsoft.SqlServer.Server.SqlFunctionAttribute(FillRowMethodName="RiempiRiga",DataAccess=DataAccessKind.Read,TableDefinition="Cliente varchar(255),RagioneSociale varchar(255), Data DateTime,Importo Decimal,Pagamento varchar(255),Agente varchar(255)")]
      public static IEnumerable spvc_FindInvoices(int mode = 0)
    


    Il saggio è quello che sa di non sapere
    Wednesday, June 23, 2010 9:03 PM
  • The error message in English should be:

    Cannot use 'varchar' column in the result table of a streaming user-defined function (column 'Client').
     
    I haven’t got this error and I think the error message is explanatory that we cannot use varchar as the data type of column Client. Could you use another data type for column Client, like char or nvarchar?


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    • Marked as answer by VincentITA Thursday, June 24, 2010 9:22 AM
    Thursday, June 24, 2010 7:55 AM
  • It worked with nvarchar! Thank you!
    • Edited by VincentITA Thursday, June 24, 2010 9:22 AM ok!
    Thursday, June 24, 2010 9:19 AM