logo

CuriousTab

CuriousTab

Discussion


Home Certification Microsoft Certification See What Others Are Saying!
  • Question
  • You are the administrator of a SQL Server 2000 computer. The server contains a database named FinanceData that is used by a client/server application. Each employee has a SQL Server login that the application uses to access the server.Your company hires a new employee named Andrew. You create a SQL Server login named Andrew. You also create a database user named Andrew in the database and grant the database user full permissions in the database.Whenever Andrew runs the client/server application, he receives the following error message: "Invalid object name." Andrew also reports that he cannot access the database by using the application.You need to ensure that Andrew can use the application. Which Transact-SQL statement should you execute?


  • Options
  • A. EXEC sp_defaultdb 'Andrew','FinanceData'
  • B. GRANT ALL ON FinanceData TO Andrew
  • C. EXEC sp_addlogin 'Andrew'
  • D. EXEC sp_grantdbaccess 'FinanceData','Andrew'GOsp_addrolemember 'db_datareader','Andrew'

  • Correct Answer
  • EXEC sp_defaultdb 'Andrew','FinanceData' 

    Explanation

    Error 208 produces the message 'Invalid object name' and occurs when an object that does not exist in the current database is referenced. If the object exists in another database, we must use the USE statement to explicitly switch the context to the correct database or we must qualify the object name with the database name. A third option is to use the sp_defaultdb stored procedure. This stored procedure is used to change the default database for a login. When a client connects with SQL Server, the default database defined for its login becomes the current database without an explicit USE statement. The default database can be defined when the login is added with
    sp_addlogin. When executing sp_addlogin the master database is the default database if a database is not specified. In this scenario a SQL Server 2000 login and a user account has been created for Andrew and he has been given database access and the required permissions.


  • More questions

    • 1. Why do you need common fields in a Database?
    • Discuss
    • 2. Insert command falls in which sub-language of SQL ?

    • Options
    • A. DCL
    • B. DQL
    • C. DML
    • D. DDL
    • Discuss
    • 3. How many joining conditions are required to join 4 tables in SQL?

    • Options
    • A. 1
    • B. 2
    • C. 3
    • D. 4
    • Discuss
    • 4. What command would you use to create a backup control file?
    • Discuss
    • 5. The SQL keyword BETWEEN is used:

    • Options
    • A. for ranges
    • B. as a wildcard
    • C. to limit the columns displayed
    • D. All the above
    • Discuss
    • 6. Sensitivity analysis is used to

    • Options
    • A. identify the risks which have the largest potential impact on the project.
    • B. determine which risks are most troubling to the customer.
    • C. identify hidden requirements that were not recognized at the outset of the project.
    • D. determine which requirements will add the greatest customer satisfaction for the least effort.
    • Discuss
    • 7. Report Performance is a member of which process group?

    • Options
    • A. Controlling
    • B. Planning
    • C. Executing
    • D. Closing
    • Discuss
    • 8. A quality audit is

    • Options
    • A. a structured, independent review to determine whether project activities comply with organizational and project policies, processes, and procedures.
    • B. the process of regularly evaluating overall project performance to provide confidence that the project will satisfy relevant quality standards.
    • C. an approach where the team members meet regularly to improve the process of quality control on their project.
    • D. the process of determining the appropriate actions to increase the effectiveness and efficiency of the project to provide added benefits to project stakeholders.
    • Discuss
    • 9. Executing Process Group What are the Project Management Processes included in the Executing Process Group?
    • Discuss
    • 10. Monitoring and Controlling Process Group What are the Project Management Processes included in Monitoring and Controlling Process Group?
    • Discuss


    Comments

    There are no comments.

Enter a new Comment