Showing posts with label ole. Show all posts
Showing posts with label ole. Show all posts

Tuesday, March 20, 2012

Connection managers - OLE DB

Hi There

Quick question.In DTS when you had multiples tasks connecting to the same Database, it was reccomended that you create multiple connections for the same database and let each task use a different connection, thereby making a new connection for each one.
In SSIS if i define 1 OLE DB connection to a database, but i have say 6 tasks using that connection that run simultaneously, does eachone open a new connection to the database to make it more efficient? Or do i still need to define multiple connections to the same database and assign each task a different connection?

Thanx

SeanDL wrote:

Hi There

Quick question.In DTS when you had multiples tasks connecting to the same Database, it was reccomended that you create multiple connections for the same database and let each task use a different connection, thereby making a new connection for each one.
In SSIS if i define 1 OLE DB connection to a database, but i have say 6 tasks using that connection that run simultaneously, does eachone open a new connection to the database to make it more efficient? Or do i still need to define multiple connections to the same database and assign each task a different connection?

Thanx

Sean,
In that situation each of the 6 tasks will use the same connection as far as I know. I guess this is why the connection managers are so called - its because they manage a single connection thereby enabling many tasks to use it.

I'm no DBA but I suspect that this is more efficient than opening multiple connections.

-Jamie|||Hi Jamie

In DTS it was definately better to use multiple connections when extracting large amounts of data from each connection.But no mention has been made of it in SSIS, i guess i could do some tests myself to see if it helps performance?

Thanx|||I'd be interested in seeing any metrics you get.

I don't claim to know much about DTS but I suspect that there are different reasons that multiple connections are recommended that outweigh the benefit of only having 1 connection to the server.
I also suspect that even if one connection object were used each task that used it would still have its own connection (I stand to be corrected here). This is not the case with SSIS.

-Jamie|||Sean, the reason connection managers are called that is to distinguish them from connections as named in DTS. The reason it was recommended to use multiple connections in DTS is because workflow would be serialized if pointing to the same connection. Connection managers actually generate a new connection everytime you call AcquireConnection so the workflow isn't serialized. Each task or transform etc. that calls AcquireConnection on the connection manager receives a new physical connection.
So, for SSIS, just use one connection manager. Also, consider using Data Sources and Data Source views for your OLEDB connections. I blogged about it a bit recently. That simplifies matters even more and makes your packages that much more portable.
Thanks,|||Kirk,
Right then, I'm a wee bit confused. I'll tell you why.

I was recently working on a package where I had an Execute SQL Task followed by a data-flow which extracted from a SQL Server DB. Both tasks used the same connection manager.
In the Execute SQL Task there was a SET ROWCOUNT 20000 statement. When I ran the package, the data-flow only processed 20000 rows - obviously because it was affected by the SET ROWCOUNT command in the previous task.

Now, if both tasks had seperate connections that wouldn't happen. Or would it? I've done a quick scan of google to find out if I could find out the scope of SET ROWCOUNT but couldn't find anything (and its getting late :)

Any ideas?

-Jamie|||Hi Kirk

Thanx for the info, that is what i thought but i just could not find any documentation to verify it.

Although Jamies issue is a bit worrying because set rowcount's scope is definately within a connection/transaction?

Thanx|||Hi Kirk

Ok i am also still confused, my concurrent connections (5 of them) using the same conenction manager we all executing in parrellel, then i changed the connection manager to use the OLE DB for SQL Server NOT the native client that iw as using), now only 3 of the 5 tasks execute concurrently when 1 finishes the next one starts.Therefore it seems only 3 concurrent conenctions are allowed, i have checked BOL , but i cannot find where this setting is as i would like all tasks to run in parallel, if you know it would be greatly appreciated.

Thanx|||Check the MaxConcurrentExecutables property of the package by clicking on the package design surface and then looking at the properties. If it's set to -1, the heuristic used to determine max executables is n+2, where n is the number of processors.
Change it to a higher number and watch them all fly together. :)
K|||Thanx Kirk

Spot on , i did see that setting but i thought -1 was unlimited.Thanx A million works like a bomb !|||

