SQL Express 2005 - Visual Studio 2008
-
Hi, Never seen this, but few questions: - is SQL Browser running - can you connect using Server Explorer Mika
-
Mika Wendelius wrote:
is SQL Browser running
Yes
Mika Wendelius wrote:
can you connect using Server Explorer
If it's not a user instance then yes. I.e. if I set it up in SQL Management Studio and connect like a "full" server then everything works.
Okay, by Server Explorer I actually meant Visual Studio Server Explorer. I would believe that the problem is in user instance behaviour. Since it does not use the default port (1433) and the instance name usually must be specified, there's a problem in acquiring this info in VS. Also if I remember correctly, user instances must be explicitely allowed during installation but in this case I believe you have done that. I'll try to install named instance and test this but it will take some time. Meanwhile could you test that if you have an active connection in VS Server Explorer, is the behaviour different or can you create the database to VS project from Server Explorer (never used server explorer this way so it may be a dumb suggestion) Mika
-
Okay, by Server Explorer I actually meant Visual Studio Server Explorer. I would believe that the problem is in user instance behaviour. Since it does not use the default port (1433) and the instance name usually must be specified, there's a problem in acquiring this info in VS. Also if I remember correctly, user instances must be explicitely allowed during installation but in this case I believe you have done that. I'll try to install named instance and test this but it will take some time. Meanwhile could you test that if you have an active connection in VS Server Explorer, is the behaviour different or can you create the database to VS project from Server Explorer (never used server explorer this way so it may be a dumb suggestion) Mika
Mika Wendelius wrote:
Okay, by Server Explorer I actually meant Visual Studio Server Explorer.
This is exactly the same message regardless of anything inside Visual Studio. My guess is that although I'm running the x64 edition of SQL Server it's only got the "bindings" for an x86 version.
Mika Wendelius wrote:
Also if I remember correctly, user instances must be explicitely allowed during installation but in this case I believe you have done that.
Done that.
Mika Wendelius wrote:
Meanwhile could you test that if you have an active connection in VS Server Explorer
I have an active connection in Server Explorer to the "proper" SQL database. If I detach that database and then point Server Explorer at the database file rather than the connection then the same message pops up.
Mika Wendelius wrote:
is the behaviour different or can you create the database to VS project from Server Explorer (never used server explorer this way so it may be a dumb suggestion
You can and I think the method is the same whether you create it through Server Explorer or Add New Item. Add New Item will automatically add a connection to the database to Server Explorer. One thing I haven't tried recently is installing the x86 version of SQL Server (I can uninstall or reinstall SQL quite happily but don't particularly fancy uninstalling VS2008).
Mika Wendelius wrote:
I'll try to install named instance and test this but it will take some time
I've got a trial install of Vista x64 Ultimate inside a VMWare virtual machine if you'd like a copy for testing (will take quite a while since even compressed as hard as it'll go it's over 4GB).
-
Okay, by Server Explorer I actually meant Visual Studio Server Explorer. I would believe that the problem is in user instance behaviour. Since it does not use the default port (1433) and the instance name usually must be specified, there's a problem in acquiring this info in VS. Also if I remember correctly, user instances must be explicitely allowed during installation but in this case I believe you have done that. I'll try to install named instance and test this but it will take some time. Meanwhile could you test that if you have an active connection in VS Server Explorer, is the behaviour different or can you create the database to VS project from Server Explorer (never used server explorer this way so it may be a dumb suggestion) Mika
Mika Wendelius wrote:
Okay, by Server Explorer I actually meant Visual Studio Server Explorer.
This is exactly the same message regardless of anything inside Visual Studio. My guess is that although I'm running the x64 edition of SQL Server it's only got the "bindings" for an x86 version.
Mika Wendelius wrote:
Also if I remember correctly, user instances must be explicitely allowed during installation but in this case I believe you have done that.
Done that.
Mika Wendelius wrote:
Meanwhile could you test that if you have an active connection in VS Server Explorer
I have an active connection in Server Explorer to the "proper" SQL database. If I detach that database and then point Server Explorer at the database file rather than the connection then the same message pops up.
Mika Wendelius wrote:
is the behaviour different or can you create the database to VS project from Server Explorer (never used server explorer this way so it may be a dumb suggestion
You can and I think the method is the same whether you create it through Server Explorer or Add New Item. Add New Item will automatically add a connection to the database to Server Explorer. One thing I haven't tried recently is installing the x86 version of SQL Server (I can uninstall or reinstall SQL quite happily but don't particularly fancy uninstalling VS2008).
Mika Wendelius wrote:
I'll try to install named instance and test this but it will take some time
I've got a trial install of Vista x64 Ultimate inside a VMWare virtual machine if you'd like a copy for testing (will take quite a while since even compressed as hard as it'll go it's over 4GB). [edit] In the meantime I've set up an XP virtual machine to use for all this work anyway and it feels "fun" to go back to such a retro OS (although I have installed an add-on which gives me the Vista Start Menu). It'd just be nice to have this thing up and running on an x64 machine since everything else works perfectly. Maybe it's time for a re-install :-). [/edit]
-
Mika Wendelius wrote:
Okay, by Server Explorer I actually meant Visual Studio Server Explorer.
This is exactly the same message regardless of anything inside Visual Studio. My guess is that although I'm running the x64 edition of SQL Server it's only got the "bindings" for an x86 version.
Mika Wendelius wrote:
Also if I remember correctly, user instances must be explicitely allowed during installation but in this case I believe you have done that.
Done that.
Mika Wendelius wrote:
Meanwhile could you test that if you have an active connection in VS Server Explorer
I have an active connection in Server Explorer to the "proper" SQL database. If I detach that database and then point Server Explorer at the database file rather than the connection then the same message pops up.
Mika Wendelius wrote:
is the behaviour different or can you create the database to VS project from Server Explorer (never used server explorer this way so it may be a dumb suggestion
You can and I think the method is the same whether you create it through Server Explorer or Add New Item. Add New Item will automatically add a connection to the database to Server Explorer. One thing I haven't tried recently is installing the x86 version of SQL Server (I can uninstall or reinstall SQL quite happily but don't particularly fancy uninstalling VS2008).
Mika Wendelius wrote:
I'll try to install named instance and test this but it will take some time
I've got a trial install of Vista x64 Ultimate inside a VMWare virtual machine if you'd like a copy for testing (will take quite a while since even compressed as hard as it'll go it's over 4GB). [edit] In the meantime I've set up an XP virtual machine to use for all this work anyway and it feels "fun" to go back to such a retro OS (although I have installed an add-on which gives me the Vista Start Menu). It'd just be nice to have this thing up and running on an x64 machine since everything else works perfectly. Maybe it's time for a re-install :-). [/edit]
Hi again, I installed another instance (with such an original name as Test :)) After that I tried to add a new item and then in the dialog box from data node "Service-based Database". This failed with an error mesagge saying that the conection cannot be established because the server cannot be found. This is quite obvious since there's no dialog box asking where do I want to connect and the second instance is not listening on default ports and so on. What I'm currently wondering is that the error I get is different from yours. Am I doing this differently? Mika
-
Mika Wendelius wrote:
Okay, by Server Explorer I actually meant Visual Studio Server Explorer.
This is exactly the same message regardless of anything inside Visual Studio. My guess is that although I'm running the x64 edition of SQL Server it's only got the "bindings" for an x86 version.
Mika Wendelius wrote:
Also if I remember correctly, user instances must be explicitely allowed during installation but in this case I believe you have done that.
Done that.
Mika Wendelius wrote:
Meanwhile could you test that if you have an active connection in VS Server Explorer
I have an active connection in Server Explorer to the "proper" SQL database. If I detach that database and then point Server Explorer at the database file rather than the connection then the same message pops up.
Mika Wendelius wrote:
is the behaviour different or can you create the database to VS project from Server Explorer (never used server explorer this way so it may be a dumb suggestion
You can and I think the method is the same whether you create it through Server Explorer or Add New Item. Add New Item will automatically add a connection to the database to Server Explorer. One thing I haven't tried recently is installing the x86 version of SQL Server (I can uninstall or reinstall SQL quite happily but don't particularly fancy uninstalling VS2008).
Mika Wendelius wrote:
I'll try to install named instance and test this but it will take some time
I've got a trial install of Vista x64 Ultimate inside a VMWare virtual machine if you'd like a copy for testing (will take quite a while since even compressed as hard as it'll go it's over 4GB). [edit] In the meantime I've set up an XP virtual machine to use for all this work anyway and it feels "fun" to go back to such a retro OS (although I have installed an add-on which gives me the Vista Start Menu). It'd just be nice to have this thing up and running on an x64 machine since everything else works perfectly. Maybe it's time for a re-install :-). [/edit]
I did some tests on the service-based database. When adding it to the project it actually starts SQL Server in desktop session. So the database is not added to service controlled sql server at that time. This didn't make any sense since one of the startup parameters is instance name. How can Visual Studio start the instance without knowing relevant parameters:confused:. Then I found this: http://msdn.microsoft.com/en-us/library/ms345154.aspx#sseover_topic18[^]
Visual Studio Integration SQL Server Express is installed with all editions of Visual Studio. Visual Studio installs SQL Server Express using the instance name SQLEXPRESS. In SQL Server Express, the applications rely on the SQLEXPRESS instance name. The goal of Visual Studio and SQL Server Express integration is to make database access with SQL Server Express as simple and easy as working with Jet. This is true not only for client applications but also for ASP.NET Web server scenarios.
This makes me wonder if there actually is any way to use non-default instances with Visual Studio... Mika
-
I did some tests on the service-based database. When adding it to the project it actually starts SQL Server in desktop session. So the database is not added to service controlled sql server at that time. This didn't make any sense since one of the startup parameters is instance name. How can Visual Studio start the instance without knowing relevant parameters:confused:. Then I found this: http://msdn.microsoft.com/en-us/library/ms345154.aspx#sseover_topic18[^]
Visual Studio Integration SQL Server Express is installed with all editions of Visual Studio. Visual Studio installs SQL Server Express using the instance name SQLEXPRESS. In SQL Server Express, the applications rely on the SQLEXPRESS instance name. The goal of Visual Studio and SQL Server Express integration is to make database access with SQL Server Express as simple and easy as working with Jet. This is true not only for client applications but also for ASP.NET Web server scenarios.
This makes me wonder if there actually is any way to use non-default instances with Visual Studio... Mika
-
I did some tests on the service-based database. When adding it to the project it actually starts SQL Server in desktop session. So the database is not added to service controlled sql server at that time. This didn't make any sense since one of the startup parameters is instance name. How can Visual Studio start the instance without knowing relevant parameters:confused:. Then I found this: http://msdn.microsoft.com/en-us/library/ms345154.aspx#sseover_topic18[^]
Visual Studio Integration SQL Server Express is installed with all editions of Visual Studio. Visual Studio installs SQL Server Express using the instance name SQLEXPRESS. In SQL Server Express, the applications rely on the SQLEXPRESS instance name. The goal of Visual Studio and SQL Server Express integration is to make database access with SQL Server Express as simple and easy as working with Jet. This is true not only for client applications but also for ASP.NET Web server scenarios.
This makes me wonder if there actually is any way to use non-default instances with Visual Studio... Mika
-
Renaming the instance to SQLExpress fixes it. What a situation! Thanks for your help and the research, I definitely owe you a :beer:
You're welcome :) In the meantime I investigated the templates for new items under Visual Studio ItemTemplates, but I didn't find any way to define a new template against another instance name nor to change the default name of the instance to connect to. Seems that they have hardcoded this into VS. Nice... :omg: Mika
-
You're welcome :) In the meantime I investigated the templates for new items under Visual Studio ItemTemplates, but I didn't find any way to define a new template against another instance name nor to change the default name of the instance to connect to. Seems that they have hardcoded this into VS. Nice... :omg: Mika