Showing posts with label connect. Show all posts
Showing posts with label connect. Show all posts

Sunday, March 25, 2012

A connection remains open after calling Disconnect

Hi,

I would like to be able to connect to a SQL Server using SMO and then reconnect using a different login username and password.

In the following sample code I call svr.ConnectionContext.Disconnect. After the Disconnect call an attempt to change the timeout or any Login properties gives error:

Connection properties cannot be changed after connection has been made

Regards,

Joginder Nahil
www.starprint2000.com

Dim objServer As Server
objServer = New Server()
With objServer.ConnectionContext
.NonPooledConnection = True
.ConnectTimeout = 30
.LoginSecure = True
.Connect()

MsgBox("Connected. Database : " & objServer.Databases(0).Name)

.Disconnect()

' The following line gives error: Connection properties cannot be changed after connection has been made
.ConnectTimeout = 60
.LoginSecure = False
.Login="me"
.Password="pppp"

.Connect()
End With

Hi,

I have found a solution. You have to set the server object to nothing before the ConnectionContext is released and can be re-used as shown below:

Regards,
Joginder Nahil
www.starprint2000.com

Dim objServer As Server
objServer = New Server()

With objServer.ConnectionContext
.NonPooledConnection = True
.ConnectTimeout = 30
.LoginSecure = True
.Connect()

MsgBox("Connected. Database : " & objServer.Databases(0).Name)
.Disconnect()
End With

' Release the Server object only then the Connection is released
objServer= Nothing
objServer = New Server

With objServer.ConnectionContext
.ConnectTimeout = 60
.LoginSecure = False
.Login="me"
.Password="pppp"
.Connect()
End With

Thursday, March 22, 2012

A connection could not be established between networks

While trying to connect SQL server from one network to another I'm suddenly
getting this error message:
A connection could not be established to ServerName.
Reason: Login failed for user '(null)'. Reason: Not associated with a
trusted SQL Server connection..
Please verify SQL Server is running and check your SQL Server registration
properties...
Windows authentication validates. Different logins are used for both
servers, but SQL Server is set to startup using the same login and password.
This login is given administrator rights on both servers.
?
"Steven" <Steven@.discussions.microsoft.com> wrote in message
news:DD3A83A2-71C0-4030-A92A-C7A02BF85AF4@.microsoft.com...
> While trying to connect SQL server from one network to another I'm
suddenly
> getting this error message:
> A connection could not be established to ServerName.
> Reason: Login failed for user '(null)'. Reason: Not associated with a
> trusted SQL Server connection..
That usually means that the user account could not be translated into an SQL
Server login account. Perhaps because the domain\user account does not have
access to the server running SQL Server.

> Please verify SQL Server is running and check your SQL Server registration
> properties...
> Windows authentication validates. Different logins are used for both
> servers, but SQL Server is set to startup using the same login and
password.
> This login is given administrator rights on both servers.
> ?
I'm confused by the last 2 sentences. Are these servers in a domain,
workgroup or simply standalone servers?
Steve
|||There are actually 3 servers: A, B, & C. Server A is in workgroup 1 and
cannot connect to servers B or C. Server B is in workgroup 2 and cannot
connect to server A, but can connect to server C. Server C is in a domain
and connects to server B, but not server A.
Important notes: Servers A runs under the NT login of Admin with a password
of AdminPW1. Servers B and C run under the NT login of Admin with a password
of AdminPW2. All three servers use the start up account of user SQLAdmin
with a password of SQLAdminPW and all three servers are set to use Windows
and SQL Server authentication.
Also, replication is working between servers A and B and between servers A
and C. It's the Ent Man that's not able to connect.
"Steve Thompson" wrote:

> "Steven" <Steven@.discussions.microsoft.com> wrote in message
> news:DD3A83A2-71C0-4030-A92A-C7A02BF85AF4@.microsoft.com...
> suddenly
> That usually means that the user account could not be translated into an SQL
> Server login account. Perhaps because the domain\user account does not have
> access to the server running SQL Server.
> password.
> I'm confused by the last 2 sentences. Are these servers in a domain,
> workgroup or simply standalone servers?
> Steve
>
>

