1.11M Members

HOW To MAKE SETUP OF SQL SERVER PROJECT

 
0
 

Hi Friends

I got lots of help from you all for diiferent types of problem.
I am making a project using C# , SQL SERVER 2005 and Crystal Report. I already developed the project but problem is I have to deploye it on other computer.
So how can I make setup which will automatically install SQL SERVER 2005 and its database along with other resources of .Net and Crystal Report.

Can any body help me to come out of this problem.

Thankyou in advance

 
0
 

you can create a custom installer class library project and then assign it to custom action property of your setup project.

check the last attachment in this link
http://www.daniweb.com/forums/thread200529-2.html
it will give you an idea of how to use custom installer.

Ask Scott for details :)

 
0
 

One of prerequisite to have SQLExpress installed, then you can attach your database automatically using SMO, if you need any help regarding SMO don't hesitate to reply.

Serkan, I didn't became Feature Code yet, I'll add two code snippets today, then sleep then dream that HappyGeek sent me PM congratulates me :D

 
0
 

Thanks serkan ;)

For installing SQL2005 you will want to use the command line args. Here they are for SQL2005:

//setup.exe /qb ADDLOCAL=SQL_Engine,SQL_Data_Files,SQL_Replication,Client_Components,Connectivity,SQL_SSMSEE INSTANCENAME=SrvMgrEnt SAVESYSDB=1 SQLBROWSERAUTOSTART=1 SQLAUTOSTART=1 AGTAUTOSTART=1 SECURITYMODE=SQL SAPWD=PASSWORD123 DISABLENETWORKPROTOCOLS=0 ERRORREPORTING=1 SQMREPORTING=0 ADDUSERASADMIN=1 INSTALLSQLDIR="%ProgramFiles%\Microsoft SQL Server\"

To assemble them in code you only need to modify a few args:

Result := '"' + Trim(wwDBEditSetup.Text) + '" /qb';
  Result := Result + ' ADDLOCAL=SQL_Engine,SQL_Data_Files,SQL_Replication,Client_Components,Connectivity,SQL_SSMSEE';
  Result := Result + ' INSTANCENAME=' + Trim(wwDBEditInstanceName.Text);
  Result := Result + ' SAVESYSDB=1';
  Result := Result + ' SQLBROWSERAUTOSTART=1';
  Result := Result + ' SQLAUTOSTART=1';
  Result := Result + ' AGTAUTOSTART=1';
  Result := Result + ' SECURITYMODE=SQL';
  Result := Result + ' SAPWD=' + Trim(wwDBEditPassword.Text);
  Result := Result + ' DISABLENETWORKPROTOCOLS=0';
  Result := Result + ' ERRORREPORTING=0';
  Result := Result + ' SQMREPORTING=0';
  Result := Result + ' ADDUSERASADMIN=1';
  Result := Result + ' INSTALLSQLDIR="' + Trim(IncludeTrailingPathDelimiter(wwDBEditTargetDir.Text)) + '"';
 
1
 

@Scott, they say SQL Server 2005 not 2000, Express not MSDE, because if they need to search on some code to attach they'll be confused.

 
0
 

@Scott, they say SQL Server 2005 not 2000, Express not MSDE, because if they need to search on some code to attach they'll be confused.

I did post SQL2005 installer args. Here is the 2000 express installer args:

AssignFile(txt, aFileName);
  ReWrite(txt);
  //setup.exe SAPWD="PASSWORD123" INSTANCENAME="Instance" TARGETDIR="C:\MSDE\Binn" DATADIR="C:\MSDE\Data" SECURITYMODE=SQL DISABLENETWORKPROTOCOLS=0 /L*v C:\sql200install.log
  s := '"' + wwDBEditSetup.Text + '" ';
  s := s + 'SAPWD="' + wwDBEditPassword.Text + '" ';
  s := s + 'INSTANCENAME="' + wwDBEditInstanceName.Text + '" ';
  s := s + 'TARGETDIR="' + wwDBEditTargetDir.Text + '" ';
  s := s + 'DATADIR="' + wwDBEditDataDir.Text + '" ';
  s := s + 'SECURITYMODE=SQL ';

  if CheckBoxDisableNetworkProtocol.Checked then
    s := s + 'DISABLENETWORKPROTOCOLS=1 '
  else
    s := s + 'DISABLENETWORKPROTOCOLS=0 ';

  s := s + '/L*v ' + wwDBEditLogFile.Text; //This should be like C:\install.log
 
0
 

it was "Express 2000" and "MSDE 2005" but they're the same thing .. the free release

[edit]I was mistaken and fix my last posts. you were right[/edit]

 
0
 

>Serkan, I didn't became Feature Code yet, I'll add two code snippets today, then sleep then dream that HappyGeek sent me PM congratulates me

i think HappyGeek is only interested in web programming like Dani. I doubt they every click on c# forum or c# code snippets. your effort probably wont capture their attention. If you are able to create reusable components however, it is very useful for yourself to post them as solutions as attachments. When you move to even another country, your solution is there. i am 15000 kms away from my home town, yet i have my solutions available in daniweb, i wish i hadnt been jealous to post most useful ones.

 
0
 

I got lots of help from you all for diiferent types of problem.
I am making a project using C# , SQL SERVER 2005 and database connetivity. I already developed the project but problem is I have to deploye it on other computer.
So how can I make setup which will automatically install SQL SERVER 2005 and its database along with other resources
Can any body help me to come out of this problem.

Thankyou in advance

 
0
 

How To Create .exe setup File Along with Sql server database?

You
This article has been dead for over six months: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article