2 formatted code
source | link

Did you want the John schema? Do you still have a dbo schema? This may be connected to the other issue you posted.

In regards to the question I dont think you can set a procedure to ignore a schema. If you are operating inside a schema (dbo for example) and are trying to call an object in another schema (john) I believe you have to use the schema name.

You can move the stored procedure to dbo using the command

ALTER SCHEMA dbo TRANSFER nameandschemaoftheSP

ALTER SCHEMA dbo TRANSFER nameandschemaoftheSP;

It sounds like you have a number of stored procedures that would need to be moved however. The code below should generate the scripts necessary to move each stored procedure within the john schema over to the dbo schema. Then you can decide which ones you want to run.

SELECT 'ALTER SCHEMA john TRANSFER ' + s.Name + '.' + p.Name FROM sys.Procedures p INNER JOIN sys.Schemas s on p.schema_id = s.schema_id WHERE s.Name = 'dbo'

SELECT
 'ALTER SCHEMA john TRANSFER ' + s.Name + '.' + p.Name 
FROM 
   sys.Procedures p 
INNER JOIN 
   sys.Schemas s 
ON p.schema_id = s.schema_id 
WHERE s.Name = 'dbo';

Beyond this I'd take a look at the dbo schema and do some research to see why stored procedures that used to be in dbo are unexpectedly showing up in john.

Did you want the John schema? Do you still have a dbo schema? This may be connected to the other issue you posted.

In regards to the question I dont think you can set a procedure to ignore a schema. If you are operating inside a schema (dbo for example) and are trying to call an object in another schema (john) I believe you have to use the schema name.

You can move the stored procedure to dbo using the command

ALTER SCHEMA dbo TRANSFER nameandschemaoftheSP

It sounds like you have a number of stored procedures that would need to be moved however. The code below should generate the scripts necessary to move each stored procedure within the john schema over to the dbo schema. Then you can decide which ones you want to run.

SELECT 'ALTER SCHEMA john TRANSFER ' + s.Name + '.' + p.Name FROM sys.Procedures p INNER JOIN sys.Schemas s on p.schema_id = s.schema_id WHERE s.Name = 'dbo'

Beyond this I'd take a look at the dbo schema and do some research to see why stored procedures that used to be in dbo are unexpectedly showing up in john.

Did you want the John schema? Do you still have a dbo schema? This may be connected to the other issue you posted.

In regards to the question I dont think you can set a procedure to ignore a schema. If you are operating inside a schema (dbo for example) and are trying to call an object in another schema (john) I believe you have to use the schema name.

You can move the stored procedure to dbo using the command

ALTER SCHEMA dbo TRANSFER nameandschemaoftheSP;

It sounds like you have a number of stored procedures that would need to be moved however. The code below should generate the scripts necessary to move each stored procedure within the john schema over to the dbo schema. Then you can decide which ones you want to run.

SELECT
 'ALTER SCHEMA john TRANSFER ' + s.Name + '.' + p.Name 
FROM 
   sys.Procedures p 
INNER JOIN 
   sys.Schemas s 
ON p.schema_id = s.schema_id 
WHERE s.Name = 'dbo';

Beyond this I'd take a look at the dbo schema and do some research to see why stored procedures that used to be in dbo are unexpectedly showing up in john.

1
source | link

Did you want the John schema? Do you still have a dbo schema? This may be connected to the other issue you posted.

In regards to the question I dont think you can set a procedure to ignore a schema. If you are operating inside a schema (dbo for example) and are trying to call an object in another schema (john) I believe you have to use the schema name.

You can move the stored procedure to dbo using the command

ALTER SCHEMA dbo TRANSFER nameandschemaoftheSP

It sounds like you have a number of stored procedures that would need to be moved however. The code below should generate the scripts necessary to move each stored procedure within the john schema over to the dbo schema. Then you can decide which ones you want to run.

SELECT 'ALTER SCHEMA john TRANSFER ' + s.Name + '.' + p.Name FROM sys.Procedures p INNER JOIN sys.Schemas s on p.schema_id = s.schema_id WHERE s.Name = 'dbo'

Beyond this I'd take a look at the dbo schema and do some research to see why stored procedures that used to be in dbo are unexpectedly showing up in john.