Monday, March 19, 2012

98 Clients not seeing all the data

I have Sql 2k SP3A. When my Windows 98 Clients connect through a
Powerbuilder 9.0 Application, there are some Windows were data is not
displayed. Windows XP and Windows 2K Operating Systems work fine. Using
TCP/IP on everything.
After rebooting a production server everything was fine. Tried rebooting
the Test Server and still having a problem.
Not sure exactly when this started but I have been using Windows 98 Clients
for 2 years on SQL 2K and the same for PowerBuilder 9.0.
Any ideas would be great.PB does not officially support any OS prior to Win2K. You are operating on
borrowed time. That said, it would help to know what the exact query is -
profiler can be used to trace the server side and PB can be used to trace
the client side. It may also be worthwhile to explore using a different
interface to connect (mss, odbc, oledb).
"Mike" <mdunlap@.nospambennettcompany.com> wrote in message
news:Onky$AREEHA.3176@.TK2MSFTNGP12.phx.gbl...
> I have Sql 2k SP3A. When my Windows 98 Clients connect through a
> Powerbuilder 9.0 Application, there are some Windows were data is not
> displayed. Windows XP and Windows 2K Operating Systems work fine. Using
> TCP/IP on everything.
> After rebooting a production server everything was fine. Tried rebooting
> the Test Server and still having a problem.
> Not sure exactly when this started but I have been using Windows 98
Clients
> for 2 years on SQL 2K and the same for PowerBuilder 9.0.
> Any ideas would be great.
>|||Thanks very much for the info. Fuel to have my Manager approve OS upgrades.
Is this PB support also considered for the runtime? I have been running
Windows 98 clients with PB 9.0 runtime for 8 months and can't believe it
just stopped. I will try what you suggested on debugging.
"Scott Morris" <bogus@.bogus.com> wrote in message
news:eQtP3PREEHA.3412@.TK2MSFTNGP10.phx.gbl...
> PB does not officially support any OS prior to Win2K. You are operating
on
> borrowed time. That said, it would help to know what the exact query is -
> profiler can be used to trace the server side and PB can be used to trace
> the client side. It may also be worthwhile to explore using a different
> interface to connect (mss, odbc, oledb).
> "Mike" <mdunlap@.nospambennettcompany.com> wrote in message
> news:Onky$AREEHA.3176@.TK2MSFTNGP12.phx.gbl...
rebooting
> Clients
>|||It just a lucky coincidence that you were able to do so. I believe that the
latest builds (9.01 and later) actually make calls that are not supported by
the unsupported OSes - perhaps related to the memory management changes in
9.01?
"Mike" <mdunlap@.nospambennettcompany.com> wrote in message
news:ewtVS8REEHA.2564@.TK2MSFTNGP11.phx.gbl...
> Thanks very much for the info. Fuel to have my Manager approve OS
upgrades.
> Is this PB support also considered for the runtime? I have been running
> Windows 98 clients with PB 9.0 runtime for 8 months and can't believe it
> just stopped. I will try what you suggested on debugging.
>
> "Scott Morris" <bogus@.bogus.com> wrote in message
> news:eQtP3PREEHA.3412@.TK2MSFTNGP10.phx.gbl...
> on
is -
trace
Using
> rebooting
>

Sunday, March 11, 2012

8 GB database problems with cluster

Hello,

We have a microsoft cluster set up with several different databases, we have 5 different webservers that connect to the databases nad a very frequently visited site. a couple of days back we starrted experiencing a problem when posting data into one of the databases, the specific database is the biggest one we have, just below 8 gb of data ( all of the data is basically in 2 different tables).
we run w2k advanced serve service pack 4 , ms clustering , sqlserver sp3.
we started getting messages of timeouts from the webservers, so the timeout was because data couldnt be posted in the database.

after trying to figure out what the problem was , running dbcc checkdb etc i found no errors, but decided to restore a backup. , i did so and things worked perfect again. but only for a days time.. this of course made me consider database /table size being a problem, i now deleted the tables that contained the data and scripted new ones, that "solved" the problem of being able to post data , BUT, we need to have the other data in there as well. i am a bit at a loss now , an clues out there?

Friendly Regards

DavidTry a bit of a test. Run profiler on your new system with no data, and run some of the update statements that were timing out. Then, go to a test system (hopefully with all of the 8GB of data), and run the same profiler trace, and same updates on that database. If the durations of each update are wildly off, you may need to add an index in order to boost performance. This will take some experimenting on the test server.

If the durations are not very far off, then you may have a blocking problem. Look for big reports, or select statements that are grabbing large portions of these big tables. Good luck.

Thursday, March 8, 2012

7.0 difficulties CONNECTING the server once it is loaded

first time using community:
I loaded 7.0 last night but when I tried to connect i
could not. error message:
unable to connect to server \\16UDJ
OBDC: Msg 0, level 16, State 1
[Microsoft][OBDC sql service driver]timeout expired
DOES ANYONE KNOW WHAT WOULD CAUSE THIS.
I AM USING SQL ON MY LOCAL LAPTOP ONLYI am running windows 98 but office 2000
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Friday, February 24, 2012

64 bit Implementation, and Linked Server to Access DB

Can anyone suggest a method to connect to an Access DB from 64 bit
implementation of Yukon ?
Regardless of whether I use Linked Servers or Opendatasource I get the
following error:
"The OLE DB provider "MICROSOFT.JET.OLEDB.4.0" has not been
registered."
If there isn't a 64 bit driver available ..what alternative mechanisms
are available to load data from Access ?
TIAThere is unfortunately no 64-bit version of Jet. You'll need to use a
32-bit version to move your data.
Conor
"MJKulangara" <RutgersDBA@.gmail.com> wrote in message
news:1151430037.910336.142450@.x69g2000cwx.googlegroups.com...
> Can anyone suggest a method to connect to an Access DB from 64 bit
> implementation of Yukon ?
> Regardless of whether I use Linked Servers or Opendatasource I get the
> following error:
> "The OLE DB provider "MICROSOFT.JET.OLEDB.4.0" has not been
> registered."
> If there isn't a 64 bit driver available ..what alternative mechanisms
> are available to load data from Access ?
> TIA
>

64 bit Implementation, and Linked Server to Access DB

Can anyone suggest a method to connect to an Access DB from 64 bit
implementation of Yukon ?
Regardless of whether I use Linked Servers or Opendatasource I get the
following error:
"The OLE DB provider "MICROSOFT.JET.OLEDB.4.0" has not been
registered."
If there isn't a 64 bit driver available ..what alternative mechanisms
are available to load data from Access ?
TIAThere is unfortunately no 64-bit version of Jet. You'll need to use a
32-bit version to move your data.
Conor
"MJKulangara" <RutgersDBA@.gmail.com> wrote in message
news:1151430037.910336.142450@.x69g2000cwx.googlegroups.com...
> Can anyone suggest a method to connect to an Access DB from 64 bit
> implementation of Yukon ?
> Regardless of whether I use Linked Servers or Opendatasource I get the
> following error:
> "The OLE DB provider "MICROSOFT.JET.OLEDB.4.0" has not been
> registered."
> If there isn't a 64 bit driver available ..what alternative mechanisms
> are available to load data from Access ?
> TIA
>|||There is unfortunately no 64-bit version of Jet. You'll need to use a
32-bit version to move your data.
Conor
"MJKulangara" <RutgersDBA@.gmail.com> wrote in message
news:1151430037.910336.142450@.x69g2000cwx.googlegroups.com...
> Can anyone suggest a method to connect to an Access DB from 64 bit
> implementation of Yukon ?
> Regardless of whether I use Linked Servers or Opendatasource I get the
> following error:
> "The OLE DB provider "MICROSOFT.JET.OLEDB.4.0" has not been
> registered."
> If there isn't a 64 bit driver available ..what alternative mechanisms
> are available to load data from Access ?
> TIA
>

