wazz
Super Moderator
- Local time
- Tomorrow, 03:04
- Joined
- Jun 29, 2004
- Messages
- 1,711
i've scripted a db and have been updating field names, etc.
first thing is, at the top of the file, two schemas and two users were created. each schema has a corresponding user (or vice-versa) with the same name. i'll come back to this.
secondly, i'm looking at the stored procedures and they all seem to start with 'sp_'. i say "seem to" because they actually look like one or the other of these:
CREATE PROCEDURE [SchemaOrUser].[sp_blah_blah]
or
CREATE PROCEDURE [dbo].[sp_blah_blah]
'SchemaOrUser' matches the schema name and user created at the top of the file.
so, a few questions:
- schema and user are the same. which one does the [SchemaOrUser] refer to?
- what does that 'prefix' do? is it required? (same thing with [dbo]).
- where does the stored procedure's name really start? with sp_ or [SchemaOrUser] ? i've read several times that sps really shouldn't start with sp_ (reads the system tables first or something) so i'd like to change them, if i should.
first thing is, at the top of the file, two schemas and two users were created. each schema has a corresponding user (or vice-versa) with the same name. i'll come back to this.
secondly, i'm looking at the stored procedures and they all seem to start with 'sp_'. i say "seem to" because they actually look like one or the other of these:
CREATE PROCEDURE [SchemaOrUser].[sp_blah_blah]
or
CREATE PROCEDURE [dbo].[sp_blah_blah]
'SchemaOrUser' matches the schema name and user created at the top of the file.
so, a few questions:
- schema and user are the same. which one does the [SchemaOrUser] refer to?
- what does that 'prefix' do? is it required? (same thing with [dbo]).
- where does the stored procedure's name really start? with sp_ or [SchemaOrUser] ? i've read several times that sps really shouldn't start with sp_ (reads the system tables first or something) so i'd like to change them, if i should.