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
 General SQL Server Forums
 New to SQL Server Programming
 Question

Author  Topic 

NewUser
Starting Member

2 Posts

Posted - 2007-05-04 : 02:40:50
1. I have 1 table "EmpTable" having 5 columns,2 indexes and 2 triggers.
I want to add new column to "EmpTable" at 3 position. How I can add the new column?
What is a flexible approch for this?
Table Structure is as follow

EmpTable -

col1 col2 col3 col4 col5

I want the structure as follow

col1 col2 ColNEw col3 col4 col5


2.What is the difference between roles and groups

3. There are two set of user,running on two different set of procedures
How to give a permissions to user on procedures
Ex - Database DB1 having 100 procedures.
user1 uses 50 procedures out of 100 and
user2 uses remaining 50 procedures.

4. Database DB1 having 100 procedures.
Also there are 3 groups Gr1,Gr2 and Gr3
Gr1 have 2 user uses 50 procedures out of 100 and
Gr2 have 5 user uses remaining 50 procedures.

But I want to add Gr1 & Gr2 to Gr3 so Gr3 can have the permission to all 100 Procedures.
How I can add Gr1 & Gr2 to Gr3.

5. How cache deadlocking is handle in stored procedures?

6. concept of @@TranCount

7. What is Nested transaction

Plz tell me the answer of the above all questions.

jezemine
Master Smack Fu Yak Hacker

2886 Posts

Posted - 2007-05-04 : 02:48:52
will you hire me if i pass this interview? or is it homework?


www.elsasoft.org
Go to Top of Page

NewUser
Starting Member

2 Posts

Posted - 2007-05-04 : 02:54:52
These are all interview questions
Go to Top of Page

jezemine
Master Smack Fu Yak Hacker

2886 Posts

Posted - 2007-05-04 : 02:57:39
I suggest looking for the answers in BOL. then come back here if you can't figure it out.


www.elsasoft.org
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2007-05-04 : 05:45:05
Also do google search

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-05-04 : 06:06:13
1. What's the purpose? Simple and inefficient way is to copy data to some temporary table, drop and recreate table with desired schema and copy back the data.

2. Group is OS terminology while Role is SQL Server specific

3. Make use of GRANT EXECUTE statement

4. Again, there are is no concept of GROUP in SQL Server

5. Cache Deadlock? Never heard of? Enlighten me, plz

6. What concept? @@TRANCOUNT is system variable indicating no. of open transactions

7. What is nested if, nested loops, nested triggers, nested procs...same is the case with nested transactions.



Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

pbguy
Constraint Violating Yak Guru

319 Posts

Posted - 2007-05-04 : 06:11:52
You are appointed :-)
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2007-05-04 : 06:35:42
quote:
Originally posted by pbguy

You are appointed :-)

Are you the one who asked those questions?

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

drewsalem
Constraint Violating Yak Guru

304 Posts

Posted - 2007-05-04 : 06:36:23

If this is for an interview, then good for you (we weren't all lucky enough to get trained or be a junior DBA). Here are some pointers, but you'll need to understand them for the interview.


1. You can do this with Enterprise Manager (SQL 2000) under Diagrams (clicking the column and pulling it to the required position or Management Studio (SQL 2005) under Modify (also click and pull).


2. http://www.microsoft.com/technet/prodtechnol/sql/2000/maintain/sp3sec01.mspx

3. Right click on the user in Management Studio, Properties, Securables, Add, Specific Objects, Object Types, Select Stored Procedures and Browse.

4. Don't get that one.

5. Don't know the answer to that. Does anyone else?

6. You can ask SQL Server to remember a transaction by typing BEGIN TRANSACTION before the query and COMMIT TRANSACTION AFTER THE QUERY. Until it reaches COMMIT TRANSACTION it is known as an Active Transaction. @@TranCount will tell you the current number of Active Transactions.

7. A Nested Transaction refers to the same type of transactions in 6, but you with one transaction within another.

Good luck.

Drew

Drew

"It's Saturday night; I've got no date, a two litre bottle of Shasta, and my all-Rush mix tape... LET'S ROCK."
Go to Top of Page

NeilG
Aged Yak Warrior

530 Posts

Posted - 2007-05-04 : 08:23:10
Well done there drewsalem,

I hate it sometimes when people post things on here looking for help and get a sarcastic remark. I personally will not apologise for lack of knowledge in some areas, and sorry for not being as advanced as other people, but is that not what a forum is for to help gain and spread you own knowledge.

Little tip if a question is beneath your intellect then just don’t answer don’t just post sarcastic remarks
Go to Top of Page

drewsalem
Constraint Violating Yak Guru

304 Posts

Posted - 2007-05-04 : 08:33:55
quote:
Originally posted by NeilG

Well done there drewsalem,

I hate it sometimes when people post things on here looking for help and get a sarcastic remark. I personally will not apologise for lack of knowledge in some areas, and sorry for not being as advanced as other people, but is that not what a forum is for to help gain and spread you own knowledge.

Little tip if a question is beneath your intellect then just don’t answer don’t just post sarcastic remarks




Absolutely. Especially when you post to a forum entitled "New to SQL Server". Thing is, if you are new to it all then looking up something like @@Trancount won't help, because it will assume you know so much more.

Drew

"It's Saturday night; I've got no date, a two litre bottle of Shasta, and my all-Rush mix tape... LET'S ROCK."
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2007-05-04 : 09:05:42
"I hate it sometimes when people post things on here looking for help and get a sarcastic remark"

I gotta disagree with you (not that I am in favour of sarcastic remarks ...)

If folk pitch up here, dump their homework / whatever and 1) have made no attempt at it and 2) do not disclose the true nature of why they are asking then I don't answer the questions, and they often get short shrift from others. Their loss.

