-
Notifications
You must be signed in to change notification settings - Fork 291
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rename file to dbo.sp_WhoIsActive.sql #4
Comments
Can you share the reasoning behind that change? |
Hi, Adam, thanks for quick response. It is more clear and consistent naming files with production stored procedures with schema name (we use schemas for maintaining security roles ) and procedure name. First what I do with new version of your procedure - rename the file name. Also we use case sensitive instances and for us is very important to have correct notation: |
{SchemaName}.{ObjectName}.sql is also what Redgate source control uses, capitalised exactly as the object and schema are named. |
Okay. This seems like a reasonable request. I'm going to pin it for a few weeks. If you're reading this and interested, please reply and cast a vote: #1 Leave it as-is My vote is #2. This is entirely due to my personal preference of organizing objects by schema in subfolders. So I'd have a subfolder called "dbo" in my project, with all of my dbo. stuff in it. |
2 |
2 similar comments
2 |
2 |
#3 (neither SSMS File Per Object scripting, or Redgate source control, uses folder per schema) |
2 |
1 similar comment
2 |
I prefer 3, but 2 is also fine. |
2 |
My preference is 3 first, 2 at a close second. Some examples, for those that may not be familiar with Red Gate or the default Visual Studio database project folder structures. Red Gate SQL Source Control (i.e. number 3)
Default (w/ schema folders) Visual Studio database project (i.e. number 2)
|
2 for me, because of Visual Studio defaults. |
3 |
2 because of VS. |
Similar to a lot of others: 3, followed by 2 as an acceptable alternative |
3 |
2 looks cleaner, and I personally sort projects and archives similarly (Server > Database > Schema > File) |
3 |
2, if nothing else it matches. Don't like putting the schema in file names. |
2 |
3 |
reasoning: Also in terms of 'fixing' the name, it is easier to delete a spurious dbo. in the dbo folder than it is to guess which schema should be prefixed onto a schema-less object. Therefore, a reluctant 3, because it is the only thing that 'works' in both scenarios. (if magic could occur, 2 for the people that would like it, and 3 that would like it that way, but i don't think that magic exists) Either 2 or 3 is better than having a slightly different name for the file than the thing it deploys. |
@amachanic: may I submit two suggestions for future votings:
|
2 - sp_WhoIsActive.sql |
2 |
Matches the First Responder Kit's naming (btw. maybe integrate it there @BrentOzarULTD) |
I personally vote for option 2. Option 3 would be preferable to option 1, but it would still not be ideal due to the flattened hierarchy it causes. |
Vote for 2 |
3 |
3 |
#2 sp_WhoIsActive.sql |
@amachanic ~1.5 years passed, so when you're choosing the winning option since you've originally wrote about pinning it "for a few weeks"? |
1 similar comment
I like #2 as well for organization. |
3 |
2 |
1 similar comment
2 |
I've been attempting to learn the virtue of patience. :-) (I'll get to it very shortly, I promise.) |
2 |
2 |
2 |
@amachanic what if we just had all three available and kept them synced via some automation? |
Okay, I just counted the votes, finally. 2 wins. Here's the plan: I'm going to add a second file, copy of the first, with the new name. We'll carry it for a few versions. Then we'll drop the old file. Simple :-) |
@amachanic great thanks!
We also learned what a few weeks is equal to for adam smith) 118 weeks) my longest contribution to open source. |
Hi, Adam. Great thanks to move in open source club your awesome stored procedure. Could you rename
who_is_active.sql
todbo.sp_WhoIsActive.sql
(prefered for me ) or justsp_WhoIsActive.sql
?The text was updated successfully, but these errors were encountered: