Link to home
Start Free TrialLog in
Avatar of npuleio
npuleio

asked on

SHOWPLAN_ALL

Hello everyone...

I'm here to ask you if it is possible to store SHOWPLAN_ALL results in a table or view from a SQL Stored Procedure?

This because since from my application I'm connecting to SQL Server 2005 without DSN via ADO query, if I open the recordset that should return to me the data explained it goes getting Communication Link Failure error...maybe you could suggest me a solution to avoid that error from my application's code...

If it could be usable, the connection string I use is:
DRIVER={SQL Native Client};uid=usercreatedinsql;Network=DBMSSOCN;DATABASE=LOCALDBNAME;APP={Microsoft Data Access Component};Trusted_Connection=Yes;SERVER=SERVERNAME\SQLEXPRESS;

Thanks you in advance to all!
Ciao,
Luigi

Avatar of Aneesh
Aneesh
Flag of Canada image

Hi npuleio,


yoy need to store it manually...Copy the Plan text and insert it ito a table...
Avatar of npuleio
npuleio

ASKER

Hi anee...

but I said before if I try to store the plan text manually from C++, when opening the query it returns an "Communication Link Failure" error...is there maybe another way to store it manually in a table so I can query that table and obtaining the plan on my C++ grid?

Thanks again in advance!
Ciao
Luigi
Did u try the same in Query analyzer
Avatar of npuleio

ASKER

Yes it works on Query Analyzer and also in EMS SQL Manager 2005....
But I've solved it casually right now!...

I had just to install and change the provider of the connection string to make avoiding the "communication link failure" error using MDAC's provider instead of SQLNCLI (MSDASQL.1 instead of SQLNCLI.1's provider)

I guess I could retire the question but anyway thanks for the illumination :-)

Ciao!
Luigi
K. that's fine
Avatar of npuleio

ASKER

For a moderator: Because I figured the solution by myself, explained in my last comment, can I retire the question?

Thanks in advance!
Ciao,
Luigi
ASKER CERTIFIED SOLUTION
Avatar of GranMod
GranMod

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial