Welcome to Sign in | Help

Re: SMO Issue

  •  10-26-2007, 11:35 AM

    Re: SMO Issue

    Dap, de-acolo venea problema. Acuma imi crapa cu succes la restore.SqlRestore(srv)
    Exception-ul suna asa:

    Exception: Restore failed for Server 'TEST\SQLEXPRESS'.
    Source: Microsoft.SqlServer.Smo
    StackTrace:    at Microsoft.SqlServer.Management.Smo.Restore.SqlRestore(Server srv)
       at SetupDB.DBInstaller.ExecuteDBRestore(String DBName, String BackupPath, String RestorePath)
    Exception: An exception occurred while executing a Transact-SQL statement or batch.
    Source: Microsoft.SqlServer.ConnectionInfo
    StackTrace:    at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteNonQuery(String sqlCommand, ExecutionTypes executionType)
       at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteNonQuery(StringCollection sqlCommands, ExecutionTypes executionType)
       at Microsoft.SqlServer.Management.Smo.ExecutionManager.ExecuteNonQuery(StringCollection queries)
       at Microsoft.SqlServer.Management.Smo.BackupRestoreBase.ExecuteSql(Server server, StringCollection queries)
       at Microsoft.SqlServer.Management.Smo.Restore.SqlRestore(Server srv)

    si InnerException-ul:
    Exception: An exception occurred while executing a Transact-SQL statement or batch.
    Source: Microsoft.SqlServer.ConnectionInfo
    StackTrace:    at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteNonQuery(String sqlCommand, ExecutionTypes executionType)
       at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteNonQuery(StringCollection sqlCommands, ExecutionTypes executionType)
       at Microsoft.SqlServer.Management.Smo.ExecutionManager.ExecuteNonQuery(StringCollection queries)
       at Microsoft.SqlServer.Management.Smo.BackupRestoreBase.ExecuteSql(Server server, StringCollection queries)
       at Microsoft.SqlServer.Management.Smo.Restore.SqlRestore(Server srv)
    Exception: Directory lookup for the file "C:\inetpub\wwwroot\TireTrader 4.0\App_Data\AAIA_Data.mdf" failed with the operating system error 2(The system cannot find the file specified.).
    File 'VCDB_Public' cannot be restored to 'C:\inetpub\wwwroot\TireTrader 4.0\App_Data\AAIA_Data.mdf'. Use WITH MOVE to identify a valid location for the file.
    Directory lookup for the file "C:\inetpub\wwwroot\TireTrader 4.0\App_Data\AAIA_Log.ldf" failed with the operating system error 2(The system cannot find the file specified.).
    File 'VCDB_Public_Log' cannot be restored to 'C:\inetpub\wwwroot\TireTrader 4.0\App_Data\AAIA_Log.ldf'. Use WITH MOVE to identify a valid location for the file.
    Problems were identified while planning for the RESTORE statement. Previous messages provide details.
    RESTORE DATABASE is terminating abnormally.
    Source: .Net SqlClient Data Provider
    StackTrace:    at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
       at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
       at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
       at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
       at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async)
       at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
       at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
       at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteNonQuery(String sqlCommand, ExecutionTypes executionType)

     

View Complete Thread
Powered by Community Server (Commercial Edition), by Telligent Systems