OTOH if someone says "This is homework, this is the question, this is what I have tried, this is what I am stuck on" then I am more than happy to help, and that goes for the folk you refer to who would otherwise post a sarcastic remark, I'm sure. The difference is that the chances are that the second type of poster will learn something, whereas the first type are going to waste my time because they will either not understand the reply, not use it, or cut & paste it straight into their homework and worst-case-scenario go into a career in SQL with insufficient knowledge.

There are several posters here, with hundreds of posts or more, who I also don't bother to answer. They are mostly courteous and probably conscientious, but they have repeated disregarded the advice given by everyone here, gone round and round in circles wasting the time of knowledgeable folk here, and are not going to benefit from anything I can try to help them with - and IMHO they will not benefit from me doing their work for them either!

But that leaves a HUGE number of folk pitching up here with real problems, looking for real help, keen to learn and even occasionally kind enough to come back and say thank you! I'm happy to do my best to help them.

Kristen
Go to Top of Page

drewsalem
Constraint Violating Yak Guru

304 Posts

Posted - 2007-05-04 : 09:20:52
I don't think the dude was being elusive about the nature of his questions, as they're clearly interview / homework type questions. And I can't assume that the poster will not understand the reply, not use it, or cut & paste it straight into their homework either, because I don't know the guy. If he's starting out new, then he would have REALLY stuggled getting a "for dummies" answer to those questions off google.

Anyway, they're answered now. Peace and Love to all. XXX

Drew

"It's Saturday night; I've got no date, a two litre bottle of Shasta, and my all-Rush mix tape... LET'S ROCK."
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2007-05-04 : 10:48:37
"If he's starting out new, then he would have REALLY stuggled getting a "for dummies" answer to those questions off google."

Sure, but then s/he shouldn't be attending an interview either!

If you want to answer such questions it doesn't bother me, but my view is that it is more helpful to the poster to ask what they think the answers are and then helping with where they are wrong. After all, if you go to an interview, or sit an exam, you may have no way of knowing whether your answer was correct or not, and might well want to know ... but you also know what answer you gave

Kristen
Go to Top of Page

jsmith8858
Dr. Cross Join

7423 Posts

Posted - 2007-05-04 : 10:56:16
I agree with Kristen completely on all points, for what it's worth.

Is he better off cutting and pasting the questions, and then cutting and pasting the answers given, or is he better off going to the library, getting a book on SQL Server, and actually LEARNING IT!?

If it is for a class, I would argue that he should already know this and certainly should be aware of where to find the answers (his teacher, other students, his textbook, etc).

If it is for an interview, then he is not qualified for the job and shouldn't get it, simple as that. Sounds cruel, but someone else is also probably applying for that same job who IS willing to put in the work to find these things out on their own through research, or they already know it, and IMHO they deserve the job a lot more.

- Jeff
http://weblogs.sqlteam.com/JeffS
Go to Top of Page

pootle_flump

1064 Posts

Posted - 2007-05-04 : 11:36:46
Agreed.

It is worth noting that there are some boards (one of which I am a member of) that ban users (or at least threaten to) that provide answers on a plate for homework questions. Personally I consider interview questions pretty well the same.

A copy and paste gets no response from me or a prod for the OP to demonstrate some willingness to put in some effort. If not forthcoming after the latter then no help from me.

Anyway - this has been covered millions of times already. In any event, if the guy doesn't have the wit to look up the answers himself he will get found out pretty quick.
Go to Top of Page
   

- Advertisement -