Jamie Thomson wrote:

Kirk,
Right then, I'm a wee bit confused. I'll tell you why.

I was recently working on a package where I had an Execute SQL Task followed by a data-flow which extracted from a SQL Server DB. Both tasks used the same connection manager.
In the Execute SQL Task there was a SET ROWCOUNT 20000 statement. When I ran the package, the data-flow only processed 20000 rows - obviously because it was affected by the SET ROWCOUNT command in the previous task.

Now, if both tasks had seperate connections that wouldn't happen. Or would it? I've done a quick scan of google to find out if I could find out the scope of SET ROWCOUNT but couldn't find anything (and its getting late :)

Any ideas?

-Jamie

OK, I've just built a simple mock-up to demo this and lo and behold it doesn't happen anymore. Setting rowcount in the Excute SQL Task didn't affect the dataflow.
I swear that when I did this before though it DID affect the data-flow...and I have witnesses to prove it. It occurred on April CTP whereas I am now using June CTP. perhaps that's why!!!

For now, ignore this. If it happens again I'll raise it.

Weird!!

-Jamie|||Did you have retain same connection set to true?
I don't have a good answer here. Without looking at the package, it's hard to know for sure.|||Yes, did so myself. Couldn't repro it either...

Connection manager permission issue

Hi there,

I apologize upfront if this is an old issue but i couldn't find the solution after searching quite a bit.

I have a OLE db connection manager and an ADO.net db connection manager and both of them fail when i run them in VS dev environment:

Connection may not be configured correctly or you may not have the right permissions on this connection

When I set up my connection managers, they do connect fine but no matter which one i try to use with an Execute sql task, the above error keeps popping up.

The connection managers are both set up to use SQL Authentication and the database is not on my local machine but instead on a server and my package security is set to 'DontSaveSensitive'. I have not yet deployed so this is all in my VS.net dev environment where it's failing.

I have also turned off the firewall on both the development server and my pc. All I want to be able to do is let the connection managers point the the dev server as the db is on there.

Any suggestions?

Regards
Mike
Hi,

I found a solution for the problem and thought it might be useful to post it for those that seek to develop using a remote dev server that contains the database.

I declared a variable that contained the connectionstring for the specific connection manager (note that the ado.Net connection string will look slightly different than oledb for instance) and in the connection manager's expression property pointed it to the variable.

I got pointed into this direction by reading the article 'Suggested best practices' by Jamie Thomson :
http://blogs.conchango.com/jamiethomson/archive/2006/01/05/2554.aspx

Thanks for that excellent article Jamie
Regards
Michael

connection manager in SQL 2005

I am writing a new Ole DB connection thru connection manager in Visual
Studio in SQL 2005. I used Native OLE DB\MS Jet 4.0 OLE DB Provider and I
specify a database path as d:\temp\database.dbf and set up the extended
proporties in advance tab to dBase 5.0 and when I click "test connection"
button, I gives me an error:
"Test connection failed because of an error in initializing provider.
'd:\temp\database.dbf ' is not a valid path. Mare sure that path name is
spelled correctly and that you are connected to the server on which the file
resided. "
I used browser button to get the file and path and therefore I am sure it is
correct. Can anyone please help to fix this problem? Many thanks.
Hi
"00EricClapton" wrote:

> I am writing a new Ole DB connection thru connection manager in Visual
> Studio in SQL 2005. I used Native OLE DB\MS Jet 4.0 OLE DB Provider and I
> specify a database path as d:\temp\database.dbf and set up the extended
> proporties in advance tab to dBase 5.0 and when I click "test connection"
> button, I gives me an error:
> "Test connection failed because of an error in initializing provider.
> 'd:\temp\database.dbf ' is not a valid path. Mare sure that path name is
> spelled correctly and that you are connected to the server on which the file
> resided. "
>
> I used browser button to get the file and path and therefore I am sure it is
> correct. Can anyone please help to fix this problem? Many thanks.
>
Are you sure that the file has the correct permissions and is not locked by
another application?
John

connection manager in SQL 2005

