 |
SoftTree Technologies
Technical Support Forums
|
|
Author |
Message |
sqltogo
Joined: 02 Jul 2014 Posts: 38 Country: Netherlands |
|
[SA 7.1.228 pro] Refactoring - Qualify object names |
|
Let me start with a complement, I use Qualify Objects name a lot and this version really works better and more complete.
But I found an error getting the correct schema name.
Using Management studio 2014 and SQL Server 2012 standard edition
There are a few schemas defined in the database.
Start editing and I enter this text:
EXEC sqldba.
After Control+Space SA correctly find the procedures within this schema, and the code is completed as:
EXEC sqldba.usp_GenerateDailyJobSummary
@HoursOld = NULL
Then I remove the schema prefix and use refactoring, Qualify object names.
This is the code SA produces:
EXEC dbo.usp_GenerateDailyJobSummary
@HoursOld = NULL
Which is not the correct schema name, and yes I checked, I do not have the same procedure in the dbo schema.
|
|
Mon Nov 17, 2014 6:00 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
Thank you very much for reporting this. Can you please tell me how you login to the database.
Is your login sqldba?
In there a user mapped to that login in the database hosting usp_GenerateDailyJobSummary procedure?
If yes, and yes, does the user mapping have dbo as its default schema for sqldba login?
|
|
Mon Nov 17, 2014 7:55 pm |
|
 |
sqltogo
Joined: 02 Jul 2014 Posts: 38 Country: Netherlands |
|
|
|
I am using Windows Autentication with the default schema dbo
Alternative login in with login sa with password and default schema dbo.
In this database I use a few different schemas to separate groups of objects
It is simple to reproduce with this code example:
USE TestSQLAssist
GO
create SCHEMA mytest
GO
CREATE TABLE mytest.mytable (c1 INT)
GO
SELECT * FROM mytable AS m
go
-- Refactor, qualify object names gives this result
SELECT * FROM dbo.mytable AS m
GO
|
|
Thu Nov 20, 2014 4:50 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
Thank you. I submitted a new ticket to investigate and fix this issue.
|
|
Thu Nov 20, 2014 5:12 pm |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|