We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you a podcast all about Citrix Workspace, moving to the cloud, and analytics & intelligence. Episode 2 coming soon!Listen Now

x

SHOWPLAN_ALL

npuleio
npuleio asked
on
Medium Priority
503 Views
Last Modified: 2011-08-18
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

Comment
Watch Question

AneeshDatabase Consultant
CERTIFIED EXPERT
Top Expert 2009

Commented:
Hi npuleio,


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

Author

Commented:
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
AneeshDatabase Consultant
CERTIFIED EXPERT
Top Expert 2009

Commented:
Did u try the same in Query analyzer

Author

Commented:
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
AneeshDatabase Consultant
CERTIFIED EXPERT
Top Expert 2009

Commented:
K. that's fine

Author

Commented:
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
Commented:
PAQed with points refunded (250)

GranMod
Community Support Moderator

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.