ข้ามไปที่เนื้อหาหลัก
Windows Dev Center
ลงชื่อเข้าใช้

 locked
Scripting RRS feed

คำตอบ

  • The term "scripting" is most often used to mean generating DDL scripts from existing database objects using tools like SSMS, ADS, mssql-scripter, or the SMO API.

    For example, when you right-click on an object in SSMS Object Explorer, one of the context menu options is "Script as", where you can select the option to generate the script as Create to--->New Query Editor Window. The script can then be modified and executed as desired.

    Scripting can also mean the general action of authoring T-SQL scripts so you'll need to understand the context of the term.


    Dan Guzman, Data Platform MVP, http://www.dbdelta.com

    • เสนอเป็นคำตอบโดย Naomi N 16 สิงหาคม 2563 13:13
    • ทำเครื่องหมายเป็นคำตอบโดย Jeff0803 17 สิงหาคม 2563 9:25
    16 สิงหาคม 2563 10:34
  • Hi Jeff,

    Scripting is a process that generates a plain text script file using the Transact-SQL language (the Microsoft Server version of SQL), which you could view and edit using the SQL Server Management Studio or any text editor and import to another SQL Server instance. The generated text file can include all parts of a database, the schema (database structure) and just the data.

    You could script queries from the GUI like backup and restore, shrink transation log.

    You could also script databases,tables, stored procedures and extended events.

    Please refer more details from below links:

    Script objects in SQL Server Management Studio

    Sharing SQL Server Databases via Scripting

    Best regards

    Melissa


    ""SQL Server related"" forum will be migrated to a new home on Microsoft Q&A SQL Server!
    We invite you to post new questions in the "SQL Server related" forum’s new home on Microsoft Q&A SQL Server !
    For more information, please refer to the sticky post.

    • ทำเครื่องหมายเป็นคำตอบโดย Jeff0803 17 สิงหาคม 2563 9:25
    17 สิงหาคม 2563 1:36
  • Hi Jeff,

    Scripting includes both DML and DDL.

    Best regards

    Melissa


    ""SQL Server related"" forum will be migrated to a new home on Microsoft Q&A SQL Server!
    We invite you to post new questions in the "SQL Server related" forum’s new home on Microsoft Q&A SQL Server !
    For more information, please refer to the sticky post.

    • ทำเครื่องหมายเป็นคำตอบโดย Jeff0803 21 สิงหาคม 2563 6:59
    17 สิงหาคม 2563 9:39

ตอบทั้งหมด

  • The term "scripting" is most often used to mean generating DDL scripts from existing database objects using tools like SSMS, ADS, mssql-scripter, or the SMO API.

    For example, when you right-click on an object in SSMS Object Explorer, one of the context menu options is "Script as", where you can select the option to generate the script as Create to--->New Query Editor Window. The script can then be modified and executed as desired.

    Scripting can also mean the general action of authoring T-SQL scripts so you'll need to understand the context of the term.


    Dan Guzman, Data Platform MVP, http://www.dbdelta.com

    • เสนอเป็นคำตอบโดย Naomi N 16 สิงหาคม 2563 13:13
    • ทำเครื่องหมายเป็นคำตอบโดย Jeff0803 17 สิงหาคม 2563 9:25
    16 สิงหาคม 2563 10:34
  • Hi Jeff,

    Scripting is a process that generates a plain text script file using the Transact-SQL language (the Microsoft Server version of SQL), which you could view and edit using the SQL Server Management Studio or any text editor and import to another SQL Server instance. The generated text file can include all parts of a database, the schema (database structure) and just the data.

    You could script queries from the GUI like backup and restore, shrink transation log.

    You could also script databases,tables, stored procedures and extended events.

    Please refer more details from below links:

    Script objects in SQL Server Management Studio

    Sharing SQL Server Databases via Scripting

    Best regards

    Melissa


    ""SQL Server related"" forum will be migrated to a new home on Microsoft Q&A SQL Server!
    We invite you to post new questions in the "SQL Server related" forum’s new home on Microsoft Q&A SQL Server !
    For more information, please refer to the sticky post.

    • ทำเครื่องหมายเป็นคำตอบโดย Jeff0803 17 สิงหาคม 2563 9:25
    17 สิงหาคม 2563 1:36
  • Doesn't the "scripting" include DML but does only DDL?
    17 สิงหาคม 2563 9:24
  • Hi Jeff,

    Scripting includes both DML and DDL.

    Best regards

    Melissa


    ""SQL Server related"" forum will be migrated to a new home on Microsoft Q&A SQL Server!
    We invite you to post new questions in the "SQL Server related" forum’s new home on Microsoft Q&A SQL Server !
    For more information, please refer to the sticky post.

    • ทำเครื่องหมายเป็นคำตอบโดย Jeff0803 21 สิงหาคม 2563 6:59
    17 สิงหาคม 2563 9:39