Showing posts with label localhost. Show all posts
Showing posts with label localhost. Show all posts

Tuesday, March 27, 2012

Connecting to SQL Server 2005 - Not Allow Remote Connections

I use ASP.NET 2.0 and VS.NET 2005.

I have the following expression in my code:

string connectionString = "server=\'localhost\'; user id=\'sa\'; password=\'\'; Database=\'Northwind\'";

When I executed the code I have the following error message:

"An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)."

The Microsoft Access was successfully connected in the Server Explorer window.

How do I solve this problem?

Thanks,

Andy.

Try this thread for the two links you need to get it going. Hope this helps.

http://forums.asp.net/thread/1381596.aspx

|||

From your link, I found the following link http://support.microsoft.com/default.aspx?scid=kb%3bEN-US%3b914277. I have followed all the instructions from that page, but I still receive the same error message.

I am not sure which version of SQL I am using. From the "start" -> "All Programs", I can only see "Microsoft SQL Server". It was installed, when I installed Microsoft Visual Studio 2005 Professional.

Andy.

|||If you have the professional you should have the Developer edition CD separately, copy the content to your hard drive and install it as a named instance and then use the instructions for the developer edition. Hope this helps.

Monday, March 19, 2012

Connecting to localhost Problems?

I'm taking a .NET class and I have SQL Server 2005 installed on my
machine. When I go into Studio and then select Server Explorer and try
to add a new Connection, it seems to bomb out when I type in
'localhost' for the server name. It doesn't come back with anything
for the DBS. Is there something I need to do to get my machine to
understand 'localhost'?"Rick" <rlc_60504@.yahoo.comwrote in message
news:1162528400.038379.136840@.h54g2000cwb.googlegr oups.com...

Quote:

Originally Posted by

I'm taking a .NET class and I have SQL Server 2005 installed on my
machine. When I go into Studio and then select Server Explorer and try
to add a new Connection, it seems to bomb out when I type in
'localhost' for the server name. It doesn't come back with anything
for the DBS. Is there something I need to do to get my machine to
understand 'localhost'?


Very likely you have SQL 2005 installed as a named instance, so you have to
specifically provide the hostname AND isntance name.

Quote:

Originally Posted by

>

Sunday, March 11, 2012

connecting to data source issue

I'm having a problem connecting to an access database from
http://localhost/reports. I can connect from the computer I developed the
reports but when I goto another computer it gives me this error message
An error has occurred during report processing. (rsProcessingAborted)
Cannot create a connection to data source 'DataSource1'.
(rsErrorOpeningConnection)
I've created the same exact odbc connection in the systems tab as on the
computer I've created the project with. I've looked at there online help
but it didn't have any suggestions.
Is there anything else I need to do on the other computer in order for this
to work?
TIA,
JacksonHi Jackson
I am having the exact same problem. Did you find a solution? Should I find
one I will post it here.
Tina - MSFTE
"Jackson" wrote:
> I'm having a problem connecting to an access database from
> http://localhost/reports. I can connect from the computer I developed the
> reports but when I goto another computer it gives me this error message
> An error has occurred during report processing. (rsProcessingAborted)
> Cannot create a connection to data source 'DataSource1'.
> (rsErrorOpeningConnection)
> I've created the same exact odbc connection in the systems tab as on the
> computer I've created the project with. I've looked at there online help
> but it didn't have any suggestions.
> Is there anything else I need to do on the other computer in order for this
> to work?
>
> TIA,
> Jackson
>
>|||Jackson and Tina
I am having the same problem and have posted everywhere trying to find a
fix. This supposedly works. I have turned it over to the Network Mgr and he
is reviewing it. Hopefully, it will solve the problem. If it works, please
let me know or, if you find another solution I wuld really appreciate hearing
about it.
Roy
1. Kerberos is enabled
2. The servers are trusted for delegation
3. The SPN's are configured
"http://msdn.microsoft.com/library/default.asp?url=/library/en-us/adminsql/ad_security_2gmm.asp"
4. If you have several domain controllers wait for replication to complete.
If you don't wait you will pull your hair out because nothing you try will
works and all of sudden a few hours latter it starts working and you can't
figure out why.
5. Make sure all users have the option 'Enable Integrated Windows
Authentication' enabled in internet explorer, without it they will still get
the authentication error.
"Jackson" wrote:
> I'm having a problem connecting to an access database from
> http://localhost/reports. I can connect from the computer I developed the
> reports but when I goto another computer it gives me this error message
> An error has occurred during report processing. (rsProcessingAborted)
> Cannot create a connection to data source 'DataSource1'.
> (rsErrorOpeningConnection)
> I've created the same exact odbc connection in the systems tab as on the
> computer I've created the project with. I've looked at there online help
> but it didn't have any suggestions.
> Is there anything else I need to do on the other computer in order for this
> to work?
>
> TIA,
> Jackson
>
>|||It took a while but I finally got a work around.
I'm currently taking daily snapshots of the access reports. So now I don't
even need to create odbc connections on other user computers.
"Tina (MSFTE)" <Tina (MSFTE)@.discussions.microsoft.com> wrote in message
news:212D3E5F-C8D8-412F-9493-EBB9EACADA1A@.microsoft.com...
> Hi Jackson
> I am having the exact same problem. Did you find a solution? Should I find
> one I will post it here.
> Tina - MSFTE
> "Jackson" wrote:
>> I'm having a problem connecting to an access database from
>> http://localhost/reports. I can connect from the computer I developed
>> the
>> reports but when I goto another computer it gives me this error message
>> An error has occurred during report processing. (rsProcessingAborted)
>> Cannot create a connection to data source 'DataSource1'.
>> (rsErrorOpeningConnection)
>> I've created the same exact odbc connection in the systems tab as on the
>> computer I've created the project with. I've looked at there online help
>> but it didn't have any suggestions.
>> Is there anything else I need to do on the other computer in order for
>> this
>> to work?
>>
>> TIA,
>> Jackson
>>|||Roy,
Your post put me on the right track. The IIS server we deployed to is not in
a domain, neither was any of the users. I did not even think of looking for
this scenario, I assumed we were on the domain.
1) I requested a user to be created on the domain.
2) I gave this user Data reader rights on all the SQL and AS servers that
forms part of my solution
3) In RS I used the full username and password to be saved securely in RS
4) Selected "Use as WIS credentials to make the connection"
5) Selected "Impersonate user after connection created"
It works like a charm. Due to the client's unique network configuration -
servers on the network, but not in the domain - this is the only way the
solution will work.
"Roy" wrote:
> Jackson and Tina
> I am having the same problem and have posted everywhere trying to find a
> fix. This supposedly works. I have turned it over to the Network Mgr and he
> is reviewing it. Hopefully, it will solve the problem. If it works, please
> let me know or, if you find another solution I wuld really appreciate hearing
> about it.
> Roy
> 1. Kerberos is enabled
> 2. The servers are trusted for delegation
> 3. The SPN's are configured
> "http://msdn.microsoft.com/library/default.asp?url=/library/en-us/adminsql/ad_security_2gmm.asp"
> 4. If you have several domain controllers wait for replication to complete.
> If you don't wait you will pull your hair out because nothing you try will
> works and all of sudden a few hours latter it starts working and you can't
> figure out why.
> 5. Make sure all users have the option 'Enable Integrated Windows
> Authentication' enabled in internet explorer, without it they will still get
> the authentication error.
> "Jackson" wrote:
> > I'm having a problem connecting to an access database from
> > http://localhost/reports. I can connect from the computer I developed the
> > reports but when I goto another computer it gives me this error message
> >
> > An error has occurred during report processing. (rsProcessingAborted)
> >
> > Cannot create a connection to data source 'DataSource1'.
> > (rsErrorOpeningConnection)
> >
> > I've created the same exact odbc connection in the systems tab as on the
> > computer I've created the project with. I've looked at there online help
> > but it didn't have any suggestions.
> >
> > Is there anything else I need to do on the other computer in order for this
> > to work?
> >
> >
> > TIA,
> >
> > Jackson
> >
> >
> >|||I ran into the same issue. I have modified security to report howeve
I noticed that it is using the users credentials who is accessing th
report to initiate Oracle connection. It looks like the use
requires elevated permissions on C:\Program Files\Oracle and possibl
other directories
Still investigating...
Rya|||If you creaye a secure use in RSthat user can have the elevated priviledges
and not your real life users - better from a security point of view - that is
why I selected the options I did. See if that works to Oracle as well.
Cioa
Tina
"rjohnstone" wrote:
> I ran into the same issue. I have modified security to report however
> I noticed that it is using the users credentials who is accessing the
> report to initiate Oracle connection. It looks like the user
> requires elevated permissions on C:\Program Files\Oracle and possibly
> other directories.
> Still investigating...
> Ryan
>

