You suspect unauthorized data manipulation language (DML) operations on a particular table. Youwant to track users who are performing the transactions and the values used in the transactions. You alsoplan to transfer these values to another table for anal

题目

You suspect unauthorized data manipulation language (DML) operations on a particular table. Youwant to track users who are performing the transactions and the values used in the transactions. You alsoplan to transfer these values to another table for analysis.  How would you achieve this()

  • A、by using triggers
  • B、by using Data Pump
  • C、by using external tables
  • D、by using anonymous PL/SQL blocks
参考答案和解析
正确答案:A
如果没有搜索结果或未解决您的问题,请直接 联系老师 获取答案。
相似问题和答案

第1题:

You are the administrator of a SQL Server 2000 computer. The server contains a database that stores financial data. You want to use Data Transformation Services packages to import numeric data from other SQL server computers. The precision and scale values of this data are not defined consistently on the other servers.

You want to prevent any loss of data during the import operations. What should you do?

A.Use the ALTER COLUMN clause of the ALTER TABLE statement to change data types in the source tables. Change the data types so that they will use the lowest precision and scale values of the data that will be transferred.

B.Use the ALTER COLUMN clause of the ALTER TABLE statement to change data types in the destination tables. Change the data types to reflect the highest precision and scale values involved in data transfer.

C.Set a flag on each DTS transformation to require an exact match between source and destination columns.

D.Set the maximum error count for each DTS transformation task equal to the number of rows of data you are importing. Use an exception file to store any rows of data that generate errors.

E.Write Microsoft ActiveX script. for each DTS transformation. Use the script. to recast data types to the destinations precision and scale values.


正确答案:B
解析:Explanation: The ALTER COLUMN clause of the ALTER TABLE statement can be used to change the definition of a column and can be used to alter the precision and scale values of the data types. The destination precision should be changed so no data would be lost. The transformation to a data type with higher precision is automatic and would not require any coding.

Note: The precision of the data type refers to the number of digits in a number while the scale is the number of digits to the right of the decimal point in a number. Thus the number 702.85 has a precision of 5 and a scale of 2. The default maximum precision of numeric and decimal data types is 38.

Incorrect Answers:
A: The ALTER COLUMN clause of the ALTER TABLE statement can be used to change the definition of a column and can be used to alter the precision and scale values of the data types. However, we want to prevent any loss of data therefore we need to ensure that the data being imported correlates with the definition of the destination column. If it does not, any constraint that might exist on the destination column will prevent the data from being inserted.

C: Setting DTS transformation to require an exact match between source and destination columns refers to the data in the columns.

D: When the a maximum error count value for a DTS transformation task specifies the sum of row-level errors detected by the Transform. Data task and batch failures. When the Max error count value is exceeded, DTS task execution is terminated. Because rows containing errors detected by the DTS transformation task are discarded before batch submission, these errors do not trigger nor count as batch failures. Errors caught at the destination will fail the batch and add one to the error count regardless of how many rows are in the batch.

E: Recasting data types to the destinations precision could result in loss of data. The destination precision should be changed so no data would be lost.

Note: The capabilities of a Data Transformation Service package can be extended by using
Microsoft ActiveX scripts that implement the objects, properties, methods, and collections of the DTS object model. With ActiveX scripts the data can be formatted and transformed as it is copied from its source to the destination location.

An ActiveX script. transformation applies to tasks that work on the source data on a row-by-row basis and can be used to replace a two-digit state code in the source data with the legal abbreviation of the state in the destination data; set columns to a default of spaces, validate important columns in the source data and skip records that contain invalid data to prevent them from being copied to the destination, and alter the precision and scale values of data as the data copied from the source to the destination.

第2题:

You discover that the schema changes that were recently made to your SQL Server 2005 database have caused your Web site to stop functioning. It is unclear who made the changes. TestKing.com now mandates that all changes to the database schema be tracked. You need to implement a mechanism that will track schema changes in your database.  What should you do?()

  • A、Implement a stored procedure that writes data about schema changes to a log table.
  • B、Implement DDL AFTER triggers that write user and schema information to a log table.
  • C、Implement a DML INSTEAD OF trigger that writes data about schema changes to a log table.
  • D、Implement a DML AFTER trigger that writes data about schema changes to a log table.

正确答案:B

第3题:

You are the database administrator for a retail company. The company owns 270 stores. Every month, each store submits approximately 2,000 sales records, which are loaded into a SQL Server 2000 database at the corporate headquarters.

A Data Transformation Services (DTS) package transforms the sales records, as they are loaded. The package writes the transformed sales records to the Sales table, which has a column for integer primary key values. The IDENTITY property automatically assigns a key value to each transformed sales record.

After loading this month's sales data, you discover that a portion of the data contains errors. You stop loading data, identify the problem records, and delete those records from the database.

You want to reuse the key values that were assigned to the records that you deleted. You want to assign the deleted key values to the next sales records you load. You also want to disrupt users' work as little as possible.

What should you do?

