Showing posts with label designer. Show all posts
Showing posts with label designer. Show all posts

Tuesday, March 20, 2012

Query execution failed

Hi,

I have a group of reports using a shared datasource. Going to the preview of the report works fine in the report designer, but when I try and view it from a browser (deployed on a website), it gives the error:

"An error has occurred during report processing.

Query execution failed for data set 'DataSet1_ticketInfo'.

Failed to parse SQL.[long sql query here]"


If there's a problem with it, I don't get why it works in preview mode. I'm using SQL server 2005.

Thanks.
Hi,

Can you provide some more details about your Report

1) 'DataSet1_ticketInfo' - Is this your main DataSet ie; the result of this DS is used on the Report body OR
2) Are you using 'DataSet1_ticketInfo' DS for populating Report Parameters OR
3) Your DS contains some script (query or Stored Proc) that requires special permissions to be executed through your asp.net web-site

I think you may be missing some params used by above mentioned DS, which may be causing the error.

Regards,
abhi_viking

|||That dataset is the main dataset for the report. One of these reports (all are having the same problem) does take parameters, but I have a default value set, which actually shows up in the datepicker correctly. This particular dataset doesn't take any parameters. The actual report doesn't load however (but does in preview)

|||

Hi,

Are you using some code that requires permission to be executed thro' your asp.net website?

If possible, do paste ur DS code here, that might help us solve your issue.

Regards,

abhi_viking

|||How would I get the actual code of the DS? Just to be clear, this is a server report, not a client one. I've verified that the conn. string is correct and does connect ok.
|||After talking to MS support, it seems that if you use a column name alias (ie "as") in the select statement, the report viewer refuses to parse the SQL. It seems to be some sort of bug. We were able to get around it by having the report run a stored procedure, which allowed the column names. Hope this helps anyone else that runs into this issue.

Query execution failed

Hi,

I have a group of reports using a shared datasource. Going to the preview of the report works fine in the report designer, but when I try and view it from a browser (deployed on a website), it gives the error:

"An error has occurred during report processing.

Query execution failed for data set 'DataSet1_ticketInfo'.

Failed to parse SQL.[long sql query here]"


If there's a problem with it, I don't get why it works in preview mode. I'm using SQL server 2005.

Thanks.
Hi,

Can you provide some more details about your Report

1) 'DataSet1_ticketInfo' - Is this your main DataSet ie; the result of this DS is used on the Report body OR
2) Are you using 'DataSet1_ticketInfo' DS for populating Report Parameters OR
3) Your DS contains some script (query or Stored Proc) that requires special permissions to be executed through your asp.net web-site

I think you may be missing some params used by above mentioned DS, which may be causing the error.

Regards,
abhi_viking

|||That dataset is the main dataset for the report. One of these reports (all are having the same problem) does take parameters, but I have a default value set, which actually shows up in the datepicker correctly. This particular dataset doesn't take any parameters. The actual report doesn't load however (but does in preview)

|||

Hi,

Are you using some code that requires permission to be executed thro' your asp.net website?

If possible, do paste ur DS code here, that might help us solve your issue.

Regards,

abhi_viking

|||How would I get the actual code of the DS? Just to be clear, this is a server report, not a client one. I've verified that the conn. string is correct and does connect ok.
|||After talking to MS support, it seems that if you use a column name alias (ie "as") in the select statement, the report viewer refuses to parse the SQL. It seems to be some sort of bug. We were able to get around it by having the report run a stored procedure, which allowed the column names. Hope this helps anyone else that runs into this issue.

Query execution failed

Hi,

I have a group of reports using a shared datasource. Going to the preview of the report works fine in the report designer, but when I try and view it from a browser (deployed on a website), it gives the error:

"An error has occurred during report processing.

Query execution failed for data set 'DataSet1_ticketInfo'.

Failed to parse SQL.[long sql query here]"


If there's a problem with it, I don't get why it works in preview mode. I'm using SQL server 2005.

Thanks.
Hi,

Can you provide some more details about your Report

1) 'DataSet1_ticketInfo' - Is this your main DataSet ie; the result of this DS is used on the Report body OR
2) Are you using 'DataSet1_ticketInfo' DS for populating Report Parameters OR
3) Your DS contains some script (query or Stored Proc) that requires special permissions to be executed through your asp.net web-site

I think you may be missing some params used by above mentioned DS, which may be causing the error.

Regards,
abhi_viking

|||That dataset is the main dataset for the report. One of these reports (all are having the same problem) does take parameters, but I have a default value set, which actually shows up in the datepicker correctly. This particular dataset doesn't take any parameters. The actual report doesn't load however (but does in preview)

|||

Hi,

Are you using some code that requires permission to be executed thro' your asp.net website?

If possible, do paste ur DS code here, that might help us solve your issue.

Regards,

abhi_viking

|||How would I get the actual code of the DS? Just to be clear, this is a server report, not a client one. I've verified that the conn. string is correct and does connect ok.
|||After talking to MS support, it seems that if you use a column name alias (ie "as") in the select statement, the report viewer refuses to parse the SQL. It seems to be some sort of bug. We were able to get around it by having the report run a stored procedure, which allowed the column names. Hope this helps anyone else that runs into this issue.

Monday, March 12, 2012

query designer very slow loading tables

when i use the query designer and add tables it takes 15-30 mins to load a table....so if i need 6 tables in my query thats like 6 times 30 minute load times...i'm using oracle as my data source

when i switch the source to oledb it adds tables within seconds the only thing is i need to use named parameters

any ideas?

moldypenguins wrote:

when i use the query designer and add tables it takes 15-30 mins to load a table

You're saying it takes 15-30 minutes to drag and drop a table control onto the layout of query designer?

What is it exactly that is taking that long?

|||>>

when i switch the source to oledb it adds tables within seconds the only thing is i need to use named parameters

<<

Yes -- use oledb and find a way around the named parameters thing <g>. Tell us more about your query, maybe we can figure out something there.