64 bit cluster cannot connect using dtutil

Hi,

I have a 64 bit Itanium SQL Cluster that I'm trying to set up. The database engine seems fine, but I'm trying to install some SSIS packages using dtUtil and I keep getting a connection error. The error is as follows

"Login timeout expired

An error has occured 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 seetings SQL Server does not allow remote connections.

Named Pipes Provider: Could not open a connection to SQL Server [2}. (Microsoft SQL Native Client)"

Also, in Management studio, I can make a connection to my SSIS Server, but when I go down to the MSDB folder to look at packages I get the same connection error.

I think I was able to deploy a package using the Deployment Manifest created by VS, but I'm not sure because I can't see the package in Mgt Studio.

It almost seems like it may be related to the cluster. I'm connected in to one of the Servers using Terminal Services. But I am trying to connect to the Cluster name in Mgt Studio.

Any thoughts/ideas/Solutions greatly appreciated.

Thanks.

Andy

Another note, I was able to get the dtUtil working by using the argument /DestS, which is the destination server, and specifying the cluster name. However, I still have the issue that I can't actually use Management Studio to view these packages, I still get the above error. I'm able to run my packages using SQL Server Agent, and when I go to create a job that calls an ssis package, I'm able to see the list of packages installed on the cluster?!?! Very weird.

My main issue is I can't use Management studio to Manage my packages. Help!

Andy

|||

