MS SQL Server & Windows Vista

Got a problem you cannot solve? Try here.
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Tue May 22, 2007 6:00 pm

Did anybody experiment with the Alternate SQL plug-in available on the Plug-Ins section of this forum?
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/

tltaylor76
Posts: 76
Joined: Mon Nov 06, 2006 2:07 pm
Location: Texas
Contact:

Postby tltaylor76 » Tue May 22, 2007 6:01 pm

I have not. I learned of this after I had already created a work around...this is something that I DO plan to test though within the next 30 days as I still have a need for it.
Trent L. Taylor
Sr. Software Developer
StrataFrame Application Framework
www.strataframe.net

RobertKozak
Posts: 47
Joined: Thu Mar 15, 2007 6:51 pm

Re: Workaround

Postby RobertKozak » Wed May 23, 2007 12:13 pm

tltaylor76 wrote:Actually I had to quit using the .NET Installer class and move entirely over to a command line EXE


Thanks Trent,

I didn't even consider an exe. I was just thinking too norrowly I guess.

-- Robert

RobertKozak
Posts: 47
Joined: Thu Mar 15, 2007 6:51 pm

Postby RobertKozak » Wed May 23, 2007 12:18 pm

MichaelNesmith wrote:Did anybody experiment with the Alternate SQL plug-in available on the Plug-Ins section of this forum?


Yes I tried to but in my case it has a totally different problem. It requires a script that must be in a webblock. I am doing a scan and test connection to SQL server before my Welcome Dialog is shown. I can't wait until a webblock gets executed to give me a script I don't need.

-- Robert Kozak

ps. It also looks like Check Service doesn't work on Vista either. I tried to use this as an alternate to connecting to SQL SERVER, I was going to assume that if the service is running on the server machine I would be able to connect to it after the install. But even though the service was running it came back each time as NOTINSTALLED.

Maybe there is a general error in the networking code you use in regards to the new vista security model?

tltaylor76
Posts: 76
Joined: Mon Nov 06, 2006 2:07 pm
Location: Texas
Contact:

Postby tltaylor76 » Wed May 23, 2007 1:21 pm

I didn't even consider an exe. I was just thinking too norrowly I guess.


Well, I didn't at first either :) After I kept having issues with the Installer classes I decided I better come up with a more reliable approach. It actually consolidated a number of assemblies into one and ended up working better in the long run anyway.
Trent L. Taylor

Sr. Software Developer

StrataFrame Application Framework

www.strataframe.net

mtaber
Posts: 13
Joined: Mon Mar 19, 2007 7:12 pm

Postby mtaber » Fri Jul 06, 2007 2:24 pm

Not that it probably makes a difference to anyone who was part of this discussion, but I started experiencing the same problem after upgrading from 6.x to 6.6. I don't remember which version I upgraded from, but this just stopped working.

My SQL 2000 database hasn't changed, nor has my installer code. It just doesn't work anymore. I will be going the route of a custom exe as well. I've wasted far too much time getting this working, when I know that it's just not that hard.

tltaylor76
Posts: 76
Joined: Mon Nov 06, 2006 2:07 pm
Location: Texas
Contact:

It'll save you some time....

Postby tltaylor76 » Fri Jul 06, 2007 2:27 pm

Yeah...this is the best way to go because it will give you control and save a lot of frustrations. I haven't had any problems since I wrote an EXE and quit relying on the MSI commands. Just FYI, I also tried the Alternate SQL and it did not work either.
Trent L. Taylor

Sr. Software Developer

StrataFrame Application Framework

www.strataframe.net

mtaber
Posts: 13
Joined: Mon Mar 19, 2007 7:12 pm

Postby mtaber » Fri Jul 06, 2007 2:51 pm

What did you use to write the exe? I was going to use .NET, but it looks like I'm going to have to jump through hoops to replicate all of the functionality of the plugin I was using. ie: Enumerating SQL Servers, databases in the instance, etc. To do that, I'll need to have a fully trusted assembly and do all this extra work and research I think.

Any suggestions on the language to use?

tltaylor76
Posts: 76
Joined: Mon Nov 06, 2006 2:07 pm
Location: Texas
Contact:

Postby tltaylor76 » Fri Jul 06, 2007 3:01 pm

I wrote it in .NET. You do not have to have worry about full assembly trusts because it will be executed off of the local drive. I have the EXE in the SUPPORTDIR so as long as you have .NET 2.0 installed (if that is the version you are writing this in) then you will not have a problem. If you execute off of a network drive....then you will have policy issues and need to create a trust.

I just wrote a WinForms app that reads the command line parms. I wrote my to look for "/Parmname:Value" so that I could add a bunch of additional functionality outside of SQL validation alone. For example, I manually register certain assemblies in the GAC, etc. since my install calls another .NET program later in the install to do all of the data deployment and structure updates and creation to SQL server, etc.

I would let InstallAware gather the list of SQL Servers for you, allow the user to enter the authentication type, etc. Once you have gathered that information, then pass it over to the EXE to see if it worked (just create the connection string and try to open it with an SqlConnection). In either case, write the results back to the registry. InstallAware can then read the registry entry that you wrote that determines if the connection was successful or not.

Just FYI...you will need to Wait Until Complete when running your EXE through the MSI script otherwise the install will keep going. If the validation failed, then go back to the SQL screen and provide an error on a that dialog.

If you want to do everything on a .NET dialog form, then you will want to use SMO (SQL Server Management Objects). This is the managed client tools interface for SQL Server 2005 (it is backward compatible and will work with 2000 as well). It is much easier to use than DMO. The only downside here is that you will first need to ensure that the client assemblies are registered at this point. You can do this manually, but there are about 10 assemblies that you have to register.

The last option would be to send out a TCP broadcast (which if you put a packet sniffer on InstallAware you will see this behavior) and manually search for the SQL Servers. Hope this helps :)
Trent L. Taylor

Sr. Software Developer

StrataFrame Application Framework

www.strataframe.net

mtaber
Posts: 13
Joined: Mon Mar 19, 2007 7:12 pm

Postby mtaber » Fri Jul 06, 2007 3:30 pm

Sounds like SMO might be the way to go. I've noticed that the InstallAware module for enumerating the SQL servers on the network isn't always accurate. For example, some of my instances are not listed at all. Others are listed more than once. It's a bit disconcerting as a developer to see that my application might not be easily installable and I'd like to automate as much as possible.

The current .NET code that I'm using to enumerate the servers doesn't appear to be functioning properly, and the Microsoft article I pulled it from indicated it would need to be fully trusted.

The Smo code I copied from a similar article does basically the same thing. It appears to execute, but then doesn't actually provide me with any SQL instances. I wish I could tell whether this was a code issue or something with how my SQL instances were configured. You'd think that at least one instance would show up. I have probably 8-10 different SQL servers on my network, including MSDE, SQLEXPRESS, SQL 2k Standard edition, and SQL2k5 standard edition.

At least SOMETHING should be coming out of it. I'll keep digging and report back on what I find. I can't be the only one out there with this issue.

Freak
Posts: 2
Joined: Thu Sep 27, 2007 7:32 am

Postby Freak » Fri Sep 28, 2007 5:26 am

No solution to this yet?
I'm Running Vista 64bit, gets the servernames but cannot connect. Have tried the plugin that comes with InstallAware and also the Alternate SQL plugin.

What's strange is that all the servers comes up, both sql2000 and 2005 instances, but i cannot connect to anyone not the local one and not the ones on our network.
Have disabled firewall, tried using blank in instance and the it should use SQLexpress still doesnt work.

Any easier solution than writing an exe file ?

Edit: What is also strange is that i have this on an XP machine also, cannot connect to sql2000 and not to 2005 instances.


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 54 guests