Please start any new threads on our new 
    site at https://forums.sqlteam.com.  We've got lots of great SQL Server
    experts to answer whatever question you can come up with.
    
        | 
                
                    | 
                            
                                | Author | Topic |  
                                    | cognos79Posting Yak  Master
 
 
                                        241 Posts | 
                                            
                                            |  Posted - 2007-09-10 : 20:58:37 
 |  
                                            | can anyone tell me how can I create an installer for sql server 2005 db. |  |  
                                    | KristenTest
 
 
                                    22859 Posts | 
                                        
                                          |  Posted - 2007-09-11 : 01:41:22 
 |  
                                          | Are you trying to create a database on a Server which has SQL 2005 already installed, or are you wanting to install SQL Server 2005 from scratch?Kristen |  
                                          |  |  |  
                                    | cognos79Posting Yak  Master
 
 
                                    241 Posts | 
                                        
                                          |  Posted - 2007-09-11 : 13:09:57 
 |  
                                          | I am desigining a small database for my application. The users who use my application, I want to let them install the sql database too. Just like .msi packages u have for web applications, where you get the gui to install the application, I am wondering if you can do the same way or some other better approach to do this. |  
                                          |  |  |  
                                    | KristenTest
 
 
                                    22859 Posts | 
                                        
                                          |  Posted - 2007-09-11 : 15:59:53 
 |  
                                          | I reckon your best approach would be to have a "shipping database" on your development environment.  make this database EXACTLY how you want your client's initial database to be - including Starter Data and so on.Either ship a Backup of this database, or Detach it and ship the MDF and LDF files [which will be bigger than the Backup file]Then in your Installer package Restore or re-Attach the database using a command line and invoking OSQL (or using an ADO/OLE-DB or somesuch database command directly from your Installer if it supports that)Kristen |  
                                          |  |  |  
                                    | cognos79Posting Yak  Master
 
 
                                    241 Posts | 
                                        
                                          |  Posted - 2007-09-12 : 11:58:36 
 |  
                                          | Kristen...Thanks for your response. Can you please clarify more in detail.When you say ship a backup of this database...what method do i have to use??? Do I have to put this backup file on my application installer. |  
                                          |  |  |  
                                    | KristenTest
 
 
                                    22859 Posts | 
                                        
                                          |  Posted - 2007-09-12 : 14:20:30 
 |  
                                          | "what method do i have to use"Use the SQL BACKUP command to make a Full backup of your "Shipping database"Include that file in your installer, and then use the SQL RESTORE command to restore that database on the target machine.Kristen |  
                                          |  |  |  
                                |  |  |  |