I am writing a new Ole DB connection thru connection manager in Visual
Studio in SQL 2005. I used Native OLE DB\MS Jet 4.0 OLE DB Provider and I
specify a database path as d:\temp\database.dbf and set up the extended
proporties in advance tab to dBase 5.0 and when I click "test connection"
button, I gives me an error:
"Test connection failed because of an error in initializing provider.
'd:\temp\database.dbf ' is not a valid path. Mare sure that path name is
spelled correctly and that you are connected to the server on which the file
resided. "
I used browser button to get the file and path and therefore I am sure it is
correct. Can anyone please help to fix this problem? Many thanks.Hi
"00EricClapton" wrote:

> I am writing a new Ole DB connection thru connection manager in Visual
> Studio in SQL 2005. I used Native OLE DB\MS Jet 4.0 OLE DB Provider and I
> specify a database path as d:\temp\database.dbf and set up the extended
> proporties in advance tab to dBase 5.0 and when I click "test connection"
> button, I gives me an error:
> "Test connection failed because of an error in initializing provider.
> 'd:\temp\database.dbf ' is not a valid path. Mare sure that path name is
> spelled correctly and that you are connected to the server on which the fi
le
> resided. "
>
> I used browser button to get the file and path and therefore I am sure it
is
> correct. Can anyone please help to fix this problem? Many thanks.
>
Are you sure that the file has the correct permissions and is not locked by
another application?
John

connection manager in SQL 2005

I am writing a new Ole DB connection thru connection manager in Visual
Studio in SQL 2005. I used Native OLE DB\MS Jet 4.0 OLE DB Provider and I
specify a database path as d:\temp\database.dbf and set up the extended
proporties in advance tab to dBase 5.0 and when I click "test connection"
button, I gives me an error:
"Test connection failed because of an error in initializing provider.
'd:\temp\database.dbf ' is not a valid path. Mare sure that path name is
spelled correctly and that you are connected to the server on which the file
resided. "
I used browser button to get the file and path and therefore I am sure it is
correct. Can anyone please help to fix this problem? Many thanks.Hi
"00EricClapton" wrote:
> I am writing a new Ole DB connection thru connection manager in Visual
> Studio in SQL 2005. I used Native OLE DB\MS Jet 4.0 OLE DB Provider and I
> specify a database path as d:\temp\database.dbf and set up the extended
> proporties in advance tab to dBase 5.0 and when I click "test connection"
> button, I gives me an error:
> "Test connection failed because of an error in initializing provider.
> 'd:\temp\database.dbf ' is not a valid path. Mare sure that path name is
> spelled correctly and that you are connected to the server on which the file
> resided. "
>
> I used browser button to get the file and path and therefore I am sure it is
> correct. Can anyone please help to fix this problem? Many thanks.
>
Are you sure that the file has the correct permissions and is not locked by
another application?
John

Monday, March 19, 2012

Connection Manager - No available servers

Hi

Windows XP Pro, SQL Server 2005 (Developer) & Visual Studio 2005 (Pro)

New SSIS project (Visual Studio)

New OLE DB/SQL Native client connection.

There's no servers available in the drop down box.

All the services that need to be running are running.

Guess I've missed the obvious here

Cheers

Dave

Hi,

did you try to enter the nae manually ?

HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de

|||Yes I did. Will re-try and then post the error.|||

Just tried entering the name manually and it worked...

Any ideas why I can't browse to the instance/server?

|||Do you use another port than the default one 1433 ? If so, you will have to make sure that SQL Server browser is started. What for ? See the link here for more information about the SQL Browser.

http://msdn2.microsoft.com/en-us/library/ms181087.aspx

HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de

Saturday, February 25, 2012

Connection error ( from MS Analysis to Applix TM1)

Hi All,

I am trying to connect from MS Analysis Services 2000 to Applix TM1.
Applix has got Applix OLE DB MD Prodiver.It is installed on my machine.
I create a datasource in MSAS.
In Data Link I can see the this Applix OLE DD driver and I choose it. Then I can see Applix login and password screen. Then I logged in. When I test my connection, the connection is succeed.
But when I create a cube from data source,it gets an error message as below;

