Showing posts with label connection. Show all posts
Showing posts with label connection. Show all posts

Sunday, 25 March 2012

CONNECT TO SERVER PROBLEM

I am getting this message when trying to connect to SQL SERVER 2005;
An error has occurred while establishing connection to the server.When connecting to SQL Server 2005, this failure may be caused by the fact that under default settings SQL Server does not allow remote connections(provider:shared memory provider , error 40-could not open a connection to SQL Server)(MicrosoftSQL SERVER, Error: 2)
Can anyone help to fix this problem please

Are you using SQL Express? If so, you need to enable remote connections. They are disabled by default.

Thanks,
Sam Lester (MSFT)

|||SQL SERVER 2005, STANDART
|||

On the server execute these statements:

sp_configure 'remote admin connections', 1

go

reconfigure

go

Then you should be able to connect from a client workstation.

Connect to Oracle8i Enterprise Edition Release 8.1.7.4.0 - Product

I want to fetch data from Oracle 8i,
so how do I connect with SQL Server 2005?
I want to use the connection in SQL IS, RS & AS and also perhaps using a
Linked Server.
And what do I need to install on my server?
Any good/bad experience out there?
Please help!
Search for
SQL Server 2005 64-bit - Fetch data from Oracle
in microsoft.public.sqlserver.dts
"Olof" wrote:

> I want to fetch data from Oracle 8i,
> so how do I connect with SQL Server 2005?
> I want to use the connection in SQL IS, RS & AS and also perhaps using a
> Linked Server.
> And what do I need to install on my server?
> Any good/bad experience out there?
> Please help!

Connect to Oracle8i Enterprise Edition Release 8.1.7.4.0 - Product

I want to fetch data from Oracle 8i,
so how do I connect with SQL Server 2005?
I want to use the connection in SQL IS, RS & AS and also perhaps using a
Linked Server.
And what do I need to install on my server?
Any good/bad experience out there'
Please help!Search for
SQL Server 2005 64-bit - Fetch data from Oracle
in microsoft.public.sqlserver.dts
"Olof" wrote:

> I want to fetch data from Oracle 8i,
> so how do I connect with SQL Server 2005?
> I want to use the connection in SQL IS, RS & AS and also perhaps using a
> Linked Server.
> And what do I need to install on my server?
> Any good/bad experience out there'
> Please help!

Connect To Oracle 10g 64 Bit using SQL Server Integration Services 2005 64 Bit

I am trying to create a oracle 10g connection in SSIS using connection manager and i am getting the following error,

Test Connection failed because of an error in initializing provider. Oracle client and networking

components were not found. These components are supplied by Oracle corporation and are part of the

Oracle version 7.3.3 or later client software installation.

Provider is unable to function until these components are installed.

Can someone please help.

Thanks.

If your operating System and VS2005 are 32bits then you need to download and install the Oracle 10g client for Windows 32bits, when I last downloaded it was more than 1gig install it and create your connection to the database make sure your TNS ORA works before adding SSIS connection to Oracle. The client tools are free but you need an Oracle Technet account which you can create for free. The Developer is also free it let you see Oracle tables and databases. If you are in an employer's network I find connecting with Named Pipes is easier than TCP/IP. One more thing watch the installer. Hope this helps.

http://www.oracle.com/technology/software/index.html

I forgot to add you must compile your code with AnyCPU.

|||

Thanks for your reply Caddre..

But.. i have MS 2003 64 bit OS.. i have installed oracle 10g 64 bit server.. i can successfully connect thru sqlplus.. no problem...

I am missing something on SQL 2005 and i am not sure what it is...

|||

So you are saying you have installed Oracle 10g 64bits client tools in the box? I know connecting through SQL plus does not solve development connection issue you need the client tools in your box this time 64bits. Another thing you are not missing anything but I think VS2005 unless you buy 64bits full version is 32bits that is not all your setup is 64bits, so you need to either make it all 64bits or develop in 32bits and deploy in 64bits because I read there are issues known issues.


|||

yes - as far as i know all are 64bit

I cannot connect thru both providers - OLEDB and Net Oracle client

|||

Try this recent Microsoft support article steps, I will still look for more info.

http://support.microsoft.com/kb/255084

|||

Hi Caddre,

Either you can have a look at summarized article here. or You may look for "Getting SSIS Packages To Run On A 64 Bit Box" in Sutha Thiru's Blog .

Thanks

Subhash Subramanyam

|||

thanks subash.. awesome..

those articles helped me to fix the issue...

appreciate yours and caddre help on this..

|||I am glad to see your problem is resolved and Subhash thanks for the articles much appreciated.

Connect to ORACLE