Alternatively... what version of what type of connection are you using when you don't use OLEDB? I use Oracle stuff, maybe I can help or somebody else will spot what's wrong. (I'll be off-line shortly for about a week)

>L<

|||

it takes 15-30 minutes to load the table...ie i click the add table button, click a table and click add, then i wait

|||

Can you post a screenshot of where you are doing this?

If you can't then describe further. I'm not slow, it's just there are several places you could be designing a query.

Are you using SQL 2000? 2005? Is this in BIS? SQL Server Management Studio?

|||

sorry i'm using sql 2005 in bis, here is a screen shot

|||

How much RAM is in the PC that you are adding the table to query designer from? What is the processor speed? How about on the SQL server?

What is the network configuration like between the PC that you are using query designer and the SQL server? Is it the same machine?

Have you noticed slow load times in any other SQL application (such as Management Studio)?

|||

its not the pc because i have tried it on other computers in the office, server is open vms running orcle 9i

|||

Just because you have tried it on other computers and it does the same thing doesn't mean it's not the PC.

If they all have 256 mb of RAM in them then you could experience the same problem in all of them.

In my experience, slow load time = not enough hardware OR poor network setup OR antivirus interference.

|||

i have 512mb

and the other 2 have 2gb or more

and like i said it works quickly when i chose oledb but i need to keep named parameters|||

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=324176&SiteID=1

here is someone else with the same problem!

|||

Given that the other post also uses the same Oracle connector (right/) I wonder if it is trying to re-use the connection for the same connection and the Oracle connector doesn't like that, the first use has to time out before it's possible. Sounds like a bug in the connector or the way it's being used -- no idea --

So I am going to ask again what I asked before <s>:

>>

when i switch the source to oledb it adds tables within seconds the only thing is i need to use named parameters

<<

Yes -- use oledb and find a way around the named parameters thing <g>. Tell us more about your query, maybe we can figure out something there.

I'm serious, let's give this a go.

>L<

|||the query doesn't matter because i don't even make it that far....its just when i'm loading the tables into the designer, it seems like it is taking long to link the databases or something, but when i use oledb it works super fast.....|||

Hi there,

Look: I'm not talking about "optimizing" your query, and I don't think your query is the problem.

But the query *does* matter. Because if you could change the query so you could use oledb on the query, then you would be using oledb to load the tables in the designer and your problem would go away <g>.

As I said before:

Given that the other post also uses the same Oracle connector (right/) I wonder if it is trying to re-use the connection for the same connection and the Oracle connector doesn't like that, the first use has to time out before it's possible. Sounds like a bug in the connector or the way it's being used -- no idea --

... and this is something we probably can't fix. So I'm going for something that we *can*. OK?

>L<

|||BTW -- http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2096059&SiteID=1

... please look at this thread, you may be using an unsupported connection method for the query designer. So if you want to speed up the QD loads, let's work at arranging your query so you can use the OLE DB driver, really I think it may be possible to get around the "named parameters" reason that you can't use the OLE DB driver in this case.


So describe what you're doing and we'll take a shot...

>L<

query designer very slow loading tables

when i use the query designer and add tables it takes 15-30 mins to load a table....so if i need 6 tables in my query thats like 6 times 30 minute load times...i'm using oracle as my data source

when i switch the source to oledb it adds tables within seconds the only thing is i need to use named parameters

any ideas?

moldypenguins wrote:

when i use the query designer and add tables it takes 15-30 mins to load a table

You're saying it takes 15-30 minutes to drag and drop a table control onto the layout of query designer?

What is it exactly that is taking that long?

|||>>

when i switch the source to oledb it adds tables within seconds the only thing is i need to use named parameters

<<

Yes -- use oledb and find a way around the named parameters thing <g>. Tell us more about your query, maybe we can figure out something there.

Alternatively... what version of what type of connection are you using when you don't use OLEDB? I use Oracle stuff, maybe I can help or somebody else will spot what's wrong. (I'll be off-line shortly for about a week)

>L<

|||

it takes 15-30 minutes to load the table...ie i click the add table button, click a table and click add, then i wait

|||

Can you post a screenshot of where you are doing this?

If you can't then describe further. I'm not slow, it's just there are several places you could be designing a query.

Are you using SQL 2000? 2005? Is this in BIS? SQL Server Management Studio?

|||

sorry i'm using sql 2005 in bis, here is a screen shot

|||

How much RAM is in the PC that you are adding the table to query designer from? What is the processor speed? How about on the SQL server?

What is the network configuration like between the PC that you are using query designer and the SQL server? Is it the same machine?

Have you noticed slow load times in any other SQL application (such as Management Studio)?

|||

its not the pc because i have tried it on other computers in the office, server is open vms running orcle 9i

|||

Just because you have tried it on other computers and it does the same thing doesn't mean it's not the PC.

If they all have 256 mb of RAM in them then you could experience the same problem in all of them.

In my experience, slow load time = not enough hardware OR poor network setup OR antivirus interference.

|||

i have 512mb

and the other 2 have 2gb or more

and like i said it works quickly when i chose oledb but i need to keep named parameters|||

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=324176&SiteID=1

here is someone else with the same problem!

|||

Given that the other post also uses the same Oracle connector (right/) I wonder if it is trying to re-use the connection for the same connection and the Oracle connector doesn't like that, the first use has to time out before it's possible. Sounds like a bug in the connector or the way it's being used -- no idea --

So I am going to ask again what I asked before <s>:

>>

when i switch the source to oledb it adds tables within seconds the only thing is i need to use named parameters

<<

Yes -- use oledb and find a way around the named parameters thing <g>. Tell us more about your query, maybe we can figure out something there.

I'm serious, let's give this a go.

>L<

|||the query doesn't matter because i don't even make it that far....its just when i'm loading the tables into the designer, it seems like it is taking long to link the databases or something, but when i use oledb it works super fast.....|||

Hi there,

Look: I'm not talking about "optimizing" your query, and I don't think your query is the problem.

But the query *does* matter. Because if you could change the query so you could use oledb on the query, then you would be using oledb to load the tables in the designer and your problem would go away <g>.

As I said before:

Given that the other post also uses the same Oracle connector (right/) I wonder if it is trying to re-use the connection for the same connection and the Oracle connector doesn't like that, the first use has to time out before it's possible. Sounds like a bug in the connector or the way it's being used -- no idea --

... and this is something we probably can't fix. So I'm going for something that we *can*. OK?

>L<

|||BTW -- http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2096059&SiteID=1

... please look at this thread, you may be using an unsupported connection method for the query designer. So if you want to speed up the QD loads, let's work at arranging your query so you can use the OLE DB driver, really I think it may be possible to get around the "named parameters" reason that you can't use the OLE DB driver in this case.


So describe what you're doing and we'll take a shot...

>L<

query designer very slow loading tables

when i use the query designer and add tables it takes 15-30 mins to load a table....so if i need 6 tables in my query thats like 6 times 30 minute load times...i'm using oracle as my data source

when i switch the source to oledb it adds tables within seconds the only thing is i need to use named parameters

any ideas?

moldypenguins wrote:

when i use the query designer and add tables it takes 15-30 mins to load a table

You're saying it takes 15-30 minutes to drag and drop a table control onto the layout of query designer?

What is it exactly that is taking that long?

|||>>

when i switch the source to oledb it adds tables within seconds the only thing is i need to use named parameters

<<

Yes -- use oledb and find a way around the named parameters thing <g>. Tell us more about your query, maybe we can figure out something there.

Alternatively... what version of what type of connection are you using when you don't use OLEDB? I use Oracle stuff, maybe I can help or somebody else will spot what's wrong. (I'll be off-line shortly for about a week)

>L<

|||

it takes 15-30 minutes to load the table...ie i click the add table button, click a table and click add, then i wait

|||

Can you post a screenshot of where you are doing this?

If you can't then describe further. I'm not slow, it's just there are several places you could be designing a query.

Are you using SQL 2000? 2005? Is this in BIS? SQL Server Management Studio?

|||

sorry i'm using sql 2005 in bis, here is a screen shot

|||

How much RAM is in the PC that you are adding the table to query designer from? What is the processor speed? How about on the SQL server?

What is the network configuration like between the PC that you are using query designer and the SQL server? Is it the same machine?

Have you noticed slow load times in any other SQL application (such as Management Studio)?

|||

its not the pc because i have tried it on other computers in the office, server is open vms running orcle 9i

|||

Just because you have tried it on other computers and it does the same thing doesn't mean it's not the PC.

If they all have 256 mb of RAM in them then you could experience the same problem in all of them.

In my experience, slow load time = not enough hardware OR poor network setup OR antivirus interference.

|||

i have 512mb

and the other 2 have 2gb or more

and like i said it works quickly when i chose oledb but i need to keep named parameters|||

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=324176&SiteID=1

here is someone else with the same problem!

|||

Given that the other post also uses the same Oracle connector (right/) I wonder if it is trying to re-use the connection for the same connection and the Oracle connector doesn't like that, the first use has to time out before it's possible. Sounds like a bug in the connector or the way it's being used -- no idea --

So I am going to ask again what I asked before <s>:

>>

when i switch the source to oledb it adds tables within seconds the only thing is i need to use named parameters

<<

Yes -- use oledb and find a way around the named parameters thing <g>. Tell us more about your query, maybe we can figure out something there.

I'm serious, let's give this a go.

>L<

|||the query doesn't matter because i don't even make it that far....its just when i'm loading the tables into the designer, it seems like it is taking long to link the databases or something, but when i use oledb it works super fast.....|||

Hi there,

Look: I'm not talking about "optimizing" your query, and I don't think your query is the problem.

But the query *does* matter. Because if you could change the query so you could use oledb on the query, then you would be using oledb to load the tables in the designer and your problem would go away <g>.

As I said before:

Given that the other post also uses the same Oracle connector (right/) I wonder if it is trying to re-use the connection for the same connection and the Oracle connector doesn't like that, the first use has to time out before it's possible. Sounds like a bug in the connector or the way it's being used -- no idea --

... and this is something we probably can't fix. So I'm going for something that we *can*. OK?

>L<

|||BTW -- http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2096059&SiteID=1

... please look at this thread, you may be using an unsupported connection method for the query designer. So if you want to speed up the QD loads, let's work at arranging your query so you can use the OLE DB driver, really I think it may be possible to get around the "named parameters" reason that you can't use the OLE DB driver in this case.


So describe what you're doing and we'll take a shot...

>L<

query designer very slow loading tables

when i use the query designer and add tables it takes 15-30 mins to load a table....so if i need 6 tables in my query thats like 6 times 30 minute load times...i'm using oracle as my data source

when i switch the source to oledb it adds tables within seconds the only thing is i need to use named parameters

any ideas?

moldypenguins wrote:

when i use the query designer and add tables it takes 15-30 mins to load a table

You're saying it takes 15-30 minutes to drag and drop a table control onto the layout of query designer?

What is it exactly that is taking that long?

|||>>

when i switch the source to oledb it adds tables within seconds the only thing is i need to use named parameters

<<

Yes -- use oledb and find a way around the named parameters thing <g>. Tell us more about your query, maybe we can figure out something there.

Alternatively... what version of what type of connection are you using when you don't use OLEDB? I use Oracle stuff, maybe I can help or somebody else will spot what's wrong. (I'll be off-line shortly for about a week)

>L<

|||

it takes 15-30 minutes to load the table...ie i click the add table button, click a table and click add, then i wait

|||

Can you post a screenshot of where you are doing this?

If you can't then describe further. I'm not slow, it's just there are several places you could be designing a query.

Are you using SQL 2000? 2005? Is this in BIS? SQL Server Management Studio?

|||

sorry i'm using sql 2005 in bis, here is a screen shot

|||

How much RAM is in the PC that you are adding the table to query designer from? What is the processor speed? How about on the SQL server?

What is the network configuration like between the PC that you are using query designer and the SQL server? Is it the same machine?

Have you noticed slow load times in any other SQL application (such as Management Studio)?

|||

its not the pc because i have tried it on other computers in the office, server is open vms running orcle 9i

|||

Just because you have tried it on other computers and it does the same thing doesn't mean it's not the PC.

If they all have 256 mb of RAM in them then you could experience the same problem in all of them.

In my experience, slow load time = not enough hardware OR poor network setup OR antivirus interference.

|||

i have 512mb

and the other 2 have 2gb or more

and like i said it works quickly when i chose oledb but i need to keep named parameters|||

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=324176&SiteID=1

here is someone else with the same problem!

|||

Given that the other post also uses the same Oracle connector (right/) I wonder if it is trying to re-use the connection for the same connection and the Oracle connector doesn't like that, the first use has to time out before it's possible. Sounds like a bug in the connector or the way it's being used -- no idea --

So I am going to ask again what I asked before <s>:

>>

when i switch the source to oledb it adds tables within seconds the only thing is i need to use named parameters

<<

Yes -- use oledb and find a way around the named parameters thing <g>. Tell us more about your query, maybe we can figure out something there.

I'm serious, let's give this a go.

>L<

|||the query doesn't matter because i don't even make it that far....its just when i'm loading the tables into the designer, it seems like it is taking long to link the databases or something, but when i use oledb it works super fast.....|||

Hi there,

Look: I'm not talking about "optimizing" your query, and I don't think your query is the problem.

But the query *does* matter. Because if you could change the query so you could use oledb on the query, then you would be using oledb to load the tables in the designer and your problem would go away <g>.

As I said before:

Given that the other post also uses the same Oracle connector (right/) I wonder if it is trying to re-use the connection for the same connection and the Oracle connector doesn't like that, the first use has to time out before it's possible. Sounds like a bug in the connector or the way it's being used -- no idea --

... and this is something we probably can't fix. So I'm going for something that we *can*. OK?

>L<

|||BTW -- http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2096059&SiteID=1

... please look at this thread, you may be using an unsupported connection method for the query designer. So if you want to speed up the QD loads, let's work at arranging your query so you can use the OLE DB driver, really I think it may be possible to get around the "named parameters" reason that you can't use the OLE DB driver in this case.


So describe what you're doing and we'll take a shot...

>L<

query designer very slow loading tables

when i use the query designer and add tables it takes 15-30 mins to load a table....so if i need 6 tables in my query thats like 6 times 30 minute load times...i'm using oracle as my data source

when i switch the source to oledb it adds tables within seconds the only thing is i need to use named parameters

any ideas?

moldypenguins wrote:

when i use the query designer and add tables it takes 15-30 mins to load a table

You're saying it takes 15-30 minutes to drag and drop a table control onto the layout of query designer?

What is it exactly that is taking that long?

|||>>

when i switch the source to oledb it adds tables within seconds the only thing is i need to use named parameters

<<

Yes -- use oledb and find a way around the named parameters thing <g>. Tell us more about your query, maybe we can figure out something there.

Alternatively... what version of what type of connection are you using when you don't use OLEDB? I use Oracle stuff, maybe I can help or somebody else will spot what's wrong. (I'll be off-line shortly for about a week)

>L<

|||

it takes 15-30 minutes to load the table...ie i click the add table button, click a table and click add, then i wait

|||

Can you post a screenshot of where you are doing this?

If you can't then describe further. I'm not slow, it's just there are several places you could be designing a query.

Are you using SQL 2000? 2005? Is this in BIS? SQL Server Management Studio?

|||

sorry i'm using sql 2005 in bis, here is a screen shot

|||

How much RAM is in the PC that you are adding the table to query designer from? What is the processor speed? How about on the SQL server?

What is the network configuration like between the PC that you are using query designer and the SQL server? Is it the same machine?

Have you noticed slow load times in any other SQL application (such as Management Studio)?

|||

its not the pc because i have tried it on other computers in the office, server is open vms running orcle 9i

|||

Just because you have tried it on other computers and it does the same thing doesn't mean it's not the PC.

If they all have 256 mb of RAM in them then you could experience the same problem in all of them.

In my experience, slow load time = not enough hardware OR poor network setup OR antivirus interference.

|||

i have 512mb

and the other 2 have 2gb or more

and like i said it works quickly when i chose oledb but i need to keep named parameters|||

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=324176&SiteID=1

here is someone else with the same problem!

|||

Given that the other post also uses the same Oracle connector (right/) I wonder if it is trying to re-use the connection for the same connection and the Oracle connector doesn't like that, the first use has to time out before it's possible. Sounds like a bug in the connector or the way it's being used -- no idea --

So I am going to ask again what I asked before <s>:

>>

when i switch the source to oledb it adds tables within seconds the only thing is i need to use named parameters

<<

Yes -- use oledb and find a way around the named parameters thing <g>. Tell us more about your query, maybe we can figure out something there.

I'm serious, let's give this a go.

>L<

|||the query doesn't matter because i don't even make it that far....its just when i'm loading the tables into the designer, it seems like it is taking long to link the databases or something, but when i use oledb it works super fast.....|||

Hi there,

Look: I'm not talking about "optimizing" your query, and I don't think your query is the problem.

But the query *does* matter. Because if you could change the query so you could use oledb on the query, then you would be using oledb to load the tables in the designer and your problem would go away <g>.

As I said before:

Given that the other post also uses the same Oracle connector (right/) I wonder if it is trying to re-use the connection for the same connection and the Oracle connector doesn't like that, the first use has to time out before it's possible. Sounds like a bug in the connector or the way it's being used -- no idea --

... and this is something we probably can't fix. So I'm going for something that we *can*. OK?

>L<

|||BTW -- http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2096059&SiteID=1

... please look at this thread, you may be using an unsupported connection method for the query designer. So if you want to speed up the QD loads, let's work at arranging your query so you can use the OLE DB driver, really I think it may be possible to get around the "named parameters" reason that you can't use the OLE DB driver in this case.


So describe what you're doing and we'll take a shot...

>L<

query designer very slow loading tables

when i use the query designer and add tables it takes 15-30 mins to load a table....so if i need 6 tables in my query thats like 6 times 30 minute load times...i'm using oracle as my data source

when i switch the source to oledb it adds tables within seconds the only thing is i need to use named parameters

any ideas?

moldypenguins wrote:

when i use the query designer and add tables it takes 15-30 mins to load a table

You're saying it takes 15-30 minutes to drag and drop a table control onto the layout of query designer?

What is it exactly that is taking that long?

|||>>

when i switch the source to oledb it adds tables within seconds the only thing is i need to use named parameters

<<

Yes -- use oledb and find a way around the named parameters thing <g>. Tell us more about your query, maybe we can figure out something there.

Alternatively... what version of what type of connection are you using when you don't use OLEDB? I use Oracle stuff, maybe I can help or somebody else will spot what's wrong. (I'll be off-line shortly for about a week)

>L<

|||

it takes 15-30 minutes to load the table...ie i click the add table button, click a table and click add, then i wait

|||

Can you post a screenshot of where you are doing this?

If you can't then describe further. I'm not slow, it's just there are several places you could be designing a query.

Are you using SQL 2000? 2005? Is this in BIS? SQL Server Management Studio?

|||

sorry i'm using sql 2005 in bis, here is a screen shot

|||

How much RAM is in the PC that you are adding the table to query designer from? What is the processor speed? How about on the SQL server?

What is the network configuration like between the PC that you are using query designer and the SQL server? Is it the same machine?

Have you noticed slow load times in any other SQL application (such as Management Studio)?

|||

its not the pc because i have tried it on other computers in the office, server is open vms running orcle 9i

|||

Just because you have tried it on other computers and it does the same thing doesn't mean it's not the PC.

If they all have 256 mb of RAM in them then you could experience the same problem in all of them.

In my experience, slow load time = not enough hardware OR poor network setup OR antivirus interference.

|||

i have 512mb

and the other 2 have 2gb or more

and like i said it works quickly when i chose oledb but i need to keep named parameters|||

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=324176&SiteID=1

here is someone else with the same problem!

|||

Given that the other post also uses the same Oracle connector (right/) I wonder if it is trying to re-use the connection for the same connection and the Oracle connector doesn't like that, the first use has to time out before it's possible. Sounds like a bug in the connector or the way it's being used -- no idea --

So I am going to ask again what I asked before <s>:

>>

when i switch the source to oledb it adds tables within seconds the only thing is i need to use named parameters

<<

Yes -- use oledb and find a way around the named parameters thing <g>. Tell us more about your query, maybe we can figure out something there.

I'm serious, let's give this a go.

>L<

|||the query doesn't matter because i don't even make it that far....its just when i'm loading the tables into the designer, it seems like it is taking long to link the databases or something, but when i use oledb it works super fast.....|||

Hi there,

Look: I'm not talking about "optimizing" your query, and I don't think your query is the problem.

But the query *does* matter. Because if you could change the query so you could use oledb on the query, then you would be using oledb to load the tables in the designer and your problem would go away <g>.

As I said before:

Given that the other post also uses the same Oracle connector (right/) I wonder if it is trying to re-use the connection for the same connection and the Oracle connector doesn't like that, the first use has to time out before it's possible. Sounds like a bug in the connector or the way it's being used -- no idea --

... and this is something we probably can't fix. So I'm going for something that we *can*. OK?

>L<

|||BTW -- http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2096059&SiteID=1

... please look at this thread, you may be using an unsupported connection method for the query designer. So if you want to speed up the QD loads, let's work at arranging your query so you can use the OLE DB driver, really I think it may be possible to get around the "named parameters" reason that you can't use the OLE DB driver in this case.


So describe what you're doing and we'll take a shot...

>L<

Query Designer Toolbar

I have added the Query Designer toolbar to my Management Studio environment. After open a new query window this toolbar stays greyed out. How can I use this toolbar with my queries?

Thanks,

Hello CRdesigner,

The only thing that should be greyed out from the toolbar should be "Change Type" button. Other buttons should still be available for you to use. The "Change Type" button has been greyed out intentionally. We are hoping to bring it back in future versions. You can use "Change Type" if you bring up a Query Designer from Visual Studio.

Thanks!

|||

Hi Young Joo-MSFT,

Thanks for responding.

When I click on the New Query button it opens a new window. All the buttons on the Query Designer toolbar are greyed out. Why is that?

|||

If you click on the "New Query" button, it brings up a SQL Editor, not Query Designer. They are two different tools. You can bring up a Query Designer by selecting a query from SQL Editor and selecting "Design Query in Editor" option from right-click menu.

|||

Was a solution ever found? I am also not able to use the Query Designer toolbar. The buttons are all greyed out...

Friday, March 9, 2012

Query Designer Toolbar

I have added the Query Designer toolbar to my Management Studio environment. After open a new query window this toolbar stays greyed out. How can I use this toolbar with my queries?

Thanks,

Hello CRdesigner,

The only thing that should be greyed out from the toolbar should be "Change Type" button. Other buttons should still be available for you to use. The "Change Type" button has been greyed out intentionally. We are hoping to bring it back in future versions. You can use "Change Type" if you bring up a Query Designer from Visual Studio.

Thanks!

|||

Hi Young Joo-MSFT,

Thanks for responding.

When I click on the New Query button it opens a new window. All the buttons on the Query Designer toolbar are greyed out. Why is that?

|||

If you click on the "New Query" button, it brings up a SQL Editor, not Query Designer. They are two different tools. You can bring up a Query Designer by selecting a query from SQL Editor and selecting "Design Query in Editor" option from right-click menu.

|||

Was a solution ever found? I am also not able to use the Query Designer toolbar. The buttons are all greyed out...

Query designer toggle button not present

When I create a Report Server Project Using Visual Studio 2005 with SQL Server 2005 I can create a data source with no problem and the test shows it is good good.

When I next create a report and go to the query builder using that same data source and click on the query builder button I see the Query Builder screen, but there is no toggle button in the top left of the screen so I cannot go into the graphical mode to see the tables.

I have uninstalled and reinstalled both Visual Studio and SQL Server but I still have the same problem. What should I do to get the button visible on the screen?

Can anyone help?

Terry,

Are you setting this report up from a shared data source or from making a new datasource. You may want to set up a shared datasource first then make your report from the shared datasource and see if that works. It works that way for me.

|||

It makes no difference either way, I can have new data source or a shared data source.

I have a server and my computer both of which appear to have a nearly identical setup of Studio and SQL Server but I can perform identical steps on both and on the server I get the toggle button but on my computer I get nothing. This is what makes be think it may be a bad installation but I have reinstalled both Studio and SQL Server on my machine and I still get the same thing!

Thanks for responding though.

Terry

|||

Terry,

You may have already figured it out, but you may just want to use stored procedures. When we create a new report we just go through the wizard, pick our datasource, and then tell it what stored proc we want it to use. I believe the syntax is

exec rptsp_MyStoredProcedure @.MyParameter1,@.MyParameter2

Do you have a lot of experience with SQL queries and stored procs? If not maybe I can help.

Query Designer in SQL 2005 Mgmt Studio a let-down?

Greetings, all. Thanks for all of the great postings in this community. However, one question I have doesn't seem to have been addressed. In SQL 2000 Enterprise Manager, a user could right-click on a table, and choose Open Table>>Query. This option brings the user directly to a query designer very similar to the query designer available in SQL 2005 Management Studio. However, I have been frustrated by the following:

- The Open Table option in SQL 2005 returns data immediately where the SQL 2000 Query option did not, meaning it opened faster and did not risk locking any records in the table

- In SQL 2005 the user needs to click three buttons to open all of the Panes which the "Open Table>>Query" option in SQL2000 had done automatically

This may seem like small stuff, but when a developer like me spends most of his time building queries which link several tables, this builder is priceless and time is precious.

Is there some trick in SQL 2005 go to the Query Designer with all panes open and no data returned automatically? If not, can someone point me to where I can make this request for a future service pack for SQL 2005?

Thanks,

Ron D.
St Paul, MN

Hello Ron,

Thanks for your feedback. I am a Program Manager in Visual Studio Data team and I am the one to talk to about Query Designer (both in SSMS and VS).

Within SSMS, Query Designer is activated via Open Table command. Most people use this command to browse through data within the selected table. So that’s why the default view is the results pane.

If you are within Visual Studio 2005, Query Designer is activated via New Query or Show Table Data from Server Explorer. You can also bring up Query Designer from Solution Explorer if you are within a Database Project. Here, New Query option defaults to all panes activated. And Show Table Data defaults to only results grid.
We were trying to provide most relevant default behavior depending on where you activate Query Designer.

Within Visual Studio, you can actually change the default layout by going to Tools -> Options -> Database Tools -> Query and View Designers. This option is missing from SSMS and we have it as potential future enhancement.

Lastly, you can activate/deactivate each pane very quickly by hitting CTRL+1 (Diagram Pane), CTRL+2 (Criteria Pane), CTRL+3 (SQL Pane) and CTRL+4 (Results Pane).

Hope this helps.

|||

Thanks for the response, Mr. Joo. I appreciated the shortcut keys.

I wasn't very specific, but I do hope that the Management Studio interface can be improved related to Query Designer in a future build. In development, I will often write code to change data in a table, but during testing I will have to make many manual changes to data in tables so I can test and retest. The results grid in Mgmt Studio using "Open Table" seems to be the only place to do this without writing an update statement. Again, it would be nice if the option to design a query were available without returning data initially and while retaining the ability to edit data in the results grid.

I also noticed that I can't change the query type from the "Open Table" feature in the Management Studio object browser. I hope this will be enabled in the future, to allow my to draft quick delete and update statements from data I already have filtered in an "Open Table" query.

I develop with a proprietery development language (Great Plains Dexterity), so I don't have access to the options in Visual Studio.

Thanks again,

Ron

|||

Ron,

Thanks for your feedback. It is our goal to provide consistent experience to both developers and database administrators regardless of which IDE they choose to use. You will see some of that in our future versions of Visual Studio and SQL Server Management Studio.

Regarding disabled 'Change Type' feature, we intended Open Table to be used as a data browsing tool instead of data management tool. If you bring up a Query Builder from SQL Editor window by choosing Design Query in Editor from right-click menu, you will be able to morph queries.

Thanks!

|||

Young,

I have been trying on and off to get right click and get "Open Table" to work. I always get the error message "Object reference not set to...". What causes this. Also quite a few times when I right click and select new query then type in sql with tables names I get an error, then if I qualify the name of the table with the db name like so fooDb.foo the query will run. Also in sql server 2000 when I imported an access db it worked perfectly and I could view the tables. In management studio when I do this I get nothing but errors. I finally wrote my own code to copy the access db in.

Sorry but at this point I am a frustrated sql server 2005 user who wants to uninstall.

|||

Hello David,

Sorry that I missed your question. Hope you have not uninstalled SQL Server 2005 during past month. :)

Three issues you described.

1. "Object reference not set to..." error during Open Table
2. Error message in new query without fully qualified table name
3. Opening Access tables

I will have to do some research on #1 and #3.

For #2, I am pretty sure that you are connected to master database when you open up a SQL Editor for new query. That's why it works only if you qualify your table name with database name. You can either type 'use <dbname>' and hit CTRL+E to change the database or use the drop-down in the toolbar area.

I will get back to you with more information on #1 and #3.

Thanks!

|||

Open Table brings up a restricted functionality Query Designer that is intended just to show the data in a table. The easiest way to get to the full-functionality Query Designer in Management Studio is through a T-SQL editor instance.

You can open a new query editor in Management Studio by clicking the New Query button, by clicking the File > New > Query with Current Connection menu, by clicking the File > New > Database Engine Query menu item, or by right clicking on a database in Object Explorer and selecting New Query in the context menu.

If you use the context menu item on a database, the query editor is initially connected to that database. Once you have a query editory, you can right click in the editor and select Design Query in Editor... to start the Query Designer for the selected T-SQL. (If nothing is selected, the Query Designer starts in an empty state.)

Thanks,

Steve

|||

The only way I got open table to work was reinstalling everything. The first time I installed I did get an error while install was "Setting file security" I canceled the install and tried again. In that install I had to unplug my network cable to keep "Setting file security" from hanging (found using internet search).

After the uninstall I am able to open the table and edit values. Howerver, I would like to be able to edit values not just using "open table" but within a query. This is how things functioned in sql server 2000 and it is something very useful.

And to stray for a moment in the sql server 2005 I cannot just import an access db like I could in sql server 2000. After all of the import steps the import fails. For this to work I wound writing my own code to do the import.

I would also request if anyone from MS reads this that the uninstall of sql server 2005 be done in one step. When I unistalled my corrupted version I had to unistall each component separately.

I have also had an install where management studio was not installed after selecting all of the components for install. On this instance iis was not present on the system. I have not researched why management studio was not installed but I will shortly.

Some of the features that I use on a day to day basis don't function reliably or not at all. I like the work that has been done in the product but would like edit results and also would like import of an access to work like it did in sql server 2000.

Thanks for the help.

|||

Mr. Joo

Please add my voice to Ron's. Query Designer is an incredibly efficient tool for quickly retrieving, viewing and editing data in large tables. It is also a great tool for quickly creating SQL to use in sprocs and other programs.

The ability to access the the Query Designer with the Diagram, Criteria, SQL, and Results pane fully intact and already showing the table(s) to query is an incredible time saver and should be made even easier to access than it was in SQL Server 2000.

I would love to even have the ability to highlight multiple tables and push a button to open the Query Designer with these tables preloaded in the Diagram pane.

Please consider this for the next Service Pack upgrade to SQL 2005. Its that important.

Sean

|||

Steve,

This method is, as you say, the quickest way to access the Query Designer, but the results pane is absent and from what I've been able to find so far, the data returned after running the query in the T-SQL editor cannot be edited in the datagrid.

Sean

|||

Hi

1. Right click on table and open, stop query and then switch on panes: diagram, criteria, sql - too many clicks.

2. Design Query in editor form SQL Editor - that is a blocking window (modal I think) and does not have results pane.

I belive in next release I could fast open query designer (not modal) in one click with visible diagram, criteria, sql and empty results pane.

Kamil

|||

Thanks all for the tips on getting the Panes open off of the table browser object. I never would have found that.

I immediately fell prey to the Editor popup (with the Results Pane option disabled), first by right-clicking the table in the browser and choosing the "Script Table as ... SELECT * To ..." option and then "Design Query in Editor...".

This causes several problems. Since there is already SQL code generated by the "...SELECT * To..." option, you would think that it would use this code as the starting point in the Editor...it does not.

Secondly, you would think clicking "OK" on the editor would use this SQL code in the query window that it returns to...it does, but as an insert wherever you happened to have left the cursor before you selected to use the Editor, rather than as a replacement over whatever was there initially. Now that I know this is here, I can see where this might be handy for building nested queries, etc., but it is definitely not intuitive... and not available from the Open Table windows? What if that is where I'm wanting to include a nested query?

I like the addition of the Table Open option (like the Data tab in TOAD) rather than the SQL 2000 method of choosing a Select * or Query option, but why get rid of the Query option - other than as menuing through to add each Pane (or multiple upper-left Pane buttons).

The Query Designer without a Results/Parse option makes no sense at all. You can't tweak the results from this dialog to make sure you are getting what you want out of the code.

Growing pains...panes..I guess. Hope some of these can be addressed in SP2...?

Query Designer in SQL 2005 Mgmt Studio a let-down?

Greetings, all. Thanks for all of the great postings in this community. However, one question I have doesn't seem to have been addressed. In SQL 2000 Enterprise Manager, a user could right-click on a table, and choose Open Table>>Query. This option brings the user directly to a query designer very similar to the query designer available in SQL 2005 Management Studio. However, I have been frustrated by the following:

- The Open Table option in SQL 2005 returns data immediately where the SQL 2000 Query option did not, meaning it opened faster and did not risk locking any records in the table

- In SQL 2005 the user needs to click three buttons to open all of the Panes which the "Open Table>>Query" option in SQL2000 had done automatically

This may seem like small stuff, but when a developer like me spends most of his time building queries which link several tables, this builder is priceless and time is precious.

Is there some trick in SQL 2005 go to the Query Designer with all panes open and no data returned automatically? If not, can someone point me to where I can make this request for a future service pack for SQL 2005?

Thanks,

Ron D.
St Paul, MN

Hello Ron,

Thanks for your feedback. I am a Program Manager in Visual Studio Data team and I am the one to talk to about Query Designer (both in SSMS and VS).

Within SSMS, Query Designer is activated via Open Table command. Most people use this command to browse through data within the selected table. So that’s why the default view is the results pane.

If you are within Visual Studio 2005, Query Designer is activated via New Query or Show Table Data from Server Explorer. You can also bring up Query Designer from Solution Explorer if you are within a Database Project. Here, New Query option defaults to all panes activated. And Show Table Data defaults to only results grid.
We were trying to provide most relevant default behavior depending on where you activate Query Designer.

Within Visual Studio, you can actually change the default layout by going to Tools -> Options -> Database Tools -> Query and View Designers. This option is missing from SSMS and we have it as potential future enhancement.

Lastly, you can activate/deactivate each pane very quickly by hitting CTRL+1 (Diagram Pane), CTRL+2 (Criteria Pane), CTRL+3 (SQL Pane) and CTRL+4 (Results Pane).

Hope this helps.

|||

Thanks for the response, Mr. Joo. I appreciated the shortcut keys.

I wasn't very specific, but I do hope that the Management Studio interface can be improved related to Query Designer in a future build. In development, I will often write code to change data in a table, but during testing I will have to make many manual changes to data in tables so I can test and retest. The results grid in Mgmt Studio using "Open Table" seems to be the only place to do this without writing an update statement. Again, it would be nice if the option to design a query were available without returning data initially and while retaining the ability to edit data in the results grid.

I also noticed that I can't change the query type from the "Open Table" feature in the Management Studio object browser. I hope this will be enabled in the future, to allow my to draft quick delete and update statements from data I already have filtered in an "Open Table" query.

I develop with a proprietery development language (Great Plains Dexterity), so I don't have access to the options in Visual Studio.

Thanks again,

Ron

|||

Ron,

Thanks for your feedback. It is our goal to provide consistent experience to both developers and database administrators regardless of which IDE they choose to use. You will see some of that in our future versions of Visual Studio and SQL Server Management Studio.

Regarding disabled 'Change Type' feature, we intended Open Table to be used as a data browsing tool instead of data management tool. If you bring up a Query Builder from SQL Editor window by choosing Design Query in Editor from right-click menu, you will be able to morph queries.

Thanks!

|||

Young,

I have been trying on and off to get right click and get "Open Table" to work. I always get the error message "Object reference not set to...". What causes this. Also quite a few times when I right click and select new query then type in sql with tables names I get an error, then if I qualify the name of the table with the db name like so fooDb.foo the query will run. Also in sql server 2000 when I imported an access db it worked perfectly and I could view the tables. In management studio when I do this I get nothing but errors. I finally wrote my own code to copy the access db in.

Sorry but at this point I am a frustrated sql server 2005 user who wants to uninstall.

|||

Hello David,

Sorry that I missed your question. Hope you have not uninstalled SQL Server 2005 during past month. :)

Three issues you described.

1. "Object reference not set to..." error during Open Table
2. Error message in new query without fully qualified table name
3. Opening Access tables

I will have to do some research on #1 and #3.

For #2, I am pretty sure that you are connected to master database when you open up a SQL Editor for new query. That's why it works only if you qualify your table name with database name. You can either type 'use <dbname>' and hit CTRL+E to change the database or use the drop-down in the toolbar area.

I will get back to you with more information on #1 and #3.

Thanks!

|||

Open Table brings up a restricted functionality Query Designer that is intended just to show the data in a table. The easiest way to get to the full-functionality Query Designer in Management Studio is through a T-SQL editor instance.

You can open a new query editor in Management Studio by clicking the New Query button, by clicking the File > New > Query with Current Connection menu, by clicking the File > New > Database Engine Query menu item, or by right clicking on a database in Object Explorer and selecting New Query in the context menu.

If you use the context menu item on a database, the query editor is initially connected to that database. Once you have a query editory, you can right click in the editor and select Design Query in Editor... to start the Query Designer for the selected T-SQL. (If nothing is selected, the Query Designer starts in an empty state.)

Thanks,

Steve

|||

The only way I got open table to work was reinstalling everything. The first time I installed I did get an error while install was "Setting file security" I canceled the install and tried again. In that install I had to unplug my network cable to keep "Setting file security" from hanging (found using internet search).

After the uninstall I am able to open the table and edit values. Howerver, I would like to be able to edit values not just using "open table" but within a query. This is how things functioned in sql server 2000 and it is something very useful.

And to stray for a moment in the sql server 2005 I cannot just import an access db like I could in sql server 2000. After all of the import steps the import fails. For this to work I wound writing my own code to do the import.

I would also request if anyone from MS reads this that the uninstall of sql server 2005 be done in one step. When I unistalled my corrupted version I had to unistall each component separately.

I have also had an install where management studio was not installed after selecting all of the components for install. On this instance iis was not present on the system. I have not researched why management studio was not installed but I will shortly.

Some of the features that I use on a day to day basis don't function reliably or not at all. I like the work that has been done in the product but would like edit results and also would like import of an access to work like it did in sql server 2000.

Thanks for the help.

|||

Mr. Joo

Please add my voice to Ron's. Query Designer is an incredibly efficient tool for quickly retrieving, viewing and editing data in large tables. It is also a great tool for quickly creating SQL to use in sprocs and other programs.

The ability to access the the Query Designer with the Diagram, Criteria, SQL, and Results pane fully intact and already showing the table(s) to query is an incredible time saver and should be made even easier to access than it was in SQL Server 2000.

I would love to even have the ability to highlight multiple tables and push a button to open the Query Designer with these tables preloaded in the Diagram pane.

Please consider this for the next Service Pack upgrade to SQL 2005. Its that important.

Sean

|||

Steve,

This method is, as you say, the quickest way to access the Query Designer, but the results pane is absent and from what I've been able to find so far, the data returned after running the query in the T-SQL editor cannot be edited in the datagrid.

Sean

|||

Hi

1. Right click on table and open, stop query and then switch on panes: diagram, criteria, sql - too many clicks.

2. Design Query in editor form SQL Editor - that is a blocking window (modal I think) and does not have results pane.

I belive in next release I could fast open query designer (not modal) in one click with visible diagram, criteria, sql and empty results pane.

Kamil

|||

Thanks all for the tips on getting the Panes open off of the table browser object. I never would have found that.

I immediately fell prey to the Editor popup (with the Results Pane option disabled), first by right-clicking the table in the browser and choosing the "Script Table as ... SELECT * To ..." option and then "Design Query in Editor...".

This causes several problems. Since there is already SQL code generated by the "...SELECT * To..." option, you would think that it would use this code as the starting point in the Editor...it does not.

Secondly, you would think clicking "OK" on the editor would use this SQL code in the query window that it returns to...it does, but as an insert wherever you happened to have left the cursor before you selected to use the Editor, rather than as a replacement over whatever was there initially. Now that I know this is here, I can see where this might be handy for building nested queries, etc., but it is definitely not intuitive... and not available from the Open Table windows? What if that is where I'm wanting to include a nested query?

I like the addition of the Table Open option (like the Data tab in TOAD) rather than the SQL 2000 method of choosing a Select * or Query option, but why get rid of the Query option - other than as menuing through to add each Pane (or multiple upper-left Pane buttons).

The Query Designer without a Results/Parse option makes no sense at all. You can't tweak the results from this dialog to make sure you are getting what you want out of the code.

Growing pains...panes..I guess. Hope some of these can be addressed in SP2...?

Query Designer in SQL 2005 Mgmt Studio a let-down?

Greetings, all. Thanks for all of the great postings in this community. However, one question I have doesn't seem to have been addressed. In SQL 2000 Enterprise Manager, a user could right-click on a table, and choose Open Table>>Query. This option brings the user directly to a query designer very similar to the query designer available in SQL 2005 Management Studio. However, I have been frustrated by the following:

- The Open Table option in SQL 2005 returns data immediately where the SQL 2000 Query option did not, meaning it opened faster and did not risk locking any records in the table

- In SQL 2005 the user needs to click three buttons to open all of the Panes which the "Open Table>>Query" option in SQL2000 had done automatically

This may seem like small stuff, but when a developer like me spends most of his time building queries which link several tables, this builder is priceless and time is precious.

Is there some trick in SQL 2005 go to the Query Designer with all panes open and no data returned automatically? If not, can someone point me to where I can make this request for a future service pack for SQL 2005?

Thanks,

Ron D.
St Paul, MN

Hello Ron,

Thanks for your feedback. I am a Program Manager in Visual Studio Data team and I am the one to talk to about Query Designer (both in SSMS and VS).

Within SSMS, Query Designer is activated via Open Table command. Most people use this command to browse through data within the selected table. So that’s why the default view is the results pane.

If you are within Visual Studio 2005, Query Designer is activated via New Query or Show Table Data from Server Explorer. You can also bring up Query Designer from Solution Explorer if you are within a Database Project. Here, New Query option defaults to all panes activated. And Show Table Data defaults to only results grid.
We were trying to provide most relevant default behavior depending on where you activate Query Designer.

Within Visual Studio, you can actually change the default layout by going to Tools -> Options -> Database Tools -> Query and View Designers. This option is missing from SSMS and we have it as potential future enhancement.

Lastly, you can activate/deactivate each pane very quickly by hitting CTRL+1 (Diagram Pane), CTRL+2 (Criteria Pane), CTRL+3 (SQL Pane) and CTRL+4 (Results Pane).

Hope this helps.

|||

Thanks for the response, Mr. Joo. I appreciated the shortcut keys.

I wasn't very specific, but I do hope that the Management Studio interface can be improved related to Query Designer in a future build. In development, I will often write code to change data in a table, but during testing I will have to make many manual changes to data in tables so I can test and retest. The results grid in Mgmt Studio using "Open Table" seems to be the only place to do this without writing an update statement. Again, it would be nice if the option to design a query were available without returning data initially and while retaining the ability to edit data in the results grid.

I also noticed that I can't change the query type from the "Open Table" feature in the Management Studio object browser. I hope this will be enabled in the future, to allow my to draft quick delete and update statements from data I already have filtered in an "Open Table" query.

I develop with a proprietery development language (Great Plains Dexterity), so I don't have access to the options in Visual Studio.

Thanks again,

Ron

|||

Ron,

Thanks for your feedback. It is our goal to provide consistent experience to both developers and database administrators regardless of which IDE they choose to use. You will see some of that in our future versions of Visual Studio and SQL Server Management Studio.

Regarding disabled 'Change Type' feature, we intended Open Table to be used as a data browsing tool instead of data management tool. If you bring up a Query Builder from SQL Editor window by choosing Design Query in Editor from right-click menu, you will be able to morph queries.

Thanks!

|||

Young,

I have been trying on and off to get right click and get "Open Table" to work. I always get the error message "Object reference not set to...". What causes this. Also quite a few times when I right click and select new query then type in sql with tables names I get an error, then if I qualify the name of the table with the db name like so fooDb.foo the query will run. Also in sql server 2000 when I imported an access db it worked perfectly and I could view the tables. In management studio when I do this I get nothing but errors. I finally wrote my own code to copy the access db in.

Sorry but at this point I am a frustrated sql server 2005 user who wants to uninstall.

|||

Hello David,

Sorry that I missed your question. Hope you have not uninstalled SQL Server 2005 during past month. :)

Three issues you described.

1. "Object reference not set to..." error during Open Table
2. Error message in new query without fully qualified table name
3. Opening Access tables

I will have to do some research on #1 and #3.

For #2, I am pretty sure that you are connected to master database when you open up a SQL Editor for new query. That's why it works only if you qualify your table name with database name. You can either type 'use <dbname>' and hit CTRL+E to change the database or use the drop-down in the toolbar area.

I will get back to you with more information on #1 and #3.

Thanks!

|||

Open Table brings up a restricted functionality Query Designer that is intended just to show the data in a table. The easiest way to get to the full-functionality Query Designer in Management Studio is through a T-SQL editor instance.

You can open a new query editor in Management Studio by clicking the New Query button, by clicking the File > New > Query with Current Connection menu, by clicking the File > New > Database Engine Query menu item, or by right clicking on a database in Object Explorer and selecting New Query in the context menu.

If you use the context menu item on a database, the query editor is initially connected to that database. Once you have a query editory, you can right click in the editor and select Design Query in Editor... to start the Query Designer for the selected T-SQL. (If nothing is selected, the Query Designer starts in an empty state.)

Thanks,

Steve

|||

The only way I got open table to work was reinstalling everything. The first time I installed I did get an error while install was "Setting file security" I canceled the install and tried again. In that install I had to unplug my network cable to keep "Setting file security" from hanging (found using internet search).

After the uninstall I am able to open the table and edit values. Howerver, I would like to be able to edit values not just using "open table" but within a query. This is how things functioned in sql server 2000 and it is something very useful.

And to stray for a moment in the sql server 2005 I cannot just import an access db like I could in sql server 2000. After all of the import steps the import fails. For this to work I wound writing my own code to do the import.

I would also request if anyone from MS reads this that the uninstall of sql server 2005 be done in one step. When I unistalled my corrupted version I had to unistall each component separately.

I have also had an install where management studio was not installed after selecting all of the components for install. On this instance iis was not present on the system. I have not researched why management studio was not installed but I will shortly.

Some of the features that I use on a day to day basis don't function reliably or not at all. I like the work that has been done in the product but would like edit results and also would like import of an access to work like it did in sql server 2000.

Thanks for the help.

|||

Mr. Joo

Please add my voice to Ron's. Query Designer is an incredibly efficient tool for quickly retrieving, viewing and editing data in large tables. It is also a great tool for quickly creating SQL to use in sprocs and other programs.

The ability to access the the Query Designer with the Diagram, Criteria, SQL, and Results pane fully intact and already showing the table(s) to query is an incredible time saver and should be made even easier to access than it was in SQL Server 2000.

I would love to even have the ability to highlight multiple tables and push a button to open the Query Designer with these tables preloaded in the Diagram pane.

Please consider this for the next Service Pack upgrade to SQL 2005. Its that important.

Sean

|||

Steve,

This method is, as you say, the quickest way to access the Query Designer, but the results pane is absent and from what I've been able to find so far, the data returned after running the query in the T-SQL editor cannot be edited in the datagrid.

Sean

|||

Hi

1. Right click on table and open, stop query and then switch on panes: diagram, criteria, sql - too many clicks.

2. Design Query in editor form SQL Editor - that is a blocking window (modal I think) and does not have results pane.

I belive in next release I could fast open query designer (not modal) in one click with visible diagram, criteria, sql and empty results pane.

Kamil

|||

Thanks all for the tips on getting the Panes open off of the table browser object. I never would have found that.

I immediately fell prey to the Editor popup (with the Results Pane option disabled), first by right-clicking the table in the browser and choosing the "Script Table as ... SELECT * To ..." option and then "Design Query in Editor...".

This causes several problems. Since there is already SQL code generated by the "...SELECT * To..." option, you would think that it would use this code as the starting point in the Editor...it does not.

Secondly, you would think clicking "OK" on the editor would use this SQL code in the query window that it returns to...it does, but as an insert wherever you happened to have left the cursor before you selected to use the Editor, rather than as a replacement over whatever was there initially. Now that I know this is here, I can see where this might be handy for building nested queries, etc., but it is definitely not intuitive... and not available from the Open Table windows? What if that is where I'm wanting to include a nested query?

I like the addition of the Table Open option (like the Data tab in TOAD) rather than the SQL 2000 method of choosing a Select * or Query option, but why get rid of the Query option - other than as menuing through to add each Pane (or multiple upper-left Pane buttons).

The Query Designer without a Results/Parse option makes no sense at all. You can't tweak the results from this dialog to make sure you are getting what you want out of the code.

Growing pains...panes..I guess. Hope some of these can be addressed in SP2...?

Query Designer in SQL 2005 Mgmt Studio a let-down?

Greetings, all. Thanks for all of the great postings in this community. However, one question I have doesn't seem to have been addressed. In SQL 2000 Enterprise Manager, a user could right-click on a table, and choose Open Table>>Query. This option brings the user directly to a query designer very similar to the query designer available in SQL 2005 Management Studio. However, I have been frustrated by the following:

- The Open Table option in SQL 2005 returns data immediately where the SQL 2000 Query option did not, meaning it opened faster and did not risk locking any records in the table

- In SQL 2005 the user needs to click three buttons to open all of the Panes which the "Open Table>>Query" option in SQL2000 had done automatically

This may seem like small stuff, but when a developer like me spends most of his time building queries which link several tables, this builder is priceless and time is precious.

Is there some trick in SQL 2005 go to the Query Designer with all panes open and no data returned automatically? If not, can someone point me to where I can make this request for a future service pack for SQL 2005?

Thanks,

Ron D.
St Paul, MN

Hello Ron,

Thanks for your feedback. I am a Program Manager in Visual Studio Data team and I am the one to talk to about Query Designer (both in SSMS and VS).

Within SSMS, Query Designer is activated via Open Table command. Most people use this command to browse through data within the selected table. So that’s why the default view is the results pane.

If you are within Visual Studio 2005, Query Designer is activated via New Query or Show Table Data from Server Explorer. You can also bring up Query Designer from Solution Explorer if you are within a Database Project. Here, New Query option defaults to all panes activated. And Show Table Data defaults to only results grid.
We were trying to provide most relevant default behavior depending on where you activate Query Designer.

Within Visual Studio, you can actually change the default layout by going to Tools -> Options -> Database Tools -> Query and View Designers. This option is missing from SSMS and we have it as potential future enhancement.

Lastly, you can activate/deactivate each pane very quickly by hitting CTRL+1 (Diagram Pane), CTRL+2 (Criteria Pane), CTRL+3 (SQL Pane) and CTRL+4 (Results Pane).

Hope this helps.

|||

Thanks for the response, Mr. Joo. I appreciated the shortcut keys.

I wasn't very specific, but I do hope that the Management Studio interface can be improved related to Query Designer in a future build. In development, I will often write code to change data in a table, but during testing I will have to make many manual changes to data in tables so I can test and retest. The results grid in Mgmt Studio using "Open Table" seems to be the only place to do this without writing an update statement. Again, it would be nice if the option to design a query were available without returning data initially and while retaining the ability to edit data in the results grid.

I also noticed that I can't change the query type from the "Open Table" feature in the Management Studio object browser. I hope this will be enabled in the future, to allow my to draft quick delete and update statements from data I already have filtered in an "Open Table" query.

I develop with a proprietery development language (Great Plains Dexterity), so I don't have access to the options in Visual Studio.

Thanks again,

Ron

|||

Ron,

Thanks for your feedback. It is our goal to provide consistent experience to both developers and database administrators regardless of which IDE they choose to use. You will see some of that in our future versions of Visual Studio and SQL Server Management Studio.

Regarding disabled 'Change Type' feature, we intended Open Table to be used as a data browsing tool instead of data management tool. If you bring up a Query Builder from SQL Editor window by choosing Design Query in Editor from right-click menu, you will be able to morph queries.

Thanks!

|||

Young,

I have been trying on and off to get right click and get "Open Table" to work. I always get the error message "Object reference not set to...". What causes this. Also quite a few times when I right click and select new query then type in sql with tables names I get an error, then if I qualify the name of the table with the db name like so fooDb.foo the query will run. Also in sql server 2000 when I imported an access db it worked perfectly and I could view the tables. In management studio when I do this I get nothing but errors. I finally wrote my own code to copy the access db in.

Sorry but at this point I am a frustrated sql server 2005 user who wants to uninstall.

|||

Hello David,

Sorry that I missed your question. Hope you have not uninstalled SQL Server 2005 during past month. :)

Three issues you described.

1. "Object reference not set to..." error during Open Table
2. Error message in new query without fully qualified table name
3. Opening Access tables

I will have to do some research on #1 and #3.

For #2, I am pretty sure that you are connected to master database when you open up a SQL Editor for new query. That's why it works only if you qualify your table name with database name. You can either type 'use <dbname>' and hit CTRL+E to change the database or use the drop-down in the toolbar area.

I will get back to you with more information on #1 and #3.

Thanks!

|||

Open Table brings up a restricted functionality Query Designer that is intended just to show the data in a table. The easiest way to get to the full-functionality Query Designer in Management Studio is through a T-SQL editor instance.

You can open a new query editor in Management Studio by clicking the New Query button, by clicking the File > New > Query with Current Connection menu, by clicking the File > New > Database Engine Query menu item, or by right clicking on a database in Object Explorer and selecting New Query in the context menu.

If you use the context menu item on a database, the query editor is initially connected to that database. Once you have a query editory, you can right click in the editor and select Design Query in Editor... to start the Query Designer for the selected T-SQL. (If nothing is selected, the Query Designer starts in an empty state.)

Thanks,

Steve

|||

The only way I got open table to work was reinstalling everything. The first time I installed I did get an error while install was "Setting file security" I canceled the install and tried again. In that install I had to unplug my network cable to keep "Setting file security" from hanging (found using internet search).

After the uninstall I am able to open the table and edit values. Howerver, I would like to be able to edit values not just using "open table" but within a query. This is how things functioned in sql server 2000 and it is something very useful.

And to stray for a moment in the sql server 2005 I cannot just import an access db like I could in sql server 2000. After all of the import steps the import fails. For this to work I wound writing my own code to do the import.

I would also request if anyone from MS reads this that the uninstall of sql server 2005 be done in one step. When I unistalled my corrupted version I had to unistall each component separately.

I have also had an install where management studio was not installed after selecting all of the components for install. On this instance iis was not present on the system. I have not researched why management studio was not installed but I will shortly.

Some of the features that I use on a day to day basis don't function reliably or not at all. I like the work that has been done in the product but would like edit results and also would like import of an access to work like it did in sql server 2000.

Thanks for the help.

|||

Mr. Joo

Please add my voice to Ron's. Query Designer is an incredibly efficient tool for quickly retrieving, viewing and editing data in large tables. It is also a great tool for quickly creating SQL to use in sprocs and other programs.

The ability to access the the Query Designer with the Diagram, Criteria, SQL, and Results pane fully intact and already showing the table(s) to query is an incredible time saver and should be made even easier to access than it was in SQL Server 2000.

I would love to even have the ability to highlight multiple tables and push a button to open the Query Designer with these tables preloaded in the Diagram pane.

Please consider this for the next Service Pack upgrade to SQL 2005. Its that important.

Sean

|||

Steve,

This method is, as you say, the quickest way to access the Query Designer, but the results pane is absent and from what I've been able to find so far, the data returned after running the query in the T-SQL editor cannot be edited in the datagrid.

Sean

|||

Hi

1. Right click on table and open, stop query and then switch on panes: diagram, criteria, sql - too many clicks.

2. Design Query in editor form SQL Editor - that is a blocking window (modal I think) and does not have results pane.

I belive in next release I could fast open query designer (not modal) in one click with visible diagram, criteria, sql and empty results pane.

Kamil

|||

Thanks all for the tips on getting the Panes open off of the table browser object. I never would have found that.

I immediately fell prey to the Editor popup (with the Results Pane option disabled), first by right-clicking the table in the browser and choosing the "Script Table as ... SELECT * To ..." option and then "Design Query in Editor...".

This causes several problems. Since there is already SQL code generated by the "...SELECT * To..." option, you would think that it would use this code as the starting point in the Editor...it does not.

Secondly, you would think clicking "OK" on the editor would use this SQL code in the query window that it returns to...it does, but as an insert wherever you happened to have left the cursor before you selected to use the Editor, rather than as a replacement over whatever was there initially. Now that I know this is here, I can see where this might be handy for building nested queries, etc., but it is definitely not intuitive... and not available from the Open Table windows? What if that is where I'm wanting to include a nested query?

I like the addition of the Table Open option (like the Data tab in TOAD) rather than the SQL 2000 method of choosing a Select * or Query option, but why get rid of the Query option - other than as menuing through to add each Pane (or multiple upper-left Pane buttons).

The Query Designer without a Results/Parse option makes no sense at all. You can't tweak the results from this dialog to make sure you are getting what you want out of the code.

Growing pains...panes..I guess. Hope some of these can be addressed in SP2...?

Query Designer in SQL 2005 is total %#%!@

What happened to the Query Designer? It's a modal window that doesn't allow you to drag tables from other databases into the query. SQL 2000's verion of Query Designer was so much better than 2005. What happened? Are the developers at Microsoft completely retarded?

Also, why do I have to log into my database servers everytime I open "Server Management Studio"? Who thought up that nice feature? Probably the same brillant folks that redesigned Query Designer. Why would you want to have a forced login procedure for every database everytime the program is opened. Once again Microsoft must only hire retarded developers. Give yourselves a pat on the back!

Seriously, I think the SQL 2005 team owns stock in a MySQL tools firm.

Please, someone needs to wake up in Redmond - resolve these serious concerns in a service pack.

Dear Angry SQL 2005 User,

First, you tone is complete unnecessary. It is possible to get your point across without insulting people. This is not a threat but a promise: if your tone continues to be abusive I will delete your postings and have your account shutdown. The forums are designed to provide a place for fruitful discussion between community members – it is not a place for abuse.

Second, I don’t understand your comments about the query window being modal. The query window in Management Studio (SSMS) is a document window which, by definition, is non-modal. Also, you can drag-and-drop tables and views from Object Explorer to the query window surface. Can you provide more details on why you think it’s modal and what specifically you’re looking for in drag-and-drop.

Third, you can suppress the login dialog at start-up by changing your user configuration. The default configuration is to “Open Object Explorer at startup”. Opening Object Explorer requires a connection to a server. If you want to just startup the environment without being prompted for a connection and then choose a server to connect to from Registered Servers do the following:

1) Launch SSMS

2) Go to Tools -> Options