A.Export all records from the Sales table to a temporary table. Truncate the Sales table, and then reload the records from the temporary table.

B.Export all records from the Sales table to a text file. Drop the Sales table, and then reload the records from the text file.

C.Use the DBCC CHECKIDENT statement to reseed the Sales table's IDENTITY property.

D.Set the Sales table's IDENTITY_INSERT property to ON. Add new sales records that have the desired key values.


正确答案:C
解析:Explanation: DBCC CHECKIDENT is used to check the current identity value for the specified table. It can be set to correct the identity value by specifying the RESEED option with DBCC CHECKIDENT.

Note: Example:
Assume that we have a table called test with an identity column with seed (1,1) and 1000 rows and that we delete row 901 to 950. We could then issue the command
DBCC CHECKIDENT (test, reseed, 900)

And load the 50 missing rows. These rows would get the values 901, 902, …,950 in the identity column.
We should then set the identity value to 1000 again:
DBCC CHECKIDENT (test, reseed, 1000)

So that the next new row will have identity 1001.

Incorrect Answers:
A: Exporting the data from the Sales table and then reloading the data will not correct errors contained in the table as these errors will also be exported as they are part of the data already in the table.
B: Exporting the data from the Sales table and then reloading the data will not correct errors contained in the table as these errors will also be exported as they are part of the data already in the table.

D: The SET IDENTITY_INSERT command allows explicit values to be inserted into the identity column of a table. To reuse the old key values from the rows that was deleted would require manual commands and would be awkward. This is not the best solution.

第4题:

In which case would you use a FULL OUTER JOIN?()

  • A、Both tables have NULL values.
  • B、You want all unmatched data from one table.
  • C、You want all matched data from both tables.
  • D、You want all unmatched data from both tables.
  • E、One of the tables has more data than the other.
  • F、You want all matched and unmatched data from only one table.

正确答案:D

第5题:

In your test database, you have created the ORDERS table as an index/x7forganized table (IOT). To facilitate faster querying, you have created a mapping table and a bitmap index on the ORDER_FILLED column. You observe that the query performance degrades when users perform a large volume of transactions.  While investigating the reason, you find that the mapping table segment is fragmented, leading to poor performance. Which option would you use to defragment the mapping table without affecting the original table data?()

  • A、export and import the mapping table
  • B、drop and re­create the mapping table
  • C、truncate the mapping table and reinsert the values
  • D、use the ALTER TABLE .. REBUILD command to defragment the mapping table

正确答案:B

第6题:

You added a PHONE_NUMBER column of NUMBER data type to an existing EMPLOYEES table. The EMPLOYEES table already contains records of 100 employees. Now, you want to enter the phone numbers of each of the 100 employees into the table. Some of the employees may not have a phone number available. Which data manipulation operation do you perform?()

  • A、MERGE
  • B、INSERT
  • C、UPDATE
  • D、ADD
  • E、ENTER
  • F、You cannot enter the phone numbers for the existing employee records.

正确答案:C

第7题:

Which statement correctly describes SQL and /SQL*Plus?()

  • A、Both SQL and /SQL*plus allow manipulation of values in the database.
  • B、/SQL* Plus recognizes SQL satement and sends them to the server; SQL is the Oracle proprietary interface for executing SQL statements.
  • C、/SQL* Plus language for communicating with the Oracle server to access data; SQL recognizes SQL statements and sends them to the server.
  • D、/SQL manipulates data and table definition in the database; /SQL* Plus does not allow manipulation of values in the database.

正确答案:A

第8题:

You added a PHONE_NUMBER column of NUMBER data type to an existing EMPLOYEES table. The EMPLOYEES table already contains records of 100 employees. Now, you want to enter the phone numbers of each of the 100 employees into the table. Some of the employees may not have a phone number available. Which data manipulation operation do you perform? ()

A. MERGE

B. INSERT

C. UPDATE

D. ADD

E. ENTER

F. You cannot enter the phone numbers for the existing employee records.


参考答案:C

第9题:

On Jan 11, 2005 at 2:30 P.M., an erroneous update operation modified all the values of column LASTNAME in the EMPLOYEE table in the Scott schema to an empty string. You are the system administrator, and you want to return the original values in the table. To do so, you decided to flash back the table. Which two options can you use to flash back a table?()

  • A、 by using Oracle Enterprise Manager
  • B、 by issuing the FLASHBACK TABLE statement at the RMAN prompt
  • C、 by issuing the FLASHBACK TABLE statement at the SQL prompt
  • D、 by issuing the FLASHBACK TABLE statement at the LSNRCTL prompt

正确答案:A,C

第10题:

You suspect unauthorized data manipulation language (DML) operations on a particular table. You want to track users who are performing the transactions and the values used in the transactions. Also, you plan to transfer these values to another table for analysis.  How would you achieve this?()

  • A、by using triggers
  • B、by using external tables
  • C、by using anonymous PL/SQL blocks
  • D、by auditing all DML operations on the table

正确答案:A

更多相关问题