eyeorg
Posts: 5
Joined: Sat Nov 10, 2007 4:11 am

How the H do you connect to SQL Server 2005

Can someone please give me the steps needed to connect to SQL Server 2005? And dont send me a link to the online help because it sucks.

I need to create a new database, run some scripts to create the schema and stored procs. I want to allow the user to define the sql server that they want the new database on and then supply the sa password. The database that they will connect to initially will just be master.

I have tried to create a new predefined and custom connection and neither of them will actually connect to the database. This seems like it should be easy as pie yet I am stupid enough to not be able to figure it out and everyone else seems to be running just fine. Help please.
dms
Posts: 164
Joined: Tue Aug 28, 2007 7:11 am
Location: UK

This may or may not help you. I assume that you want to provide your end user with a way of locating the instance of an sql database onto which they can run your scripts that will create a new database along with its schema and sprocs.

I obviously don't know what your end purpose to this is, in other words I don't know if you really want to create the database because you have an application that you have developed that needs access to it. But lets just say for the time being that that is the case have you cosider using an external packager for the database itself and simply calling it from Advanced installer. Something like sqlpackager from redgate springs to mind (http://www.red-gate.com/products/SQL_Packager/index.htm)

Alternatively there are tools built into visual studio that would allow you do to the same from within your application.

Personally I have found that sql packager has saved me hours and has more than paid for itself. I have no connection with it whatsoever, it's just good at what it does in the same way that AI is good at what it does.

HTH

Dom
eyeorg
Posts: 5
Joined: Sat Nov 10, 2007 4:11 am

Yes that is exactly what I am doing. My app uses a database (isnt this a common thing nowadays?) I will definnitely checkout redgate, i wasnt aware they had something like that. I appreciate the help.

Am I mis-understanding AI capabilities here? It seems like this should be a standard feature.
dms
Posts: 164
Joined: Tue Aug 28, 2007 7:11 am
Location: UK

I can think of one installer where this is much more easily achieved, but of course it comes at a price, and quite frankly AI does pretty much everything else that I want it to do, is much better value and has great support.

It's possible that this is something they have in mind to do in the future, but if you want a failsafe databse installation (well as failsafe as you're ever going to get with a computer) then I think you'll find that sql packager is the answer. And if you need to be able to do this fairly quickly then I think you'll find that this is the way forward.

Don't forget that you do have the option of building the self same thing in visual studio, but it's by no means a five minute job, and the components that you need to access are somewhat undocumented, but don't start me off on that!!

Dom
eyeorg
Posts: 5
Joined: Sat Nov 10, 2007 4:11 am

and the name of such installer that would do something like this would be?

And what is the point of the sql script support in AI if it is not meant for what I am trying to do?
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,

Please note that we have a tutorial for using SQL scripts:
http://www.advancedinstaller.com/user-g ... l-sql.html

Advanced Installer does not support the direct interrogation of a database for exporting the schema and the data-dump. However, it supports the execution of this type of scripts / stored procedures which are created from scratch or exported (before they are used in Advanced Installer) with a tool of the Database management system.

Advanced Installer also offers the possibility of configuring databases at install time, leveraging Windows Installer integration through formatted strings.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”