3) Select “Environment” – it should be selected by default

4) Change the “At startup:” option to “Open empty environment”

This option will restore your window settings but will not pop the connection dialog. For example, I have a bunch of servers registered that show up in the Registered Servers tool window. When I launch SSMS with the “Open empty environment” option, SSMS loads without the connection dialog and the Registered Servers is populated. I can then select a server to connect to at which time I get the connection dialog.

I hope this information helps.

Dan

|||

Dan,

Thanks for the quick reply.

Your reply is probably referring to a different part of SSMS, I was referring to the GUI tool used for creating queries automatically without actually handcoding SQL code. In SQL 2000 the tool is very flexible and easy to use. To make sure we are talking about the same thing - In SQL 2000 just right click on a table and select 'open table' and then 'query'. This opens up the GUI query generator. In SQL 2005 to open the new GUI tool called Query Designer you select 'query' on the toolbar and then 'design query in editor'. This was the tool I was referring to, not the sql script window where you hand type code.

The Query Designer in SQL 2005 indeed locks the SQL 2005 screen (I'm not sure if it's called modal, however, in SQL 2000 the screen was not locked). Also, I'm using the production version of SQL 2005.

The queries we write span databases, therefore, the ability to drag a table from another database is crucial. Also, our queries are extremely complex and without the SQL 2000 technology we will have to write views to 'see' these other databases in the Query Designer. This is not a big deal, it's just that SQL 2005 is less flexible in many aspects. Since we are paying good money for the upgrade I think someone in Redmond should know that a few changes would make many folks happy.

