Database Technet Quiz - 6

10 Questions | Total Attempts: 33

SettingsSettingsSettings
Please wait...
Database Quizzes & Trivia

This is your description.


Questions and Answers
  • 1. 
    When we install and configure EBS Database Maintenance utility will create ‘BonusingInfrastructure’ Database to store purge history?
    • A. 

      True

    • B. 

      False

  • 2. 
    What will be the out of the following script? IF object_id('table_a') IS NOT NULL   DROP TABLE table_a   CREATE TABLE table_a   (      a INT IDENTITY(50,1),      b INT   )   SET identity_insert table_a ON   --stmt 1 INSERT INTO table_a             (a,              b) VALUES     (100,             1)   SET identity_insert table_a OFF   --stmt 2 INSERT INTO table_a VALUES      (2)   --stmt 3 SET identity_insert table_a ON   INSERT INTO table_a             (a,              b) VALUES     (4,             3) SET identity_insert table_a OFF   --stmt 4 INSERT INTO table_a VALUES      (4)     SELECT * FROM   table_a   where b=4
    • A. 

      52,4

    • B. 

      5,4

    • C. 

      102,4

    • D. 

      51,4

    • E. 

      101,4

  • 3. 
    From SQL Server 2008 and above, Which Database Manitenance View(DMV) is used to find dependent Stored Procedures for given table?
    • A. 

      Sys.tables

    • B. 

      Sys.sql_modules

    • C. 

      Sys.sql_expression_dependencies

    • D. 

      Sys.dm_sql_referencing_entities

  • 4. 
    How many rows a returned from this batch? CREATE PROC #TEMP AS DECLARE @A INT = 0 DECLARE @TABLE TABLE (ID INT IDENTITY(1,1), VAL INT)   WHILE 1 = 1 BEGIN          INSERT INTO @TABLE     SELECT 1       IF @a = 10     BEGIN                  INSERT INTO @TABLE         SELECT @a                  RETURN 1;                          INSERT INTO @TABLE         SELECT 2     END          SET @a += 1; END   SELECT * FROM @TABLE WHERE VAL > 1;   GO   EXEC #TEMP   DROP PROC #TEMP
    • A. 

      Two rows in the result set.

    • B. 

      Only one row in the result set.

    • C. 

      No row in the result set.

  • 5. 
    Number of execution threads in SQL Server varies based on number of CPU and Server Editions(32-bit/64-bit)?
    • A. 

      True

    • B. 

      False

  • 6. 
    Which batches execute successfully? (select 4) --First batch create table dbo.existing (c int); go --Second batch create procedure dbo.test_existing as  if (1<>1)   begin    select c from dbo.non_existing;   end  else   begin    select c from dbo.existing;   end go --Third batch execute dbo.test_existing; go --4th batch alter procedure dbo.test_existing as  if (1=1)   begin    select c from dbo.non_existing;   end  else   begin    select c from dbo.existing;   end go --5th batch execute dbo.test_existing; go
    • A. 

      1st

    • B. 

      2nd

    • C. 

      3rd

    • D. 

      4th

    • E. 

      5th

  • 7. 
    What are the results for cp.pkey when you run following statement: CREATE TABLE dbo.Sales(name nvarchar(50), pkey int);   insert dbo.Sales values('AAA',0);  insert dbo.Sales values('BBB',1);    SELECT up.name, cp.name,up.pkey,cp.pkey  FROM dbo.Sales AS up, Sales AS cp   WHERE up.pkey = 1 or cp.pkey = 0  ORDER BY 4;   drop table dbo.Sales;
    • A. 

      0,0,1,1

    • B. 

      0,1,1,1

    • C. 

      0,1,1

    • D. 

      0,0,1

    • E. 

      0,1

  • 8. 
    Which System function used to get SQL Server Edition(i.e Standard/Enterprise)?
    • A. 

      SERVERPROPERTY

    • B. 

      OBJECTPROPERTY

    • C. 

      DATABASEPROPERTY

    • D. 

      DATABASEPROPERTYEX

  • 9. 
    What will be the result set?  Declare @customer Table ( ID int                     , Name varchar(20)                     );   Declare @Order Table ( OrderID int identity(1,1)                     , customerID int                     );   Insert into @customer  Values (1,'JOHNNY BRAVO'), (2,'MICKI'), (3,'POWERPUFF GIRLS')   INSERT INTO @Order   VALUES (1), (3)   SELECT     ID, NAME  FROM @customer C  WHERE NOT EXISTS ( SELECT 1                     FROM @Order WHERE ID = c.ID)
    • A. 

      SQL Server will show an error.

    • B. 

      One row will be in the result set.

    • C. 

      No rows will be in the result set.

  • 10. 
    Which option would we use to encrypt the definition of the view and prevent users of the database from seeing it?
    • A. 

      SCHEMABINDING

    • B. 

      Transparent Data Encryption (TDE)

    • C. 

      ENCRYPTION

    • D. 

      None of the above

Related Topics
Back to Top Back to top