We are excited to announce that the IIS.NET Forums are moving to the new Microsoft Q&A experience. Learn more >

Error: Script Transfer FailedRSS

3 replies

Last post Dec 08, 2008 01:36 PM by madjos

  • Error: Script Transfer Failed

    Nov 27, 2008 05:24 PM|chiefnobum|LINK

    Hello,

    I am trying to package up a database inside the package. I "Click here to add/remove database components..." and Add Database, selecting the connection string to my local SQL express database and select Complete Database. After I click OK, it tries to add it, but then comes up with a Script Transfer Failed error.

    Am I missing something? The database does have a bunch of data in it already. The only way I can get it to not give me the error is if I create a blank database in SQL 2008 express and then use that one. Any of the databases we already have that I try to use don't work.

     Any ideas?

    Thanks

  • Re: Error: Script Transfer Failed

    Dec 02, 2008 08:15 PM|madjos|LINK

    Can you try the same connection string on the msdeploy command line and send the output?

     

    msdeploy.exe -verb:sync -source:dbfullsql=<connection_string> -dest:dbfullsql=c:\myscript.sql -debug

     
  • Re: Error: Script Transfer Failed

    Dec 08, 2008 11:29 AM|chiefnobum|LINK

    Here is the output from the command prompt. This user is the dbowner. 

    C:\Program Files\IIS\Microsoft Web Deploy>msdeploy.exe -verb:sync -source:dbfull
    sql="Data source=.\sqlexpress;Initial Catalog=BasicSite;uid=azureuser;password=b
    eetfarm;" -dest:dbfullsql=c:\myscript.sql -debug

    Microsoft.SqlServer.Management.Smo.FailedOperationException: Script transfer fai
    led.  ---> Microsoft.SqlServer.Management.Smo.FailedOperationException: Discover
     dependencies failed.  ---> Microsoft.SqlServer.Management.Smo.SmoException: An
    exception occurred while executing a Transact-SQL statement. ---> Microsoft.SqlS
    erver.Management.Common.ExecutionFailureException: An exception occurred while e
    xecuting a Transact-SQL statement or batch. ---> System.Data.SqlClient.SqlExcept
    ion: The SELECT permission was denied on the object 'sql_expression_dependencies
    ', database 'mssqlsystemresource', schema 'sys'.
    The SELECT permission was denied on the object 'sql_expression_dependencies', da
    tabase 'mssqlsystemresource', schema 'sys'.
    The SELECT permission was denied on the object 'sql_expression_dependencies', da
    tabase 'mssqlsystemresource', schema 'sys'.
    The SELECT permission was denied on the object 'sql_expression_dependencies', da
    tabase 'mssqlsystemresource', schema 'sys'.
    The SELECT permission was denied on the object 'sql_expression_dependencies', da
    tabase 'mssqlsystemresource', schema 'sys'.
    The SELECT permission was denied on the object 'sql_expression_dependencies', da
    tabase 'mssqlsystemresource', schema 'sys'.
    Duplicate key was ignored.
    Duplicate key was ignored.
       at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolea
    n breakConnection)
       at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObj
    ect stateObj)
       at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cm
    dHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, Tds
    ParserStateObject stateObj)
       at System.Data.SqlClient.SqlDataReader.SetMetaData(_SqlMetaDataSet metaData,
    Boolean moreInfo)
       at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cm
    dHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, Tds
    ParserStateObject stateObj)
       at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
       at System.Data.SqlClient.SqlDataReader.get_MetaData()
       at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, Run
    Behavior runBehavior, String resetOptionsString)
       at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBe
    havior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
       at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehav
    ior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult
     result)
       at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehav
    ior, RunBehavior runBehavior, Boolean returnStream, String method)
       at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, S
    tring method)
       at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behav
    ior)
       at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandB
    ehavior behavior)
       at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[]
     datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand co
    mmand, CommandBehavior behavior)
       at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord,
    Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)

       at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
       at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteWithResults(
    String sqlCommand)
       --- End of inner exception stack trace ---
       at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteWithResults(
    String sqlCommand)
       at Microsoft.SqlServer.Management.Smo.ExecuteSql.ExecuteWithResults(String qu
    ery)
       at Microsoft.SqlServer.Management.Smo.ExecuteSql.ExecuteWithResults(StringCol
    lection query, Object con)
       at Microsoft.SqlServer.Management.Smo.SqlEnumDependencies.EnumDependencies(Ob
    ject ci, DependencyRequest rd)
       at Microsoft.SqlServer.Management.Sdk.Sfc.Enumerator.EnumDependencies(Object
    connectionInfo, DependencyRequest dependencyRequest)
       at Microsoft.SqlServer.Management.Smo.ExecutionManager.GetDependencies(Depend
    encyRequest dependencyRequest)
       --- End of inner exception stack trace ---
       at Microsoft.SqlServer.Management.Smo.ExecutionManager.GetDependencies(Depend
    encyRequest dependencyRequest)
       at Microsoft.SqlServer.Management.Smo.DependencyWalker.DiscoverDependencies(U
    rn[] urns, Boolean parents)
       --- End of inner exception stack trace ---
       at Microsoft.SqlServer.Management.Smo.DependencyWalker.DiscoverDependencies(U
    rn[] urns, Boolean parents)
       at Microsoft.SqlServer.Management.Smo.Transfer.GetObjectList()
       at Microsoft.SqlServer.Management.Smo.Transfer.EnumScriptTransfer()
       --- End of inner exception stack trace ---
       at Microsoft.SqlServer.Management.Smo.Transfer.EnumScriptTransfer()
       at Microsoft.Web.Deployment.DatabaseProviderHandler.GetChildObjects(Deploymen
    tObjectBaseInfo baseInfo, DeploymentAddObjectContext addContext)
       at Microsoft.Web.Deployment.SqlDatabaseProvider.GetChildObjects(DeploymentAdd
    ObjectContext addContext)
       at Microsoft.Web.Deployment.DeploymentObject.GetChildrenWithoutAz()
       at Microsoft.Web.Deployment.DeploymentObject.get_Children()
       at Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildrenOrder(Deploymen
    tObject dest, DeploymentObject source)
       at Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildren(DeploymentObje
    ct dest, DeploymentObject source)
       at Microsoft.Web.Deployment.DeploymentSyncContext.ProcessSync(DeploymentObjec
    t destinationObject, DeploymentObject sourceObject)
       at Microsoft.Web.Deployment.DeploymentObject.SyncToInternal(DeploymentObject
    destObject, DeploymentSyncOptions syncOptions, PayloadTable payloadTable)
       at Microsoft.Web.Deployment.DeploymentObject.SyncTo(String factoryName, Strin
    g path, DeploymentObjectBaseConfig baseConfig, DeploymentSyncOptions syncOptions
    )
       at MSDeploy.MSDeploy.Execute()
       at MSDeploy.MSDeploy.Main(String[] args)
    Fatal count: 1

  • Re: Error: Script Transfer Failed

    Dec 08, 2008 01:36 PM|madjos|LINK

    Hi,

    Thanks for getting back to me with the command line output. The basic problem here is:

    The SELECT permission was denied on the object 'sql_expression_dependencies
    ', database 'mssqlsystemresource', schema 'sys'.

    From this I gather that you are using SQL 2008 because the view sql_expression_dependencies only exists in SQL 2008 and later. On my installation of SQL 2008, I created a new SQL user (called testdbo) and made him db_owner for my test database (called testdb). After I did this, I was able to connect to testdb as testdbo and run the following command:

        select * from sys.sql_expression_dependencies

    Can you do the same on your basicsite database when connected as azureuser? If this fails (with a similar error as above), then thats where your problem is. You need to give permissions to the user to be able to select from that view. By default db_owner users are allowed to access that view (as was the case when I created the testdbo user). So I am not sure how you got into this state (maybe there are some explicit permissions set that are denying you access?).

    Hope that helps,

    madhur