|||

Angry SQL 2005 User,

Okay we're on the same page now wrt the query designer. Let me do a little more research on the subject and post back.

Dan

p.s. thanks for toning it down!

|||

Angry SQL 2005 User,

Here's what you need to do. In Management Studio select a table, right-click and select "Open Table". This will open up the table showing the contents of the table in a document window. Now, in the doc window right-click and choose the "Pane" option. Here you can turn on the Diagram, Criteria, and SQL panes. Now you can drag-and-drop tables and views from different DBs on to the surface. You can also turn on these panes from the "Query Designer" toolbar.

I believe this gets you what you want. If not let me know.

Dan

|||

Dan,

Thank you for the quick response.

Everyone at work is happy now!

|||

Hey Dan,

Thanks for setting that guy straight.

My problem, I followed exactly what you outlined for the Query Designer, However, I cannot drag and drop table on the the Diagram Pane, I just received a "null" sign when dragging the table on the pane. Is there an option somewhere to allow drag and drop. I did this successfully with the previous version (2000).

Thanks in advance,

Jim

|||

Hi Dan, good day.

I did what you say to stop prompting each time I open a saved query, but it does't work at all, SSMS keeps prompting to connect each time I open a query, this did't happen in the query analyser, why is this?

Thanks and regards, happy holydays

|||

Alfonso, My instructions were to stop SSMS from prompting when it's launched. When you open a new query you must either already have a connection established or SSMS will prompt you for the connection information. There is no concept of a delayed connection when authoring queries.

Cheers,
Dan

|||

Hi Jim, That's very odd. Let me ask a few folks around here what the problem could be. Your installation my be messed up. It may take me until next week to get an answer as lots of folks are off this week.

Cheers,
Dan

|||

To clarify a bit on what Dan said there are a few different ways query windows can operate, we attempted to do the "right thing" but you can always undo what we did if it isn't what you wanted.

If you ask for a new query window via File->New->Database Query (or any other), or the toolbar button to the RIGHT of the "New Query" button, we ALWAYS prompt for a connection, you can press cancel and you will get a query window that is disconnected. We will not prompt for a connection until you attempt to execute that query or ask to connect explicitly via the Query->Connection->Connect option, or toolbar button under the New Query button.

If you ask for a new query window via File->New->Query With Current Connection, or the New Query button, or Ctrl+N, then we create a new query window with whatever current connection context you have. If the focus is in a Query Window we will create a new one with the same connection (this is the same behavior as QA). If you have focus in Object Explorer or Registered servers on a server, we will create a query window connected to that server.

Finally if you ask for a new query window with the current connection (as above) but there is NO current context: no query window, focus on a disconnected query window, focus on the server type node in the registered servers window then we will prompt you for a connect and in this case, if you press cancel, the new query window generation is stopped.

