Sybase ASE
All versions
Last updated: 05 October 2003
ASE Quiz Questions 2001
 
This page contains some quiz-type ASE questions to test your ASE knowledge.
More ASE quiz questions: 2013 - 2012 - 2011 - 2010 - 2009 - 2008 - 2007 - 2006 - 2005 - 2004 - 2003 - 2002 - 2001
For a randomly selected quiz question, click here.


December 2001
In ASE 12.5, which server page size (2Kb, 4Kb, 8Kb or 16Kb) should you use for the following statements to work successfully ?
Statement 1: declare @my_variable varchar(16000)
Statement 2: create table t (a varchar(1500))
Click here for the answer.

November 2001
Which T-SQL command performs no function at all ?

Click here for the answer.

October 2001
What is the easiest way to find all tables with a DOL lockscheme ?

Click here for the answer.

September 2001
Suppose it's one of those days when everything is going wrong: you realise that, by accident, you've issued a drop table or a delete or truncate table statement on some large, important table in a database that you thought was your test environment but really appears to be your production database. You're frantically hitting CTRL-C to abort the statement, but you're not sure if that has worked. Which immediate action would be your best chance of stopping the command before it completes ? (thus saving your data, your company and your job…)

Click here for the answer.

August 2001
To find out an ASE server's name, you normally run select @@servername. Can you also get the same information using fewer keystrokes ? (less typing minimises RSI risks ! ;-)

Click here for the answer.

July 2001
In ASE 12.5, which was released in June 2001, two major improvements have been made to the disk init command. Do you know which ones ? (note: one of these is not documented…)

Click here for the answer.

June 2001
raiserror is a trivial command, right ?

Question 1: which of the following four raiserror statements are correct, and which are wrong ?
-- ensure message 20000 exists
sp_addmessage 20000, "test message: %1!"
go
-- ensure message 20001 does not exist
sp_dropmessage 20001 
go

1) raiserror 20000, "this is a test"
2) raiserror 20000 "this is another test"
3) raiserror 20001 "this is yet another test"
4) raiserror 20001 "and this is %1!", "yet another one…"
Question 2: raiserror is allowed only for error numbers >= 17000 (try doing a raiserror 123). Why then, does sp_addmessage only allow you to create error messages for error numbers >= 20000 ? What's so special about the 17000-19999 range ?

Click here for the answer.

May 2001
Suppose you take the following steps:
  1. BCP-out a table to a file
  2. delete all rows from the table (or truncate it)
  3. BCP-in the data back into the table (using the same mode and terminators as in step 1)

...then the rows in the table will always be the same as before we started; right or wrong ?

Click here for the answer.

April 2001
A DBA has written the following little T-SQL program to build a loop executing some custom stored procedure 100 times, using the C-style loop control with the break statement. What's wrong about this program, if anything ?
declare @i int
while 1 = 1 -- always true
begin
   if @i = 100 
      break -- exit the loop
   select @i = @i + 1
   exec my_proc @i
end
Click here for the answer.


More ASE quiz questions: 2013 - 2012 - 2011 - 2010 - 2009 - 2008 - 2007 - 2006 - 2005 - 2004 - 2003 - 2002 - 2001
For a randomly selected quiz question, click here.


 
 This document is located at www.sypron.nl/quiz2001.html