generate a single SQL script file to deploy a SQL Server database (both schema and data)

已答复 generate a single SQL script file to deploy a SQL Server database (both schema and data)

All Replies

  • Thursday, June 14, 2012 10:30 PM
    Moderator
     
     Answered
    Can you right click on the database name from SSMS then Tasks ==> Generate Scripts and set script data options to false .

    Regards,
    Ahmed Ibrahim
    SQL Server Setup Team
    This posting is provided "AS IS" with no warranties, and confers no rights. Please remember to click "Mark as Answer" and "Vote as Helpful" on posts that help you.
    This can be beneficial to other community members reading the thread.

    • Marked As Answer by smetah Thursday, June 14, 2012 10:32 PM
    • Unmarked As Answer by smetah Thursday, June 14, 2012 10:39 PM
    • Marked As Answer by smetah Thursday, June 14, 2012 11:41 PM
    •  
  • Thursday, June 14, 2012 10:32 PM
     
     
    Oh, there. Thanks.
  • Thursday, June 14, 2012 10:40 PM
     
     

    wait, I need the data, along with the schema def, but didn't find an option to include data. 

    thx

  • Thursday, June 14, 2012 10:40 PM
    Moderator
     
     

    Hi Smetah,

    please let me know if this is not what you are looking for.


    Regards,
    Ahmed Ibrahim
    SQL Server Setup Team
    This posting is provided "AS IS" with no warranties, and confers no rights. Please remember to click "Mark as Answer" and "Vote as Helpful" on posts that help you.
    This can be beneficial to other community members reading the thread.

  • Thursday, June 14, 2012 10:46 PM
    Moderator
     
     Answered

    Regards,
    Ahmed Ibrahim
    SQL Server Setup Team
    This posting is provided "AS IS" with no warranties, and confers no rights. Please remember to click "Mark as Answer" and "Vote as Helpful" on posts that help you.
    This can be beneficial to other community members reading the thread.

    • Marked As Answer by smetah Thursday, June 14, 2012 11:41 PM
    •  
  • Thursday, June 14, 2012 10:52 PM
     
     

    Strange. See mine, which is SQL Server 2008 R2:

    • Marked As Answer by smetah Thursday, June 14, 2012 11:41 PM
    • Unmarked As Answer by smetah Thursday, June 14, 2012 11:41 PM
    •  
  • Thursday, June 14, 2012 11:16 PM
    Moderator
     
     

    Is this express sku ?

    In you screen shot can you see what are options available under Types of data to script

    this is third row.in your screen shot.


    Regards,
    Ahmed Ibrahim
    SQL Server Setup Team
    This posting is provided "AS IS" with no warranties, and confers no rights. Please remember to click "Mark as Answer" and "Vote as Helpful" on posts that help you.
    This can be beneficial to other community members reading the thread.


  • Thursday, June 14, 2012 11:19 PM
     
     

    No, SSMS from SQL Server 2008 R2

    Microsoft SQL Server Management Studio 10.50.2500.0
    Microsoft Analysis Services Client Tools 10.50.2500.0
    Microsoft Data Access Components (MDAC) 6.1.7601.17514
    Microsoft MSXML 3.0 6.0 
    Microsoft Internet Explorer 8.0.7601.17514
    Microsoft .NET Framework 2.0.50727.5448
    Operating System 6.1.7601

  • Thursday, June 14, 2012 11:24 PM
    Moderator
     
     Answered

    Regards,
    Ahmed Ibrahim
    SQL Server Setup Team
    This posting is provided "AS IS" with no warranties, and confers no rights. Please remember to click "Mark as Answer" and "Vote as Helpful" on posts that help you.
    This can be beneficial to other community members reading the thread.

    • Marked As Answer by smetah Thursday, June 14, 2012 11:41 PM
    •  
  • Thursday, June 14, 2012 11:40 PM
     
     
    Ah, thx!