If we end up connecting you to a server you didn't want or not connecting you at all you can click on the disconnect toolbar or the re-connect toolbar (or their associated menu's under Query->Connections) and get the query window to the right server.

Finally there are some context menu's to be aware of. From a registered server you can right click and go into the "Connect" menu and select Query Window. This will open a query window connected to this server (regardless if it is connected in Object Explorer).

From a connected server in OE you can right click and use the New Query menu option to open a query connected to that server. If you select a database in the Object Explorer and do a New Query from there, then you will be connected to that server with the selected database as the current database.

These same concepts apply to an Analysis Server connection just as they do to a Relational Server connection.

Play around with it and hopefully it will allow you to achieve what you would like, when you would like it.

|||

By the "null" sign I assume you mean the circle with the cross through it... yes?

If this is the case you can get this if you are trying to drag tables onto the diagram that are from a different database then where the diagram is stored. We don't have cross-database diagrams.

Does this help?

|||

Bruce,

I have been trying to do "open table" ever since I installed sql server 2005 in Decemeber. However everytime I select a database, select a table and right click and select "open table" I get the error "Object reference not set to an instance of an object". Next I would like to be able to edit the data directly in the results pane once this works.

Reading in different forums I am not sure this is still an option.

Also I have loaded the Adventure Works database and tried to "Open Table" and I get the same error above.

