Generate scripts of creating multiple external tables

  • Hello,

    we are creating prod environment and need create multiple external tables (in Azure SQL) in PROD. How can I generate the script of creating external tables at once in lower environment? instead of clicking 'Scripts table as' one by one.

    Thanks in advance.

  • In Management Studio, in your database, Click on "TABLES", then in Object Explorer Details, you should see a list of all your tables. You can select them all, then right click "Script table as..."  and it will generate a create script for all tables at one time. You can also de-select some from the list if you don't want them all.

    • This reply was modified 3 years, 6 months ago by  homebrew01.
  • Thank you for the reply. Our database is Azure SQL, servername.database.windows.net, and external database is also Azure SQL. so I can only right click DatabaseName, then select 'Generate scripts'  and it only shows regular tables/views/sp, no external tables. Any ideas?

    • This reply was modified 3 years, 6 months ago by  pittrecon08.
  • What do you mean by 'external' exactly?

    The absence of evidence is not evidence of absence
    - Martin Rees
    The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
    - Phil Parkin

  • Sorry, I am new for cloud technology. so external here means we only store metadata of tables in our Azure SQL database that exist in other Azure SQL database. It is our data source from third party applications.  Thanks.

    • This reply was modified 3 years, 6 months ago by  pittrecon08.
  • pittrecon08 wrote:

    Sorry, I am new for cloud technology. so external here means we only store metadata of tables in our Azure SQL database that exist in other Azure SQL database. It is our data source from third party applications.  Thanks.

    I am not new to cloud technology, but I will admit that I have no idea what metadata you would store, nor why you would choose to store it!

    The absence of evidence is not evidence of absence
    - Martin Rees
    The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
    - Phil Parkin

  • I don't know either :(, just join the team recently and my team lead let me re-create those external tables in prod server. Here is the structure of our server. Hope this helps.

     

    • This reply was modified 3 years, 6 months ago by  pittrecon08.
    Attachments:
    You must be logged in to view attached files.
  • Aha, you're using Polybase. I thought you were using 'external' to mean 'somewhere not on this database/instance'!

    I have not used it and therefore can't help, sorry.

    The absence of evidence is not evidence of absence
    - Martin Rees
    The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
    - Phil Parkin

Viewing 8 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic. Login to reply