Hello,
I created an ODBC connection to an ORACLE database that works in MS Access.
Now I would like to use the connection to link the tables in SS2K. However,
I can't figure out how to use it in SS2K. Should I be using
"sp_addlinkedserver?"
Any help would be appreciated.
--
Thanks in advance,
StevenYes. sp_addlinkedserver and sp_addlinkedsrvlogin. SQL Server Books Online
has examples specific to setting up Oracle linked servers.
--
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
What hardware is your SQL Server running on?
http://vyaskn.tripod.com/poll.htm
"Steven K" <sckeels@.lucent.com> wrote in message
news:OM5MKoOmDHA.2732@.TK2MSFTNGP11.phx.gbl...
Hello,
I created an ODBC connection to an ORACLE database that works in MS Access.
Now I would like to use the connection to link the tables in SS2K. However,
I can't figure out how to use it in SS2K. Should I be using
"sp_addlinkedserver?"
Any help would be appreciated.
Thanks in advance,
Steven|||Just want to add that you also need to install the Oracle client software on
the SQL Server box. The linked server to Oracle works fine.
You do need to watch out for performance and avoid bringing unnecessary data
to SQL instance for processing. Try to get as much processing done as
possible on Oracle and bring back only the resultset for further processing
on the SQL instance.
--
Linchi Shea
linchi_shea@.NOSPAMml.com
"Narayana Vyas Kondreddi" <answer_me@.hotmail.com> wrote in message
news:eYa6FqOmDHA.2416@.TK2MSFTNGP10.phx.gbl...
> Yes. sp_addlinkedserver and sp_addlinkedsrvlogin. SQL Server Books Online
> has examples specific to setting up Oracle linked servers.
> --
> HTH,
> Vyas, MVP (SQL Server)
> http://vyaskn.tripod.com/
> What hardware is your SQL Server running on?
> http://vyaskn.tripod.com/poll.htm
>
>
> "Steven K" <sckeels@.lucent.com> wrote in message
> news:OM5MKoOmDHA.2732@.TK2MSFTNGP11.phx.gbl...
> Hello,
> I created an ODBC connection to an ORACLE database that works in MS
Access.
> Now I would like to use the connection to link the tables in SS2K.
However,
> I can't figure out how to use it in SS2K. Should I be using
> "sp_addlinkedserver?"
> Any help would be appreciated.
>
> --
> Thanks in advance,
> Steven
>
>sqlsql

Thursday, 22 March 2012

Connect to ms sql server 2000

I just installed ms sql server 2000 and want to make a connection to it. How do I do that? I have created a database with the name Test and a table with the name testTabel.Lookhere for informaiton on connecting.

Lookhere for info on selecting data.|||Thx for support... am trying to connect to db like this:


<%@. Page Language="C#" Debug="true" %>
<%@. import Namespace="System.Data" %>
<%@. import Namespace="System.Data.SqlClient" %>
<script runat="server"
void Page_Load()
{
string strSql = "select FirstName,LastName from Employees";
string strConnection ="server=dbo;";
strConnection += "database=Northwind;uid=sa;password=;";
DataSet objDataSet = new DataSet();
SqlConnection objConnection = new SqlConnection(strConnection);

SqlDataAdapter objDataAdapter = new SqlDataAdapter(strSql,objConnection);

objDataAdapter.Fill(objDataSet,"Employees");

DataView objDataView = new DataView(objDataSet.Tables["Employees"]);

dgrEmployees.DataSource = objDataView;
dgrEmployees.DataBind();
}

</script>
<html>
<head>
</head>
<body>
<form runat="server">
<asp:DataGrid id="dgrEmployees" runat="server"></asp:DataGrid>
</form>
</body>
</html

but I get an exception :

SQL Server findes ikke, eller adgang blev nægtet.
Beskrivelse: Der opstod en ikke-afviklet undtagelse under udførelse af den aktuelle webanmodning. Se staksporingen for at få yderligere oplysninger om fejlen, og hvor den kom fra i koden.

Detaljer om undtagelse: System.Data.SqlClient.SqlException: SQL Server findes ikke, eller adgang blev nægtet.

Kildefejl:

Linje 14: SqlDataAdapter objDataAdapter = new SqlDataAdapter(strSql,objConnection);
Linje 15:
Linje 16: objDataAdapter.Fill(objDataSet,"Employees");
Linje 17:
Linje 18: DataView objDataView = new DataView(objDataSet.Tables["Employees"]);

Kildefil: C:\Documents and Settings\aslan1\Skrivebord\Asp.Net\test1\sql3.aspx Linje: 16

Staksporing:

[SqlException: SQL Server findes ikke, eller adgang blev nægtet.]
System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction) +472
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction) +311
System.Data.SqlClient.SqlConnection.Open() +383
System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState) +44
System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +304
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +77
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +36
ASP.sql3_aspx.Page_Load() in C:\Documents and Settings\aslan1\Skrivebord\Asp.Net\test1\sql3.aspx:16
System.Web.Util.ArglessEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +10
System.Web.UI.Control.OnLoad(EventArgs e) +55
System.Web.UI.Control.LoadRecursive() +27
System.Web.UI.Page.ProcessRequestMain() +731

can U plz tell me why I get this SqlException??|||I cannot understand the output of the exception. My guess is that it is related to security in some way. Is the sa password really blank, or had you sent a correct password in the string on the page but removed it to display here?

I think the string you are using to connect is not quite correct. Try:


string strConnection ="server=dbo;";
strConnection += "database=Northwind;user id=sa;password=;";
|||thx a lot it solved the problem...sqlsql

Connect to Local

Hey Guys,

I have a SQL connection string question. In my web.config I don't know what to put for the server. I have SQL Server 2005 installed locally.

<connectionStrings>
<add name="database" providerName="System.Data.SqlClient" connectionString= "server=whatgoeshere?;database=test;uid=sa;pwd=password" />
</connectionStrings>

I'm using VS 2005.