Connection teamnb-cem data source failed.
Object or provider is not capable of performing requested operation
Do you want to retry_?

How can I fix it?

BEst Regards

Cem DAGLI

AS2000 has list of supported providers, and TM1 is not one of them. There are many requirements for OLEDB provider to work properly with AS2000, so I am not optimistic you will succeed with this kind of direct connection. I suggest exporting data from TM1 cube into SQL Server first, and then processing AS2000 cube off SQL Server.|||

Dear Mosha,

I am using Applix OLE DB MD Provider. Not Microsoft providers.
When you install Applix , you have Applix OLE DB MD provider. I connected from Excel to Applix TM1.
But for AS2000 not.

Does AS2005 support Applix OLE DB MD Provider? If I try it from MSAS 2005 ,can I connect it?

Best Regards
Cem dAGLI

|||So, what exactly do you mean when you say "Connect AS2000 to Applix". The only way AS2000 "connects" to external databases is for processing or ROLAP, and there is a list of supported providers (SQL Server, Oracle etc) - Applix is not on that list.|||

Dear Mosha,

I mean connect from MSAS 2000 to Applix TM1 OLAP Server.

There is a Applix OLE DB MD Provider in Data Link screen in MSAS 2000. The Driver is provided by Applix.
I also connected from MS Excel to Applix OLAP server with this driver.
If you send me your e-mail , I will send all printed screen in MSAS 2000.

Best Regards

Cem DAGLI

|||

Cem

Unfortunately, you don't make yourself clear - you just repeated the information that you already provided earlier. The only way the statement "connect MSAS 2000 to Applix TM1 OLAP Server" can be interpreted is that you try to process MSAS cube out of the TM1 cube, and use Applix OLEDB provider for that. As I explained above - this is not supported scenario. If you have some clarifying screenshots - please attach them to this post.

|||

Hi Mosha,

I need to extract some data from Applix TM1 cubes into MS SQL Server. Here are the steps i tried to create a connection in MS SQL 2000 DTS package using Applix TM1 OLE DB MD Provider (v8.4.2).

1) Create a new DTS package
2) Add Connection Properties. Applix TM1 OLE DB MD Provider is not listed in the 'Data Source' list. So i choose Microsoft OLE DB Provider for OLAP Services 8.0

3) Click Properties...

4) On Provider tab, choose Applix TM1 OLE DB MD Provider.

5) On Connection tab, specify the TM1 server location & instance. Test Connection is successful.

6) Click OK to complete the configuration.

When i edit the connection properties again, the provider reverts to Micosoft OLMicrosoft OLE DB Provider for OLAP Services 8.0. It doesn't seem to save the configuration done above.

Could you please shed some lights on how to get this to work? Thanks a lot.

Friday, February 24, 2012

Connection Bombs Out at 3900+ records

I have a customer who's running an application that's using an OLE DB
connection to the database and when retrieving records a counter shows on th
e
screen. As soon as the count reaches somewhere between 3900 and 4000 the
counting stops and the grid never fills. The message received is as follows:
[Custom Message from application saying error has occurred]
-2147467259[DBNETLIB][ConnectionOpen(Connect()).]SQL Server does not
exist
or access denied.
Is this a timing out or connection pooling problem? I'm sorry but I don't
have the particulars about versions, systems, etc. because I've received the
question from someone else. Could you just give me an educated guess at what
the problem might be so I can start troubleshooting in the right direction?
Apparently the customer just had a problem with the log file being full so
they moved it to another server. Could this have caused a problem? This is a
very large location so I assume the dba(s) know what they are doing. Could
they have limited the number of records that can be returned?
Thanks for any help you can give.
--
GinnySearch no further...
http://support.microsoft.com/defaul...kb;en-us;328476
Note, this answer took forever to find so I'm posting everywhere...|||Thanks. I will pass on the link to the customer.
--
Ginny
"alorentz" wrote:

> Search no further...
> http://support.microsoft.com/defaul...kb;en-us;328476
> Note, this answer took forever to find so I'm posting everywhere...
>

Connection Bombs Out at 3900+ records

