How to perform only 1 specific table Restore in SQL Server 2012

Asked

Viewed 1,383 times

0

Good afternoon!

Guys, I have a situation: I have a backup of the database and the server has already been created a database with this base called test, however, I need to migrate a specific table that is in this test base to another database called Producao that is on the same server. The table name is complement.

  • 1

    Hello, I think the link below will resolve [https://docs.microsoft.com/pt-br/azure/sql-database/sql-database-cloud-migrate-restore-single-table-azure-backup]

  • Link to @Renansilveira?

  • Not Visible ? https://docs.microsoft.com/pt-br/azure/sql-database/sql-database-cloud-migrate-restore-single-table-azure-backup

  • This is not only for SQL Azure?

  • Barely I read only the text now I saw that is SQL server 2012

  • Check if this Help, if I don’t delete the comments, so the post doesn’t get too dirty. https://www.tiagoneves.net/blog/restaurar-uma-database-sql-server-2012-em-uma-instance-sql-server-inferior/

  • friend, ta dar o erro quando chega na ultima janela q é na validação: Messages Error 0xc0202049: Data Flow Task 1: Failure inserting into the read-only column "Compcolid". (SQL Server Import and Export Wizard) Error 0xc0202045: Data Flow Task 1: Column Metadata validation failed. (SQL Server Import and Export Wizard) Error 0xc004706b: Data Flow Task 1: "Destination - Complementocolunas" failed validation and returned validation status "VS_ISBROKEN". (SQL Server Import and Export Wizard)

  • @Renanbessa: If the goal is to migrate the contents of a table from one bank to another, both on the same computer, it seems to me more reliable and simple that run, in the production database, import program of table content.

  • It worked, master. obg @Josédiz

Show 4 more comments

1 answer

1

You can make an insert from one bank to the other by creating the table in the production bank in this process.

IF NOT EXISTS(SELECT * FROM [Producao]..SysObjects WHERE Name LIKE 'complemento')                 
BEGIN
    SELECT * INTO [Producao].dbo.[complemento] FROM [teste].dbo.[complemento]
END

Browser other questions tagged

You are not signed in. Login or sign up in order to post.