Thanks in advance.

-Marc

Try:
(local)

|||

thanks for the reply.

I'm trying to see if the connection string works using "local" but I'm having trouble with my code.

When I add this line: Dim sqlConn as new SQLconnection the "SQLconnection" errors.

I've tried importing SQL at the top but still doesn't work. Is there some reference I need to add?

Thanks.

|||

C# is case sensitive.

It should be Dim sqlConn as new SqlConnection();

|||

I'm actually using VB.

On this line: Dim SqlConn as New SqlConnection() the "SqlConnection()" has the blue line under it indicating an error.

I'm trying to figure out if I need to Import a namespace or maybe when I installed VS2005 I did something wrong.

Thanks.

|||

Try importing:
System.Data.SQLClient

|||

augustwind thanks for the help... it works. Using local for the db and using the import you suggested.

I have a quick question that you might be able to anwer. It VS 2003 whenever I would create a new proj it would store it in the C:\Inetpub\wwwroot blah blah blah. But when I create a new proj in VS2005 it saves it somewhere else. Do you know why that is?

Thanks again.

|||

Sorry - I know where - but I don't know why - -

Big Smile

Connect to enterprise manager

WIthin out network were all having issues connecting to SQL server, e.g. it
would allows connection when we can intermitadley connect.
Are the any know firewall issues or other known bugs?Hi,
Might be because of slow network, Try executing the below command from your
cleint PC
Ping <SQL Server IP Address> -t
If you get contineous "Request time out", then inform ur system / network
admin.
Thanks
Hari
MCDBA
"Matthew Burgess" <MatthewBurgess@.discussions.microsoft.com> wrote in
message news:E9A0AF8C-618F-4ECC-9775-0427625883B1@.microsoft.com...
> WIthin out network were all having issues connecting to SQL server, e.g.
> it
> would allows connection when we can intermitadley connect.
> Are the any know firewall issues or other known bugs?|||Hari,
Seems as if it could be that. DB on on internal netowrk are fine. But the
problem db is with our hositng compnay: we have a 2 Meg brodband line
(operating a 1.6mbit/sec).
Any suggest of what I can say to our hositng company? I know our IP are in
there firewall, and thus sometimes we can connect; would a firewall with an
ISP tend to stop ping's?
Other options could be our router or our ISP.
THanks for you help on this!
regards
MAtthew.
"Hari Prasad" wrote:
> Hi,
> Might be because of slow network, Try executing the below command from your
> cleint PC
> Ping <SQL Server IP Address> -t
> If you get contineous "Request time out", then inform ur system / network
> admin.
> Thanks
> Hari
> MCDBA
> "Matthew Burgess" <MatthewBurgess@.discussions.microsoft.com> wrote in
> message news:E9A0AF8C-618F-4ECC-9775-0427625883B1@.microsoft.com...
> > WIthin out network were all having issues connecting to SQL server, e.g.
> > it
> > would allows connection when we can intermitadley connect.
> >
> > Are the any know firewall issues or other known bugs?
>
>|||Hi Matthew
If you're trying to ping a server at your ISP, it can very well be that they
don't allow pinging. In most cases pinging is blocked from outside a
firewall - not only on ISP's but also on most other companies.
I'd suggest that you call your ISP and talk to them about this issue because
you'd need to have the proper ports open to get into your SQL server. I
don't know if they will allow this or not, but if not you might be able to
do it via a VPN connection.
Regards
Steen
Matthew Burgess wrote:
> Hari,
> Seems as if it could be that. DB on on internal netowrk are fine. But
> the problem db is with our hositng compnay: we have a 2 Meg brodband
> line (operating a 1.6mbit/sec).
> Any suggest of what I can say to our hositng company? I know our IP
> are in there firewall, and thus sometimes we can connect; would a
> firewall with an ISP tend to stop ping's?
> Other options could be our router or our ISP.
> THanks for you help on this!
> regards
> MAtthew.
> "Hari Prasad" wrote:
>> Hi,
>> Might be because of slow network, Try executing the below command
>> from your cleint PC
>> Ping <SQL Server IP Address> -t
>> If you get contineous "Request time out", then inform ur system /
>> network admin.
>> Thanks
>> Hari
>> MCDBA
>> "Matthew Burgess" <MatthewBurgess@.discussions.microsoft.com> wrote in
>> message news:E9A0AF8C-618F-4ECC-9775-0427625883B1@.microsoft.com...
>> WIthin out network were all having issues connecting to SQL server,
>> e.g. it
>> would allows connection when we can intermitadley connect.
>> Are the any know firewall issues or other known bugs?|||I got a similar problem in my network but in my case the network connection
goes well until the user opens Enterprise Manager and start working. In some
moment the network connection is lost, PINGing the server will not respond.
My network is not a slow one. This problems occurs for more than one user.
Will you please indicate me how you resolved the problem or any workaround
for this? I am almost decided to format that server with all the work that it
implies and its impact on my users
Thanks
César
> Hi Matthew
> If you're trying to ping a server at your ISP, it can very well be that they
> don't allow pinging. In most cases pinging is blocked from outside a
> firewall - not only on ISP's but also on most other companies.
> I'd suggest that you call your ISP and talk to them about this issue because
> you'd need to have the proper ports open to get into your SQL server. I
> don't know if they will allow this or not, but if not you might be able to
> do it via a VPN connection.
> Regards
> Steen
>
> Matthew Burgess wrote:
> > Hari,
> >
> > Seems as if it could be that. DB on on internal netowrk are fine. But
> > the problem db is with our hositng compnay: we have a 2 Meg brodband
> > line (operating a 1.6mbit/sec).
> >
> > Any suggest of what I can say to our hositng company? I know our IP
> > are in there firewall, and thus sometimes we can connect; would a
> > firewall with an ISP tend to stop ping's?
> >
> > Other options could be our router or our ISP.
> >
> > THanks for you help on this!
> >
> > regards
> >
> > MAtthew.
> >
> > "Hari Prasad" wrote:
> >
> >> Hi,
> >>
> >> Might be because of slow network, Try executing the below command
> >> from your cleint PC
> >>
> >> Ping <SQL Server IP Address> -t
> >>
> >> If you get contineous "Request time out", then inform ur system /
> >> network admin.
> >>
> >> Thanks
> >> Hari
> >> MCDBA
> >>
> >> "Matthew Burgess" <MatthewBurgess@.discussions.microsoft.com> wrote in
> >> message news:E9A0AF8C-618F-4ECC-9775-0427625883B1@.microsoft.com...
> >> WIthin out network were all having issues connecting to SQL server,
> >> e.g. it
> >> would allows connection when we can intermitadley connect.
> >>
> >> Are the any know firewall issues or other known bugs?
>
>|||I have a similar problem. The network connection is OK but when the user
enters Enterprise manager and starts working with some DTS, the connection
with the server is lost. PINGing the server do not respond. It happens in
more than one user. I have changed the redundant NIC but it remains the same.
Will you please give me a hint how did you manage to solve it or if you
tried any workaround for this?
"Steen Persson" wrote:
> Hi Matthew
> If you're trying to ping a server at your ISP, it can very well be that they
> don't allow pinging. In most cases pinging is blocked from outside a
> firewall - not only on ISP's but also on most other companies.
> I'd suggest that you call your ISP and talk to them about this issue because
> you'd need to have the proper ports open to get into your SQL server. I
> don't know if they will allow this or not, but if not you might be able to
> do it via a VPN connection.
> Regards
> Steen
>
> Matthew Burgess wrote:
> > Hari,
> >
> > Seems as if it could be that. DB on on internal netowrk are fine. But
> > the problem db is with our hositng compnay: we have a 2 Meg brodband
> > line (operating a 1.6mbit/sec).
> >
> > Any suggest of what I can say to our hositng company? I know our IP
> > are in there firewall, and thus sometimes we can connect; would a
> > firewall with an ISP tend to stop ping's?
> >
> > Other options could be our router or our ISP.
> >
> > THanks for you help on this!
> >
> > regards
> >
> > MAtthew.
> >
> > "Hari Prasad" wrote:
> >
> >> Hi,
> >>
> >> Might be because of slow network, Try executing the below command
> >> from your cleint PC
> >>
> >> Ping <SQL Server IP Address> -t
> >>
> >> If you get contineous "Request time out", then inform ur system /
> >> network admin.
> >>
> >> Thanks
> >> Hari
> >> MCDBA
> >>
> >> "Matthew Burgess" <MatthewBurgess@.discussions.microsoft.com> wrote in
> >> message news:E9A0AF8C-618F-4ECC-9775-0427625883B1@.microsoft.com...
> >> WIthin out network were all having issues connecting to SQL server,
> >> e.g. it
> >> would allows connection when we can intermitadley connect.
> >>
> >> Are the any know firewall issues or other known bugs?
>
>