I have a customer who's running an application that's using an OLE DB
connection to the database and when retrieving records a counter shows on the
screen. As soon as the count reaches somewhere between 3900 and 4000 the
counting stops and the grid never fills. The message received is as follows:
[Custom Message from application saying error has occurred]
-2147467259[DBNETLIB][ConnectionOpen(Connect()).]SQL Server does not exist
or access denied.
Is this a timing out or connection pooling problem? I'm sorry but I don't
have the particulars about versions, systems, etc. because I've received the
question from someone else. Could you just give me an educated guess at what
the problem might be so I can start troubleshooting in the right direction?
Apparently the customer just had a problem with the log file being full so
they moved it to another server. Could this have caused a problem? This is a
very large location so I assume the dba(s) know what they are doing. Could
they have limited the number of records that can be returned?
Thanks for any help you can give.
Ginny
Search no further...
http://support.microsoft.com/default...b;en-us;328476
Note, this answer took forever to find so I'm posting everywhere...
|||Thanks. I will pass on the link to the customer.
Ginny
"alorentz" wrote:

> Search no further...
> http://support.microsoft.com/default...b;en-us;328476
> Note, this answer took forever to find so I'm posting everywhere...
>

Tuesday, February 14, 2012

connecting to sqlexpress from classic asp

hi,

i'm using classic asp to try and connect to a sqlexpress database on a development server. i get the following error:

Microsoft OLE DB Provider for SQL Server (0x80004005)
[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.
/dbtest.asp, line 8

I'm using the following script which runs fine against a regular SQL server (version 8) on the network.

<%@.LANGUAGE="JAVASCRIPT"%>

<%
var strCon, conn, sql;

strCon = "Provider=SQLOLEDB.1;Data Source=localhost;Initial Catalog=rapidHB;User Id=rapid;Password=xxx";
conn=Server.CreateObject("ADODB.Connection");
conn.Open(strCon);

sql = "SELECT product_code FROM products WHERE product_type = 1";

var results= conn.Execute(sql).GetString();
Response.write(unescape(results));
%>

I have tried changing Data Source to servername\SQLEXPRESS, changing initial catalog to master, using a user name defined on the database and changing the provider to SQLNCLI but nothing has worked.

Anyone got any idea what I'm doing wrong? Using ASP.Net is not an option.

Rgds,

lukemack

I believe this is your problem;

Provider=SQLOLEDB.1;Data Source=localhost

Try changing to this if you took the defaults

Provider=SQLNCLI; Data Source=localhost\SQLEXPRESS

|||thanks for the reply. I;ve tried that and now get the error:

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

My connection string is now:

strCon = "Provider=SQLNCLI;Data Source=localhost\sqlexpress;Initial Catalog=rapidHB;User ID=sa;Password=xxx";

i have checked and the named pipes protocol is enabled for sqlexpress.

any ideas?

thanks,

lukemack.

|||

Is SQL Express local or remote to the ASP machine?

Can you try switching to use TCP/IP?

|||its local. i'm running iis 5.1 on windows xp pro as a development server. how do i force a tcp/ip connection?

i can connect locally in the management console fine and remote connections are enabled. i was able to connect remotely via a management console on another machine.
|||anyone? i cant believe how difficult a simple local connection is from asp as compared to php and mysql.

i've noticed that netstat-a does not show specify a port number for sql server. the line is:

TCP lukem1:ms-sql-s lukem1:0 LISTENING

also, i get this error in the sqlserver error log:

The SQL Network Interface library could not register the Service Principal Name (SPN) for the SQL Server service. Error: 0x54b

Its stated elsewhere on this forum that this shouldnt be a problem but could this be involved?

thanks,

lukemack

|||i solved this.

instead of localhost\sqlserver or any variations thereof, i put just a "." and it works. so, for anyone else banging their head against their computer, the connection sctring should look like this:

strCon = "Provider=SQLNCLI;Data Source=.;Initial Catalog=dbName;User ID=sa;Password=xxx";

cheers,

lukemack.
|||Just so others reading the thread are clear, thsi works because you have installed SQL Express as a default instance as opposed to a named instance, this is not the norm. So the connection estring I supplied will work for named instances, yours will work for default