Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Site Related Forums
 The Yak Corral
 What would you say?

Author  Topic 

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2012-02-17 : 15:29:03
An email I received:

What I'm hoping for is enough permissions in database "xyz" to create and modify stored procs, and of course, execute any proc that I create. It is odd to me that I can create them now, but not run them.

I have been a DBA in the past, and I do know my way around SQL Server. I don't want any permissions on anything even close to production, but I would like more power in the dev environment.


And the proc in question

CREATE PROCEDURE [dbo].[TRIM_TABLE] (@tablename varchar(100))
AS
BEGIN

SET NOCOUNT ON;

declare @sqlstring varchar(1000)
create table #tempSQL (sql varchar(1000))

declare sqlCursor CURSOR FAST_FORWARD FOR select sql from #tempSQL

INSERT INTO #tempSQL
select ('UPDATE '+@tablename+' '+ 'set ['+cols.name+'] = ltrim(rtrim(['+cols.name+']));') as sql
from sys.columns cols, sys.tables tabs, sys.types
where 1=1
and tabs.name = @tablename
and tabs.object_id = cols.object_id
and cols.system_type_id = sys.types.system_type_id
and sys.types.collation_name like 'SQL_%'

OPEN sqlCursor FETCH NEXT FROM sqlCursor INTO @sqlString
WHILE @@FETCH_STATUS = 0
BEGIN
exec (@sqlstring)
FETCH NEXT FROM sqlCursor INTO @sqlString
END

CLOSE sqlCursor
DEALLOCATE sqlCursor

END

GO

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2012-02-17 : 15:42:23
What would you say?

What is the meaning of DBA in your linguistic usage?


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2012-02-17 : 17:16:21
My answer would include combinations of "fuck", "no", "are", "you", "crazy", "no" and "way". I'm not sure I could assemble them into a coherent sentence either, but I have that trouble constantly, especially on SQLTeam posts.

I would gladly have a quiet, instructive intervention on what is wrong with that stored procedure, but couldn't guarantee I wouldn't pull their arms out and beat them with it before I finished.
Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2012-02-17 : 17:58:20
LIKE


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

jezemine
Master Smack Fu Yak Hacker

2886 Posts

Posted - 2012-02-17 : 19:46:41
rob, you forgot "you're" and "fired"


elsasoft.org
Go to Top of Page

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2012-02-20 : 10:17:58
I was too flabbergasted to reply for most of the day.
Go to Top of Page

JimL
SQL Slinging Yak Ranger

1537 Posts

Posted - 2012-02-20 : 16:03:44
Did you report him for smoking crack on the job.

D umb
B onehead
A sshole

Jim
Users <> Logic
Go to Top of Page

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2012-02-20 : 16:53:24
I would really like to know why they want to do this.



CODO ERGO SUM
Go to Top of Page

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2012-02-20 : 17:31:09
Because their ETLs are no good I suspect
Go to Top of Page

DonAtWork
Master Smack Fu Yak Hacker

2167 Posts

Posted - 2012-02-21 : 11:07:37
an old Cajun expression would suffice:

Oh HELL fuck ass no.

http://weblogs.sqlteam.com/jeffs/archive/2008/05/13/question-needed-not-answer.aspx
How to ask: http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

For ultra basic questions, follow these links.
http://www.sql-tutorial.net/
http://www.firstsql.com/tutor.htm
http://www.w3schools.com/sql/default.asp
Go to Top of Page

elwoos
Master Smack Fu Yak Hacker

2052 Posts

Posted - 2012-02-22 : 04:50:49
I think I would say (excuse any dodgy spelling) "twll dyn i chi".

I knew welsh would come in useful one day :)

For those who know even less welsh that me here is my effort at how to pronounce it

twll - too with a throaty ck (as in yuck) sound at the end
dyn - dean
i - eee (rhymes with tea)
chi - short throaty sound like when your clearing your throat, ending with an ee sound

Google doesn't translate it very well but you will get the idea

steve

-----------

What color do you want that database?
Go to Top of Page

elwoos
Master Smack Fu Yak Hacker

2052 Posts

Posted - 2012-02-22 : 04:54:06
You could also say "Which company were you a DBA for?" then ring them up and offer to fix their database for a nice consultancy fee


steve

-----------

What color do you want that database?
Go to Top of Page

RickD
Slow But Sure Yak Herding Master

3608 Posts

Posted - 2012-02-22 : 07:24:20
We don't always get what we like and this is one of those.

Or

How long was it before the company you were a DBA for went bust?
Go to Top of Page

RickD
Slow But Sure Yak Herding Master

3608 Posts

Posted - 2012-02-22 : 07:26:01
We don't always get what we like and this is one of those.

Or

How long was it before the company you were a DBA for went bust?
Go to Top of Page
   

- Advertisement -