Connect to enterprise manager

WIthin out network were all having issues connecting to SQL server, e.g. it
would allows connection when we can intermitadley connect.
Are the any know firewall issues or other known bugs?
Hi,
Might be because of slow network, Try executing the below command from your
cleint PC
Ping <SQL Server IP Address> -t
If you get contineous "Request time out", then inform ur system / network
admin.
Thanks
Hari
MCDBA
"Matthew Burgess" <MatthewBurgess@.discussions.microsoft.com> wrote in
message news:E9A0AF8C-618F-4ECC-9775-0427625883B1@.microsoft.com...
> WIthin out network were all having issues connecting to SQL server, e.g.
> it
> would allows connection when we can intermitadley connect.
> Are the any know firewall issues or other known bugs?
|||Hari,
Seems as if it could be that. DB on on internal netowrk are fine. But the
problem db is with our hositng compnay: we have a 2 Meg brodband line
(operating a 1.6mbit/sec).
Any suggest of what I can say to our hositng company? I know our IP are in
there firewall, and thus sometimes we can connect; would a firewall with an
ISP tend to stop ping's?
Other options could be our router or our ISP.
THanks for you help on this!
regards
MAtthew.
"Hari Prasad" wrote:

> Hi,
> Might be because of slow network, Try executing the below command from your
> cleint PC
> Ping <SQL Server IP Address> -t
> If you get contineous "Request time out", then inform ur system / network
> admin.
> Thanks
> Hari
> MCDBA
> "Matthew Burgess" <MatthewBurgess@.discussions.microsoft.com> wrote in
> message news:E9A0AF8C-618F-4ECC-9775-0427625883B1@.microsoft.com...
>
>
|||Hi Matthew
If you're trying to ping a server at your ISP, it can very well be that they
don't allow pinging. In most cases pinging is blocked from outside a
firewall - not only on ISP's but also on most other companies.
I'd suggest that you call your ISP and talk to them about this issue because
you'd need to have the proper ports open to get into your SQL server. I
don't know if they will allow this or not, but if not you might be able to
do it via a VPN connection.
Regards
Steen
Matthew Burgess wrote:[vbcol=seagreen]
> Hari,
> Seems as if it could be that. DB on on internal netowrk are fine. But
> the problem db is with our hositng compnay: we have a 2 Meg brodband
> line (operating a 1.6mbit/sec).
> Any suggest of what I can say to our hositng company? I know our IP
> are in there firewall, and thus sometimes we can connect; would a
> firewall with an ISP tend to stop ping's?
> Other options could be our router or our ISP.
> THanks for you help on this!
> regards
> MAtthew.
> "Hari Prasad" wrote:
|||I got a similar problem in my network but in my case the network connection
goes well until the user opens Enterprise Manager and start working. In some
moment the network connection is lost, PINGing the server will not respond.
My network is not a slow one. This problems occurs for more than one user.
Will you please indicate me how you resolved the problem or any workaround
for this? I am almost decided to format that server with all the work that it
implies and its impact on my users
Thanks
César
> Hi Matthew
> If you're trying to ping a server at your ISP, it can very well be that they
> don't allow pinging. In most cases pinging is blocked from outside a
> firewall - not only on ISP's but also on most other companies.
> I'd suggest that you call your ISP and talk to them about this issue because
> you'd need to have the proper ports open to get into your SQL server. I
> don't know if they will allow this or not, but if not you might be able to
> do it via a VPN connection.
> Regards
> Steen
>
> Matthew Burgess wrote:
>
>
|||I have a similar problem. The network connection is OK but when the user
enters Enterprise manager and starts working with some DTS, the connection
with the server is lost. PINGing the server do not respond. It happens in
more than one user. I have changed the redundant NIC but it remains the same.
Will you please give me a hint how did you manage to solve it or if you
tried any workaround for this?
"Steen Persson" wrote:

> Hi Matthew
> If you're trying to ping a server at your ISP, it can very well be that they
> don't allow pinging. In most cases pinging is blocked from outside a
> firewall - not only on ISP's but also on most other companies.
> I'd suggest that you call your ISP and talk to them about this issue because
> you'd need to have the proper ports open to get into your SQL server. I
> don't know if they will allow this or not, but if not you might be able to
> do it via a VPN connection.
> Regards
> Steen
>
> Matthew Burgess wrote:
>
>

Tuesday, 20 March 2012

Connect to Database in SQL 2005 Express

I am trying to connect to the sample databases in SQL Express. I am getting this error.

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: Name Pipes Provider, error: 40 - could not open a connection to SQL Server) (Microsoft SQL Server, Error: 53)

I have downloaded and installed AdventureWorks, Northwind, and Pubs. If I have to allow remote connections how do I do that? I am a studen and I am brand new at this.

first ensure the sample database you wish to use is registered (some of the samples must first be attached from the D/L .mdf files).

second startup the SURFACE AREA CONFIG TOOL via the start menu. after the splash screen display click on the configure services and connections link.

select the Remote Connection node in the tree and select the second radio button to enable remote connections.

if you still have problems you should look at the protocols your sql server has enabled and which protocol format you are using to connect.

|||

1. Open SQL Server Configuration Manager under "Microsoft SQL Sever 2005" "Configuration Tools"

2. Navigate to "Sql Server 2005 Network Configuration" --"Protocols for SQL2005"

3. Enable "Shared Memory" , "Named Pipes" & "TCP/IP"

This should solve the problem

|||I figured it out. I feel stupid now. I just had to right click on database and click attach. Then click add. This brought me out to the windows hierarchy where I was able to find the Northwind database and click on it to add it.|||

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: Name Pipes Provider, error: 40 - could not open a connection to SQL Server) (Microsoft SQL Server, Error: 53)

Connect to Database in SQL 2005 Express

I am trying to connect to the sample databases in SQL Express. I am getting this error.

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: Name Pipes Provider, error: 40 - could not open a connection to SQL Server) (Microsoft SQL Server, Error: 53)

I have downloaded and installed AdventureWorks, Northwind, and Pubs. If I have to allow remote connections how do I do that? I am a studen and I am brand new at this.

first ensure the sample database you wish to use is registered (some of the samples must first be attached from the D/L .mdf files).

second startup the SURFACE AREA CONFIG TOOL via the start menu. after the splash screen display click on the configure services and connections link.

select the Remote Connection node in the tree and select the second radio button to enable remote connections.

if you still have problems you should look at the protocols your sql server has enabled and which protocol format you are using to connect.

|||

1. Open SQL Server Configuration Manager under "Microsoft SQL Sever 2005" "Configuration Tools"

2. Navigate to "Sql Server 2005 Network Configuration" --"Protocols for SQL2005"

3. Enable "Shared Memory" , "Named Pipes" & "TCP/IP"

This should solve the problem

|||I figured it out. I feel stupid now. I just had to right click on database and click attach. Then click add. This brought me out to the windows hierarchy where I was able to find the Northwind database and click on it to add it.|||

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: Name Pipes Provider, error: 40 - could not open a connection to SQL Server) (Microsoft SQL Server, Error: 53)

connect to another server from a stored proc

I have a stored proc that receives the connection string detials like servername, dbname, tablename,userid, pwd as parameters. how do i connect to that particular database on that server with the userid and pwd details ?

thanks
D.found my answer..used OPENDATASOURCE.

thanks for anyone that tried.

Connect to Analysis Services 2005 from Excel 2007

I have recently discovered the ability to connect to an Analysis Service 2005 OLAP connection from Excel 2007. It looks and functions great. I do have one thing that am trying to do, however, that I am hoping it has. Does anyone know of a way that from the Pivot field panel, you can see the description metadata that is defined on the measures and dimensions in the Analysis Services cubes? It would be very useful if this come up in a tooltip or something. Otherwise, the business users will need a supplemental document while they are navigating the cubes.

Thanks in advance for your response.

I'd be interested in knowing how to do this as well.|||Sorry Guys, I don't think there is any way of accessing this data using the out-of-the-box functionality in Excel 2007. I even tried using the CUBEMEMBERPROPERTY() function in Excel, but it did not seem to be able to access the intrinsic properties like DESCRIPTION.|||Yikes! I thought Excel 2007 supported all SSAS2005 features? I can't express how useful and how much of a time-saver this feature would be. The "workaround" is that I'd have to create a big ugly document that our business users will have to print out and refer to. Even a simple tooltip that showed the member description in the dimension/measure browser would be immensely useful.

Is this something that we'd need to file w/ MS Connect?|||Thank you for your responses. I suppose I will have to put together a user-friendly on-line reference for people to use. Hopefully a future version will have this feature.|||

Unfortunately I don't think there is a section on Connect for Excel, otherwise this would definitely be the place to lodge such a query. I will see if I can find out if there is an avenue through which such a request can be lodged.

It is not an SSAS issue as the property is present, Excel just does not expose it. It might be possible to extend Excel to display the descriptions, but I have not had a chance to look into this. It would be possible to generate documentation from the meta-data in SSAS BI Documenter (www.bidocumenter.com) does this, but the documentation it produces might be a bit overwhelming for a business user.

sqlsql

Connect to a DSN for data

I have an AS400 system and I created a DSN to see the data on my workstation. The connection works fine. I created the samne connection on the Server that has SQL 2005 installed. What I need to do is to populate the SQL database with tables from the AS400 table but I am having trouble connecting a DSN to the SQL database.

Can anyone offer some advice or a website that could walk me through this?

Hello,

I think you should be using Integration Services for this, Reporting Services does not do any type of data transfer. IS will be able to handle this easily, one connection will be your SQL Server, the other will be a ODBC or OLE DB connection using your DSN.

Hope this helps.

Jarret

Monday, 19 March 2012

Connect timeout?

Hi all
I set the connection timeout property in my connection string but it dosen't
effect.
my connection time out in 30 sec..I set it to above 30
but it dosen't effect..
hi,
perspolis wrote:
> Hi all
> I set the connection timeout property in my connection string but it
> dosen't effect.
> my connection time out in 30 sec..I set it to above 30
> but it dosen't effect..
I usually get the required result(s)..
see http://www.connectionstrings.com/, "read more" frame,
Connect Timeout
-or-
Connection Timeout
, thus,
connection_string = "....;Connection Timeout = n;"
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.bizhttp://italy.mvps.org
DbaMgr2k ver 0.20.0 - DbaMgr ver 0.64.0 and further SQL Tools
-- remove DMO to reply
|||I know how can I use it..but it dosen't have any impact in connection
string..
"Andrea Montanari" <andrea.sqlDMO@.virgilio.it> wrote in message
news:4pukiiFkoabnU1@.individual.net...
> hi,
> perspolis wrote:
> I usually get the required result(s)..
> see http://www.connectionstrings.com/, "read more" frame,
> Connect Timeout
> -or-
> Connection Timeout
> , thus,
> connection_string = "....;Connection Timeout = n;"
> --
> Andrea Montanari (Microsoft MVP - SQL Server)
> http://www.asql.bizhttp://italy.mvps.org
> DbaMgr2k ver 0.20.0 - DbaMgr ver 0.64.0 and further SQL Tools
> -- remove DMO to reply
>
|||hi,
perspolis wrote:
> I know how can I use it..but it dosen't have any impact in connection
> string..
have you read Stefan Berglund answer in other ng?
(BTW, please do not multipost, crosspost instead, if pertinent and required
:D)
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.bizhttp://italy.mvps.org
DbaMgr2k ver 0.20.0 - DbaMgr ver 0.64.0 and further SQL Tools
-- remove DMO to reply

Connect Timeout will not work - SQLOLEDB

It seams as if the Connect Timeout property is not working correctly if the server that one is trying to connect to is down. This is my connection string.

Provider=SQLOLEDB;Pooling=False;Data Source=172.16.136.4;Initial Catalog=Db1;User ID=test;Password=test;Connect Timeout=5;

The timeout is ignored and the connection times out after about 15/20 seconds?

Any ideas?my guess is that your seeing the network connection timeout, not the sql connection timeout...

i.e.

before you can establish a sql connection, you need to establish a network connection|||Yes this seams to be correct , I am now working on a way of checking that the network connection is avaible before issuing a connection. Looking at using some ping routine, Will update this thread with the results

connect timeout , is it works ?..

hye
i set in the connection string "connect timeout=400" and the application send error after 30sec ... why ?

*in the sql server properties , the connection time set to 0 .
*i know the run time of the query is very long , but in this case its doesn't matter :)

You are setting the timeout for the connection, that is, how long does it try to connect before timeout. If you are using a Command object, there is a CommandTimeout property that you can set to allow the command to actually run longer before timeout.

Sunday, 11 March 2012

connect from webservice

I have a webservice I am creating. I am needing to connect to a SQL server on
a different machine using SQL authetication. I have the connection string
located in the machine.config. Could somebody give me a sample of how to use
that connection string to connect to the database from inside a webservice.
It's not any different than connecting from an ASP.NET page so if you know
how to do that, you should be all set. It's not a good practice to place
passwords in a config file so you should look into using Windows
authentication or at the very least encrypt the password in the config file.
Roman
Roman Rehak
http://sqlblog.com/blogs/roman_rehak
"wendld" <GenieLifts@.news.postalias> wrote in message
news:7A009E7B-EE22-4FFC-8B4B-FE870659D985@.microsoft.com...
>I have a webservice I am creating. I am needing to connect to a SQL server
>on
> a different machine using SQL authetication. I have the connection string
> located in the machine.config. Could somebody give me a sample of how to
> use
> that connection string to connect to the database from inside a
> webservice.
|||This is my first attempt at pulling in the connection string from the
machine.config. Windows Authentication is not an option since the database
and webservers are on different domains and a DMZ is in use. I currently have
the SSL encryption on, but have not encrypted the actually value in the
config file (yet). That is the next step after I get the programs working
this way.
"Roman Rehak" wrote:

> It's not any different than connecting from an ASP.NET page so if you know
> how to do that, you should be all set. It's not a good practice to place
> passwords in a config file so you should look into using Windows
> authentication or at the very least encrypt the password in the config file.
> Roman
> --
> Roman Rehak
> http://sqlblog.com/blogs/roman_rehak
>
> "wendld" <GenieLifts@.news.postalias> wrote in message
> news:7A009E7B-EE22-4FFC-8B4B-FE870659D985@.microsoft.com...
>
>
|||in web.config:
<appSettings>
<add key="ConnectionString" value="Data Source=MyServer;Initial
Catalog=AdventureWorks;User Id=MyUser;Password=MyPassword;"/>
</appSettings>
in the web service:
string cnString =
ConfigurationManager.AppSettings.Get("ConnectionSt ring");
Roman
Roman Rehak
http://sqlblog.com/blogs/roman_rehak
"wendld" <GenieLifts@.news.postalias> wrote in message
news:D1B8082F-16ED-47B7-9FD8-C5A1EBF26DED@.microsoft.com...[vbcol=seagreen]
> This is my first attempt at pulling in the connection string from the
> machine.config. Windows Authentication is not an option since the database
> and webservers are on different domains and a DMZ is in use. I currently
> have
> the SSL encryption on, but have not encrypted the actually value in the
> config file (yet). That is the next step after I get the programs working
> this way.
> "Roman Rehak" wrote:
|||I am not using the appSettings section of the web.config. I was planning on
using the connectionstrings section of the machine.config. There will be many
applications using the same connection string and I feel it would be
appropiate to put there, I just don't know how to get to this section.
"Roman Rehak" wrote:

> in web.config:
> <appSettings>
> <add key="ConnectionString" value="Data Source=MyServer;Initial
> Catalog=AdventureWorks;User Id=MyUser;Password=MyPassword;"/>
> </appSettings>
> in the web service:
> string cnString =
> ConfigurationManager.AppSettings.Get("ConnectionSt ring");
> Roman
> --
> Roman Rehak
> http://sqlblog.com/blogs/roman_rehak
>
> "wendld" <GenieLifts@.news.postalias> wrote in message
> news:D1B8082F-16ED-47B7-9FD8-C5A1EBF26DED@.microsoft.com...
>
>
|||The code is the same whether you want to read from machine.config or
web.config. If you have the same value in both, web.config takes precedence.
Here is how you get a connection string from the connectionStrings section:
cnString =
ConfigurationManager.ConnectionStrings["Connection StringAW"].ConnectionString;
Roman
Roman Rehak
http://sqlblog.com/blogs/roman_rehak
"wendld" <GenieLifts@.news.postalias> wrote in message
news:F14C7CAD-93C8-4EA4-8358-9FC2B2E8E681@.microsoft.com...[vbcol=seagreen]
>I am not using the appSettings section of the web.config. I was planning on
> using the connectionstrings section of the machine.config. There will be
> many
> applications using the same connection string and I feel it would be
> appropiate to put there, I just don't know how to get to this section.
> "Roman Rehak" wrote:

connect from webservice