Friday, February 24, 2012

Connecting PortalVB ?

When I try to install PortalVB (IBuySpy) it says "Database Server Instance" and a dropdown box saying "localhost".
That should be correct right?
I click 'Configure' and it doesn't work?

Anyone help?

Cheers,
Noth

Ps. I have MSDE installed.just a guess... Might be a login issue...

Sunday, February 12, 2012

Connect to SQL Server from Command Prompt?

I installed SQL Server CTP version and tried to connect from Command Prompt, but failed from either osql or sqlcmd:

osql [/sqlcmd] -H localhost -E

or,

osql [/sqlcmd] -H localhost -U sa -P SAPWD

The error message is:

Named Pipes Provider: Could not open a connection to SQL Server, ...

Please note named pipes are enabled from client protocol configuration.

without Management studio, how can I connect to the server?

Thanks.
PS: I had searched in the forum, but didn't find answer to above question.

-S is the parameter for the instancename e.g.

sqlcmd -S (local) -E

sqlcmd -S (local)\SQL01 -E

For a windows authenticated connection to the default instance on the local

machine you don't need any parameters for sqlcmd e.g

sqlcmd

--

HTH

Jasper Smith (SQL Server MVP)

http://www.sqldbatips.com

I support PASS - the definitive, global

community for SQL Server professionals -

http://www.sqlpass.org

wrote in message

news:f756a7ad-017a-42a5-aa70-0908ad626391@.discussions.microsoft.com...

>I installed SQL Server CTP version and tried to connect from Command

> Prompt, but failed from either osql or sqlcmd:

>

> osql [/sqlcmd] -H localhost -E

>

> or,

>

> osql [/sqlcmd] -H localhost -U sa -P SAPWD

>

> The error message is:

>

> Named Pipes Provider: Could not open a connection to SQL Server, ...

>

> Please note named pipes are enabled from client protocol configuration.

>

> without Management studio, how can I connect to the server?

>

> Thanks.

>

>

> PS: I had searched in the forum, but didn't find answer to above

> question.

>

>

>

>

>|||-S is the parameter for the instancename e.g.

sqlcmd -S (local) -E sqlcmd -S (local)\SQL01 -E

For a windows authenticated connection to the default instance on the local machine you don't need any parameters for sqlcmd e.g

sqlcmd

|||Thanks for the replies.

After a few attempts, I found the following command works:

osql (or sqlcmd) -S .\SQLEXPRESS -E

without instance name, it always timed out.