I found the problem. Because of the cluster, the MsDtsSrvr.ini.xml file had a "." for the servername (I found this from another post that was due to 2 instances on a machine. I had to change the "." to our cluster name and now it works fine.

|||

Hi,

Question for you - in your case Ingration Service runs under cluster? In my case I installed IS on 2 nodes separately, runs as a service and when I changed MsDtsSrvr.ini.xml to PC/node name, restart service it did not work. But when I changed in ini names of folder itself it presents on IS management studio.

Thanks

64 bit cluster cannot connect using dtutil

Hi,

I have a 64 bit Itanium SQL Cluster that I'm trying to set up. The database engine seems fine, but I'm trying to install some SSIS packages using dtUtil and I keep getting a connection error. The error is as follows

"Login timeout expired

An error has occured 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 seetings SQL Server does not allow remote connections.

Named Pipes Provider: Could not open a connection to SQL Server [2}. (Microsoft SQL Native Client)"

Also, in Management studio, I can make a connection to my SSIS Server, but when I go down to the MSDB folder to look at packages I get the same connection error.

I think I was able to deploy a package using the Deployment Manifest created by VS, but I'm not sure because I can't see the package in Mgt Studio.

It almost seems like it may be related to the cluster. I'm connected in to one of the Servers using Terminal Services. But I am trying to connect to the Cluster name in Mgt Studio.

Any thoughts/ideas/Solutions greatly appreciated.

Thanks.

Andy

Another note, I was able to get the dtUtil working by using the argument /DestS, which is the destination server, and specifying the cluster name. However, I still have the issue that I can't actually use Management Studio to view these packages, I still get the above error. I'm able to run my packages using SQL Server Agent, and when I go to create a job that calls an ssis package, I'm able to see the list of packages installed on the cluster?!?! Very weird.

My main issue is I can't use Management studio to Manage my packages. Help!

Andy

|||

I found the problem. Because of the cluster, the MsDtsSrvr.ini.xml file had a "." for the servername (I found this from another post that was due to 2 instances on a machine. I had to change the "." to our cluster name and now it works fine.

|||

Hi,

Question for you - in your case Ingration Service runs under cluster? In my case I installed IS on 2 nodes separately, runs as a service and when I changed MsDtsSrvr.ini.xml to PC/node name, restart service it did not work. But when I changed in ini names of folder itself it presents on IS management studio.

Thanks

Sunday, February 19, 2012

6.5 connectivity to 2000

Is it safe to use 6.5 connectivity on a 95 machine to
connect to a SQL 2000 installation on Win 2K?Hi,
No issues. You can execute all commands. Only demerit is that you wont get
the GUI facilities available in SQL 2000 client.
FYI, You cant use SQL 6.5 enterprise manager to connect to SQL 2000. Only
ISQLW can be used .
Hari
"Mark Walker" <anonymous@.discussions.microsoft.com> wrote in message
news:254101c3fc6a$25446c80$a101280a@.phx.gbl...
> Is it safe to use 6.5 connectivity on a 95 machine to
> connect to a SQL 2000 installation on Win 2K?|||... and since 6.5 ISQL.EXE and ISQLW.EXE uses DbLibrary, some of the new
stuff in 7.0/2000 will not be available. Such includes longer strings than
255 characters, Unicode, uniqueidentifier etc.
--
Tibor Karaszi, SQL Server MVP
Archive at:
http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"Hari" <hari_prasad_k@.hotmail.com> wrote in message
news:%2387UBvG$DHA.2520@.TK2MSFTNGP11.phx.gbl...
> Hi,
> No issues. You can execute all commands. Only demerit is that you wont get
> the GUI facilities available in SQL 2000 client.
> FYI, You cant use SQL 6.5 enterprise manager to connect to SQL 2000. Only
> ISQLW can be used .
>
> Hari
> "Mark Walker" <anonymous@.discussions.microsoft.com> wrote in message
> news:254101c3fc6a$25446c80$a101280a@.phx.gbl...
> > Is it safe to use 6.5 connectivity on a 95 machine to
> > connect to a SQL 2000 installation on Win 2K?
>

Thursday, February 16, 2012

501 when connect to Endpoint

I Created SP and endpoint that exposes SP as web service :

CREATE PROCEDURE TimeServer.ResponseTime2
(
@.TimeType int,
)
AS
IF (@.TimeType = 0 )
SELECT @.Result AS CZAS
ELSE
SELECT @.Result AS CZAS
GO
CREATE ENDPOINT MyWebService
STATE = STARTED
AS HTTP
(
PATH = '/AdventureWorks/MyWebService',
AUTHENTICATION = (INTEGRATED ),
PORTS = ( CLEAR ),
SITE = 'localhost'
)
FOR SOAP
(
WEBMETHOD 'GetTime' (Name = 'AdventureWorks.TimeServer.ResponseTime2', FORMAT = ROWSETS_ONLY),
DATABASE = 'AdventureWorks'
)

GO

When I try to connect to webservice (localhost/AdventureWorks/MyWebServic
I get 501 error - Not implemented or not supported.

Any ideas why ?

I don't know if this answers your question. However, we support HTTP GET requests ONLY for requesting WSDL. In this case if you submitted the following request

http://localhost/AdventureWorks/MyWebService?wsdl

it should return WSDL describing the endpoint.

The rest of the SOAP requests have to be submitted via HTTP POST.

Thanks
Srik

|||

I was also getting this at one point. Try going into IE browser->Tools->Internet Options->Advanced and enable "Use HTTP 1.1 through proxy connections" if this is not set (may be related to proxy settings associated wih IE Browser->Connections->LAN Settings)

501 when connect to Endpoint

I Created SP and endpoint that exposes SP as web service :

CREATE PROCEDURE TimeServer.ResponseTime2
(
@.TimeType int,
)
AS
IF (@.TimeType = 0 )
SELECT @.Result AS CZAS
ELSE
SELECT @.Result AS CZAS
GO
CREATE ENDPOINT MyWebService
STATE = STARTED
AS HTTP
(
PATH = '/AdventureWorks/MyWebService',
AUTHENTICATION = (INTEGRATED ),
PORTS = ( CLEAR ),
SITE = 'localhost'
)
FOR SOAP
(
WEBMETHOD 'GetTime' (Name = 'AdventureWorks.TimeServer.ResponseTime2', FORMAT = ROWSETS_ONLY),
DATABASE = 'AdventureWorks'
)

GO

When I try to connect to webservice (localhost/AdventureWorks/MyWebServic
I get 501 error - Not implemented or not supported.

Any ideas why ?

I don't know if this answers your question. However, we support HTTP GET requests ONLY for requesting WSDL. In this case if you submitted the following request

http://localhost/AdventureWorks/MyWebService?wsdl

it should return WSDL describing the endpoint.

The rest of the SOAP requests have to be submitted via HTTP POST.

Thanks
Srik

|||

I was also getting this at one point. Try going into IE browser->Tools->Internet Options->Advanced and enable "Use HTTP 1.1 through proxy connections" if this is not set (may be related to proxy settings associated wih IE Browser->Connections->LAN Settings)

Saturday, February 11, 2012

3-way replication?

Hello,
I currently have a database set up for replication on 3 servers as
follows:
Pub - users connect and update database
Sub1 - database is accessed for local application
Sub2 - database is accessed for local application
The subscriptions are set up for both immediate and queued updating, so,
in theory, if Pub goes down, the users can re-connect to Sub1 to update
the database, and when Pub comes back, the queued updating will apply
the changes to Pub. Also, during the time Pub is down, the local
application on Sub1 will have access to current data.
However, as I understand it, Sub2 will not have access to the latest
data while Pub is down, since the only way those changes make it to Sub2
is through Pub. So, Sub2 will be accessing "old" data as long as Pub is
unable to send the changes.
Do I have this right ? Is there a simple way to get Sub1 to update Sub2
when Pub is down ? As it is now configured, it's kind of a pain in the
neck to manage the replication when we have to make a change to the
database definition, and I also want people to be able to update at Sub2
and have the changes propagate to Sub1 and Pub, in the event that
becomes necessary. But I don't want to create a structure that is a
nightmare to manage.
Any suggestions ?
Thanks,
Patrick
No, there is no simple way to do this.
Replication requires a publisher which figures out what goes where.
What you could do is have Pub publish to Sub1, and then have Sub1 publish to
Sub2. I would use merge replication for this.
Why are you using immediate updating?
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Patrick Johnson" <PJohnson_TechnoScope@.nospam.com> wrote in message
news:PJohnson_TechnoScope-09A593.15383717022005@.msnews.microsoft.com...
> Hello,
> I currently have a database set up for replication on 3 servers as
> follows:
> Pub - users connect and update database
> Sub1 - database is accessed for local application
> Sub2 - database is accessed for local application
> The subscriptions are set up for both immediate and queued updating, so,
> in theory, if Pub goes down, the users can re-connect to Sub1 to update
> the database, and when Pub comes back, the queued updating will apply
> the changes to Pub. Also, during the time Pub is down, the local
> application on Sub1 will have access to current data.
> However, as I understand it, Sub2 will not have access to the latest
> data while Pub is down, since the only way those changes make it to Sub2
> is through Pub. So, Sub2 will be accessing "old" data as long as Pub is
> unable to send the changes.
> Do I have this right ? Is there a simple way to get Sub1 to update Sub2
> when Pub is down ? As it is now configured, it's kind of a pain in the
> neck to manage the replication when we have to make a change to the
> database definition, and I also want people to be able to update at Sub2
> and have the changes propagate to Sub1 and Pub, in the event that
> becomes necessary. But I don't want to create a structure that is a
> nightmare to manage.
> Any suggestions ?
> Thanks,
> Patrick
|||In article <uHp4mjTFFHA.1264@.TK2MSFTNGP12.phx.gbl>,
"Hilary Cotter" <hilary.cotter@.gmail.com> wrote:

> No, there is no simple way to do this.
> Replication requires a publisher which figures out what goes where.
> What you could do is have Pub publish to Sub1, and then have Sub1 publish to
> Sub2. I would use merge replication for this.
> Why are you using immediate updating?
Hi Hilary,
Thanks for your reply.
I have all of the users updating at Pub right now, so conceivably I
could get away without immediate updating, but the intent is that local
updates can be made at Sub1 and Sub2 and propagated immediately through
the system.
In practice it is a rare event for an update to happen someplace other
than at Pub.
Is immediate updating a bad idea ?
It's been a while since I set it up, but I remember there was some
reason I didn't want to use merge. Of course, now I can't remember what
it was.
Thanks,
Patrick