I have a webservice I am creating. I am needing to connect to a SQL server o
n
a different machine using SQL authetication. I have the connection string
located in the machine.config. Could somebody give me a sample of how to use
that connection string to connect to the database from inside a webservice.It's not any different than connecting from an ASP.NET page so if you know
how to do that, you should be all set. It's not a good practice to place
passwords in a config file so you should look into using Windows
authentication or at the very least encrypt the password in the config file.
Roman
Roman Rehak
http://sqlblog.com/blogs/roman_rehak
"wendld" <GenieLifts@.news.postalias> wrote in message
news:7A009E7B-EE22-4FFC-8B4B-FE870659D985@.microsoft.com...
>I have a webservice I am creating. I am needing to connect to a SQL server
>on
> a different machine using SQL authetication. I have the connection string
> located in the machine.config. Could somebody give me a sample of how to
> use
> that connection string to connect to the database from inside a
> webservice.|||This is my first attempt at pulling in the connection string from the
machine.config. Windows Authentication is not an option since the database
and webservers are on different domains and a DMZ is in use. I currently hav
e
the SSL encryption on, but have not encrypted the actually value in the
config file (yet). That is the next step after I get the programs working
this way.
"Roman Rehak" wrote:

> It's not any different than connecting from an ASP.NET page so if you know
> how to do that, you should be all set. It's not a good practice to place
> passwords in a config file so you should look into using Windows
> authentication or at the very least encrypt the password in the config fil
e.
> Roman
> --
> Roman Rehak
> http://sqlblog.com/blogs/roman_rehak
>
> "wendld" <GenieLifts@.news.postalias> wrote in message
> news:7A009E7B-EE22-4FFC-8B4B-FE870659D985@.microsoft.com...
>
>|||in web.config:
<appSettings>
<add key="ConnectionString" value="Data Source=MyServer;Initial
Catalog=AdventureWorks;User Id=MyUser;Password=MyPassword;"/>
</appSettings>
in the web service:
string cnString =
ConfigurationManager.AppSettings.Get("ConnectionString");
Roman
Roman Rehak
http://sqlblog.com/blogs/roman_rehak
"wendld" <GenieLifts@.news.postalias> wrote in message
news:D1B8082F-16ED-47B7-9FD8-C5A1EBF26DED@.microsoft.com...[vbcol=seagreen]
> This is my first attempt at pulling in the connection string from the
> machine.config. Windows Authentication is not an option since the database
> and webservers are on different domains and a DMZ is in use. I currently
> have
> the SSL encryption on, but have not encrypted the actually value in the
> config file (yet). That is the next step after I get the programs working
> this way.
> "Roman Rehak" wrote:
>|||I am not using the appSettings section of the web.config. I was planning on
using the connectionstrings section of the machine.config. There will be man
y
applications using the same connection string and I feel it would be
appropiate to put there, I just don't know how to get to this section.
"Roman Rehak" wrote:

> in web.config:
> <appSettings>
> <add key="ConnectionString" value="Data Source=MyServer;Initial
> Catalog=AdventureWorks;User Id=MyUser;Password=MyPassword;"/>
> </appSettings>
> in the web service:
> string cnString =
> ConfigurationManager.AppSettings.Get("ConnectionString");
> Roman
> --
> Roman Rehak
> http://sqlblog.com/blogs/roman_rehak
>
> "wendld" <GenieLifts@.news.postalias> wrote in message
> news:D1B8082F-16ED-47B7-9FD8-C5A1EBF26DED@.microsoft.com...
>
>|||The code is the same whether you want to read from machine.config or
web.config. If you have the same value in both, web.config takes precedence.
Here is how you get a connection string from the connectionStrings section:
cnString =
ConfigurationManager.ConnectionStrings["ConnectionStringAW"].ConnectionS
tring;
Roman
Roman Rehak
http://sqlblog.com/blogs/roman_rehak
"wendld" <GenieLifts@.news.postalias> wrote in message
news:F14C7CAD-93C8-4EA4-8358-9FC2B2E8E681@.microsoft.com...[vbcol=seagreen]
>I am not using the appSettings section of the web.config. I was planning on
> using the connectionstrings section of the machine.config. There will be
> many
> applications using the same connection string and I feel it would be
> appropiate to put there, I just don't know how to get to this section.
> "Roman Rehak" wrote:
>

Connect from Visual Basic 6 to SQL Server 2005 express

Hi people,
I downloaded sql server 2005 express and I installed it. I have Visual
Basic 6 application, that work with MS access with ado connection. This
connection give me seek and findfirst methods. I want migrate this access db
to sql sever 2005, but i don't make any change in vb6 code (only the
connection).
My first question is, can i connect from vb6 application to sql sever
2005 express? Moreover,how must i connect the application to sql sever and
work with seek and findfirst methods?
If it's possible, you will put a code example to connect...
Thanks!> Hi people,
> I downloaded sql server 2005 express and I installed it. I have Visual
> Basic 6 application, that work with MS access with ado connection. This
> connection give me seek and findfirst methods. I want migrate this access
db
> to sql sever 2005, but i don't make any change in vb6 code (only the
> connection).
> My first question is, can i connect from vb6 application to sql sever
> 2005 express? Moreover,how must i connect the application to sql sever
and
> work with seek and findfirst methods?
> If it's possible, you will put a code example to connect...
> Thanks!
--
You can't use SEEK and FINDFIRST methods against a SQL Server table. Those
methods will only work against an Access Jet database.
You need to use T-SQL statements such as SELECT...WHERE to accomplish
similar results. Code changes are inevitable.
Hope this helps,
--
Eric Cárdenas
Senior support professional
This posting is provided "AS IS" with no warranties, and confers no rights.