1,105,328 Community Members

HOW To MAKE SETUP OF SQL SERVER PROJECT

Member Avatar
vishalonne
Posting Whiz in Training
227 posts since Jun 2009
Reputation Points: 12 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
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

serkan sendur
Postaholic
2,057 posts since Jan 2008
Reputation Points: 821 [?]
Q&As Helped to Solve: 129 [?]
Skill Endorsements: 1 [?]
Banned
 
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 :)

Member Avatar
Ramy Mahrous
Postaholic
2,189 posts since Aug 2006
Reputation Points: 401 [?]
Q&As Helped to Solve: 277 [?]
Skill Endorsements: 14 [?]
Featured
 
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

Member Avatar
sknake
Senior Poster
3,957 posts since Feb 2009
Reputation Points: 1,620 [?]
Q&As Helped to Solve: 747 [?]
Skill Endorsements: 25 [?]
Featured
 
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)) + '"';
Member Avatar
Ramy Mahrous
Postaholic
2,189 posts since Aug 2006
Reputation Points: 401 [?]
Q&As Helped to Solve: 277 [?]
Skill Endorsements: 14 [?]
Featured
 
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.

Member Avatar
sknake
Senior Poster
3,957 posts since Feb 2009
Reputation Points: 1,620 [?]
Q&As Helped to Solve: 747 [?]
Skill Endorsements: 25 [?]
Featured
 
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
Member Avatar
sknake
Senior Poster
3,957 posts since Feb 2009
Reputation Points: 1,620 [?]
Q&As Helped to Solve: 747 [?]
Skill Endorsements: 25 [?]
Featured
 
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]

serkan sendur
Postaholic
2,057 posts since Jan 2008
Reputation Points: 821 [?]
Q&As Helped to Solve: 129 [?]
Skill Endorsements: 1 [?]
Banned
 
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.

Member Avatar
iboarac
Newbie Poster
1 post since Sep 2008
Reputation Points: 6 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
1
 

please check the following article.i wrote how we can embed SQLEXPRESS setup file inside a C# setup file. it contains sample project.

http://www.ibrahimarac.com/post/SETUP-PROJESI-ICERISINDE-SQL-SERVER-KURMAK.aspx

Halil İbrahim ARAÇ
MCT,MCPD

Member Avatar
saurabh G
Newbie Poster
1 post since Nov 2010
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
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

Jackson Kumar
Newbie Poster
1 post since Feb 2013
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
Unverified Member
 
0
 

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

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