|
Actually, the OP was asking about the fuss over the sp prefix, which was the fuss over using sp_. It may seem like splitting hairs, but there was never a problem with just using sp (and I don't think anybody ever raised a fuss over it).
pmarfleet wrote: My issue is with the practice of using unnecessary naming conventions
Agreed. Mindless mantra is annoying.
|
|
|
|
|
I think what you may be referring to is that if you prefix a stored procedure with 'sp_' SQL Server will look up all the extended stored procedures first to see if there is a match.
Apparently on large OLAP/OLTP systems this can result in a significant use of processor power.
I have named my stored procedures 'sp_'and am in the process of changing them and encouraging others not to use them.
I think at the end of the day unless your database is having to process tens to hundreds of millions of records via a stored procedure you should be ok with using 'sp_' as the prefix.
This is just an opinion and as you may discover DBA's tend to be very opinionated (except they see themselves as being 'right' ).
You always pass failure on the way to success.
|
|
|
|
|
Yup. There is a performance penalty when using them in a database other than Master. There's a technical reason that this happens, which you can find here[^]. As far as I can tell, even in SQL 2008, this is still the case.
|
|
|
|
|
Excellent. I like that, let there be no dispute that this is bad pratice.
Regards,
Rob Philpott.
|
|
|
|
|
call your procs whatever you like, but I think it's dumb. Of course is a sp. SQL Server management studio does that grouping for you.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
My prefix sp is not to indicate that it's a stored procedure, but one of my system procedures. See my post above.[^] The third one down.
|
|
|
|
|
hi,
i'm using VS 2005 And SqlServer Express 2005,
i've build a nice app that conects to an sql server and reads info displays
changes the data and so on
the problem that i'm facing is how to tell App2 and App3 that App1 has made
cahanges in the database, i've tried a Thread that pulls Data and Checks if a change had been made
but it's hell, is there any other way
i Heared of Trigger Proc that can be placed in the server will that report to my App's about Changes
I'm Confused from all the Knowledge in the Subject of ADO.Net
THANKS in Advance
Have Fun
Never forget it
|
|
|
|
|
You are talking about Notification, check BOL although I'm not sure if it works on Express. Try googling for SQL 2005 query notification.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
THANKS,
it's not working in Express
Any Other IDEAS
Does A Thread that will pull info and will pporivde an Equal Method ti Compare The Dataset
is A Good IDEA ?
Have Fun
Never forget it
|
|
|
|
|
You could put a column on the database with the last changed datetime and check that in apps2 and 3 (on a timer maybe, keep last changed date between polls), but remember that sql server is only accurate to a third of a millisecond so if you are doing rapid inserts you could get multiple records per millisecond.
Hope this helps
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Sound Nice
i've got around and created a Thread that will
Fill a "Fake" DataSet and then some Checks to see what has Changed
The Thread will Fill the fake Dataset every 500 mili
because changes made by the user usualy take a lot more
it works nice and the importent thing is that only 10 users MAX will
work with the UI so it works great
THANKS anyway
Have Fun
Never forget it
|
|
|
|
|
Hi,
Please refresh my memory...
What the difference is between using & or + to join fields with text.
SELECT FirstName + ' ' + LastName AS FullName FROM table
or
SELECT FirstName & ' ' & LastName AS FullName FROM table
thanks,
Ron
|
|
|
|
|
myNameIsRon wrote: SELECT FirstName + ' ' + LastName AS FullName FROM table
This works
myNameIsRon wrote: SELECT FirstName & ' ' & LastName AS FullName FROM table
This doesn't, you get Invalid operator for data type. Operator equals boolean AND, type equals varchar.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Hmmm,
Both will work for me. I'm using a MS Access db with OleDbCommand (C#)
Ron
|
|
|
|
|
Both do not work on SQL Server. Access has its own brand of SQL and does a lot of wierd stuff.
|
|
|
|
|
My mistake, I assumed you were using SQL Server - or maybe yours for not specifying
Anyway, as Micheal has said, Access has its own rules!
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Thanks guys,
I didn't realize it was specific to Access SQL.
I did some testing, and here it is. If your field is NULL, and you're using '+', the join is ignored.
SELECT ID_Field + ' - ' & NameField FROM table
ID_Field not null: 3433 - Bob Smith
ID_Field null: Bob Smith
SELECT ID_Field & ' - ' & NameField FROM table
ID_Field not null: 3433 - Bob Smith
ID_Field null: - Bob Smith
Ron
|
|
|
|
|
+ return NULL if any one of the field contains NULL value.
Otherwise both more or less returns same results.
Regards
SG
|
|
|
|
|
hi all,
can some one help me to protect my database with a strong password like we protected our db in ms access.
thanks.
rmshah
Developer
|
|
|
|
|
You can't. SQL Server does not work like that. Take a look at authentication in BOL.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
i think you can protect your database by right clicking on register server then change sa password,now when someone trying to open database it pop up
for password window.
Ghazanfar Ali
Programmar (MSTS,MCPD)
|
|
|
|
|
I have been writing some small personel programs using VB.NET 2005 express and SQL 2003 for storage. I recently purchased a new computer with windows Vista. I copied my VB programs to my new computer but when I tried to copy my SQL databases nothing worked. I got every error message conceivable. I tried just plain copying to a CD, I tried exporting to a CD using SQL and even exporting to an ACCESS database. Nothing worked. Any Ideas??
Thanks.
Peter B.
|
|
|
|
|
Can't you detach the DB and copy the MDF's over?
|
|
|
|
|
I haven't tried that yet. I will and let you know. Thnks.
|
|
|
|
|
do simple job, take backup of your database and create a new db on your new pc with the same name and restore the file you have taken by backup.
rmshah
Developer
|
|
|
|