Re: Installing Sql Server Express on Vista Home Premium



(1) Why would the same connection string work on one Vista system but not on
the two others?

What comes to my mind is that there is a Default SQL Server instance is installed on that working system and your application connects to that instance.

I just want to ensure that you know the difference between a Named Instance and a Default instance. A Named Instance consists of your computer's name and a SQL Server instane name. And it's format is: <Computer_Name>\<Instance_Name>. A Default Instance consists of only your computer' s name.

(2) What would the connect string be to use the "Shared Memory" protocol?
The plan is for the database and application to remain on the one server.

ConnectionString = "Provider=SQLOLEDB.1" & ";Persist Security Info=False" &
";User ID=peter;Password=peter;Initial Catalog=foodbank;Data Source=" &
dbname

This connection string should work as you do not force the connection to use a specific protocol, Shared Memory will be used as this is the primary protocol by default.

P.S.
"Data Source = dbname" dbname variant is not a database name right? It must be a SQL Server Instance name; no offence, I just want to check.

--
Ekrem Önsoy



"Peter" <Peter@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:6194FEBD-47C7-45BB-B393-A44FE3F41A58@xxxxxxxxxxxxxxxx
Hi

I am not able to implement your ideas till later, but I have a couple of
questions that I hope you can answer for me:

(1) Why would the same connection string work on one Vista system but not on
the two others?

(2) What would the connect string be to use the "Shared Memory" protocol?
The plan is for the database and application to remain on the one server.

Cheers

Peter

"Ekrem Önsoy" wrote:

Peter,

It seems that your SQL Server instances are Named Instances, not Default
Instances. Named Instances use Dynamic Ports instead of Static Ports.
Default Instances uses 1433 TCP port by default as a Static Port but not the
Named Instances.

If you change your Connection String as following, your application should
connect.

> .ConnectionString = "Provider=SQLOLEDB.1" & ";Persist Security > Info=False"
> &
> ";User ID=peter;Password=peter;Initial Catalog=foodbank;Data Source=" &
> dbname & ";Network Library=DBMSSOCN"

I simply removed the port number from the Connection String.

To find out which instance use which port, you can use SQL Server
Configuration Manager. Open this tool and then go to "SQL Server Network
Configuration" node and after expanding it, go to properties of the related
instance' s TCP/IP port. In the TCP/IP properties window, go to IP Addresses
tab, there you'll find the dynamically assigned port at the bottom.

Also, you do not have to use TCP/IP protocol if your SQL Server instance and
application instance are running on the same server and if there will not be
remotely and directly connecting users to your SQL Server instance. In this
case, "Shared Memory" protocol will do the job faster.

--
Ekrem Önsoy



"Peter" <Peter@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:D774A32E-441E-4AB9-832D-F1DA5D51E66F@xxxxxxxxxxxxxxxx
> Hi
>
> You are right with all of your assumptions. The connect string I use > is:
>
> dbname = "sqlserver\sqlexpress"
>
> .ConnectionString = "Provider=SQLOLEDB.1" & ";Persist Security > Info=False"
> &
> ";User ID=peter;Password=peter;Initial Catalog=foodbank;Data Source=" &
> dbname & ",1433;Network Library=DBMSSOCN"
>
> The database that I am using is set to the default for the connecting
> user.
>
> I can connect using SSMSE
>
> Cheers
>
> Peter
> "Ekrem Önsoy" wrote:
>
>> Hi Peter,
>>
>> According to your story, I assume you have three computers with >> Windows
>> Vista installed and every computer has its own SQL Server 2008 Express
>> Edition installed on it and every application instance tries to >> connect
>> to
>> its locally installed SQL Server instance, right?
>>
>> Can you tell us what connection string you use for your application to
>> make
>> connection to SQL Server? Are your SQL Server instances Default
>> Instances?
>> Also, can you connect to these instances using SSMSE?
>>
>> -- >> Ekrem Önsoy
>>
>>
>>
>> "Peter" <Peter@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
>> news:CE45E6EE-FF49-48BE-A671-D73D1D4642AD@xxxxxxxxxxxxxxxx
>> > Hi
>> >
>> > I have install Express on three Vista HP computers, on one >> > everything
>> > works
>> > fine, but on the other two my application cannot connect to the
>> > instance.
>> > Any
>> > ideas?
>> >
>> > Studio runs and connects to the database.
>> > Remote connections is enabled.
>> > The Browser service is set to automatic.
>> > IP Connections is enabled and set to listen on all ports.
>> >
>> > Cheers
>> >
>> > Peter
>>


.



Relevant Pages

  • RE: Error 17835 - When encryption and Shared Memory are enabled
    ... Did you encounter this error when you connected to your SQL Server ... Did your SQL Server instance use a certificate explicitly specified by ... you configure your client connection settings "Force Protocol Encryption" ...
    (microsoft.public.sqlserver.connect)
  • Re: Remote Connection to SQL 2005
    ... I think you have an application, so can you show your Connection String? ... It's going to be the error message which will help us to solve the problem. ... You better investigate the problem from SQL Error Logs if it's only about SQL Server connection. ... If your SQL Server Instance is a Named Instance then ensure the Browser Service is running. ...
    (microsoft.public.sqlserver.setup)
  • Re: Cant connect remotely to SQL Server Express
    ... As SQL Server 2005 Express Edition is installed as a Named Instance by default, it must be using a Dynamic Port for TCP protokol now. ... to use a Static Port for your SQL Server Instance: ... Go to TCP/IP' s Properties ...
    (microsoft.public.sqlserver.setup)
  • Re: SQL 200 Dev edition on workgroup will not connect
    ... I do not know your experience level with SQL Server and yes, sometimes things being messy but letting a SQL Server instance to accept remote connections and uninstalling it are generally straightforward tasks to perform. ... I suggest you to check for the dynamic port number that your SQL Server graps. ... Write down the port number in the "TCP Dynamic Ports" property and then run a Command Prompt and see if this port is bening listened. ...
    (microsoft.public.sqlserver.connect)
  • Re: odbc will not connect while Server Management Studio will
    ... You need to show the ODBC definition. ... The first error is the important one: Connection string is not valid. ... One thing that often raises this problem is that the SQL Server instance name is not fully specified. ...
    (microsoft.public.sqlserver.odbc)

Loading