I am frustrated because there are so many little things missing or not working in "sql server 2005" that I regret even installing it. In sql server 2000 I could select an access database and import it and the tables appeared. In sql server 2005 I get multiple errors. I finally resorted to writing my own code to copy the access database into sql server 2005.

Please let me know any help would be appreciated.

|||

David, I'm sorry to hear you are having so many troubles. It definately sounds like something is definately wrong with your installation. The open table should just work and you can edit the results just like in Sql 2000. In fact this is exactly the same component that was used in Enterprise Manager and the open table feature there so the funcationality should be almost identical. I know there were some changes in this component but nothing major to my knoweldge (it isn't built by my team so I can't comment with absolute confidence here). I would highly recommend you contact Microsoft Support as it is unlikely something I could get figured out via e-mails.

I'd like to get more information as to what "little things are missing." As we continue to release new service packs for Sql we want to make sure and address as many of these types of things as we can.

One thing that we've also found is that because it is a bit different often the same functionality is available elsewhere in the tool and we just did a bad job of making it discoverable and once you know where it is, you'll find less things missing and they won't be hard to find... as you will have found them.

If you are willing to give me a list if you can make sure to articulate "how" you went about doing the things you miss. For example in your statement above you mention that you used to "import an access database" and then "the tables appeared." This is a little unclear. Do you mean you used the Import Data Wizard to import the tables and then those tables were in the Sql Server and you could work with them or are you talking about something else?

Enterprise Manager, Query Analyzer and SSMS are all very large tools and the "obvious" things we all do aren't necessarily obvious to somebody else because they do things slightly different. So the more information you can give us the better.

I would also recomend that you go to the feedback site and either vote on existing feedback entries or add new ones if you don't see what you find lacking.

http://lab.msdn.microsoft.com/productfeedback/default.aspx


"This posting is provided "AS IS" with no warranties, and confers no rights"

|||

Bruce,

Thanks for the reply I appreciate it. The "open table" definitely does not work I now know you can edit data as in the old install and have seen someone else do it. when I right click and select new query and enter the query with a table name I get an error saying the object is not recognized. If I qualify the table name with the database name then it works. I tried to import an access data base and could not get it working. so I wrote the code and to do the import myself. When I delete tables tables or devices I have to hit the F5 key to refresh the view for the names to disappear. These are little things that worked in sql server 2000 that somehow don't in 2005.

I have backed up my databases and am going to unistall and reinstall and see if that gets rid of the open table issue.

Thanks