November 27, 2010 at 5:45 am
Is there a tsql commmand to refresh UI objects in object explorer?
I tried sp_refresh in 2008 it does not exist. Does it work in 2005?
November 27, 2010 at 6:50 am
No, there's no real way to link TSQL and Management Studio. Management Studio uses TSQL, it's not used by TSQL, so statements issued in TSQL won't affect SSMS. To modify what's in SSMS, you generally have to tell SSMS to refresh.
Unless I'm completely missing the question.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
November 27, 2010 at 7:15 am
I agree with Grant. Please make use of the "Refresh" button to refresh the objects in SSMS.
Pradeep Adiga
Blog: sqldbadiaries.com
Twitter: @pradeepadiga
November 27, 2010 at 8:43 am
November 28, 2010 at 4:58 am
Thanks for all your responses.
November 29, 2010 at 8:33 am
In SQL 2008 Object Explorer, if you right-click on almost any "node" (Databases, a particular database name, a server name, the nodes called Tables, Views, etc.) you'll get a menu. Refresh is one of the options in that menu.
September 26, 2011 at 3:19 am
You can try something to get the F5 pressed through script. (URL: http://ssmsaddins.codeplex.com/discussions/66360)
private void RefreshTree()
{
INodeInformation[] nodes;
int nodeCount;
IObjectExplorerService objectExplorer = ServiceCache.GetObjectExplorer();
objectExplorer.GetSelectedNodes(out nodeCount, out nodes);
INodeInformation node = (nodeCount > 0 ? nodes[0] : null);
if (node != null)
{
objectExplorer.SynchronizeTree(node.Parent);
SendKeys.Send("{F5}");
}
}
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply