1. Trang chủ
  2. » Công Nghệ Thông Tin

The Real MTCS SQL Server 2008 Exam 70/432 Prep Kit- P82 ppsx

5 72 0

Đang tải... (xem toàn văn)

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 5
Dung lượng 101,72 KB

Nội dung

ETLTechniques•Chapter8 387 Exam Objectives Frequently Asked Questions Q: When I use BCP to export data to a csv file, the column names are not shown in the header row. Is there a way to do this? A: No, BCP does not support exporting to data files with a header row. You can import from a file with a header row, however, by using the –F switch to skip the first row. Q: I need to create a format file for my import to work. Should I use a non-XML format file or an XML format file? A: If you need to maintain compatibility with an older version of BCP, you should use a non-XML format file. Otherwise, the XML format files are often easier to work with, and they are the new format file type. Q: When I open my source file in notepad, I can see the data. There are spaces between the letters, but it is readable. However, when I try to import the data, BCP fails. What might be the problem? A: The source data file is likely a Unicode data file. Try running the BCP import command with the –w command argument to specify a Unicode file type. Q: I want to write a report that shows data from both SQL Server and Oracle in a single query. Should I use the ad hoc query functions or create a linked server? A: If this is a report that will be long running, not just a onetime deal, then you should create a Linked Server to run the report against. Q: I use Oracle’s syntax when I query my Oracle instance using a linked server. However, when I try to enter that syntax in SSMS, I get errors. What should I do? A: To use Oracle’s own syntax, you need to send it using a pass-through query. The OPENQUERY( ) function allows you to submit a query to be processed by the remote instance. 388 Chapter8•ETLTechniques Q: While trying to run a distributed transaction across to SQL Server instances, I receive an error with the number 8501, stating that the “MSDTC on server ‘….’ is unavailable”. What do I need to do to fix the problem? A: Distributed transactions between two SQL Server instances on separate machines require each machine to have the Distributed Transaction Coordinator service started. Ensure that the service is started on both machines and try the transaction again. Q: I need to export data from one production system between 10:00 p.m. and 12:00 a.m., but I can’t import the data into the destination server until after 2:00 a.m. What should I do? A: You could create two SSIS packages. One package would export from the source system to an intermediate file (csv, or better yet use SSIS’s RAW file format). Schedule that package to run at 10:00 p.m. The second package would import from the intermediate file to the destination server. Schedule that package to run at 2:00 a.m. Q: I created a package in BIDS. The package ran successfully on my workstation. When I deployed it to the production server, it failed. What could be the problem? A: When you run a package in BIDS on your workstation, it runs with your credentials and uses data paths that are relative to your workstation. When you deploy it to a production environment, it is normally being run with the SQL Server Agent service. Ensure that the SQL Server Agent Job is being run with a proxy that has access to the databases the package connects to, and that the connection strings to the databases are correct for the production environment. Q: I want to create a package that imports data daily from a text file that has a file name based on the date and time the file was created. Can I do that with the Import and Export Wizard? A: Unfortunately, no. This is an example of where you would need to create a custom package using BIDS. You could create the custom package using a sample file with the Import and Export Wizard, but you would have to open the package in BIDS to implement the dynamic file name and redeploy the package. ETLTechniques•Chapter8 389 Self Test 1. You want to export data from a SQL Server instance to a text file. This operation needs to be scheduled to run at night without human intervention. Select the best option from the following possibilities: A. Use BCP in a SQL Server Agent Job B. Use BULK INSERT in a SQL Server Agent Job C. Use SQLCMD in a SQL Server Agent Job D. Use OSQL in a SQL Server Agent Job 2. You want to use BCP to transfer data between two instances of SQL Server 2008. The table that you will be transferring data for has some columns that use the nvarchar( ) data type, and has. To ensure that the data is transferred without any corruption of the character data, which data file type should you use? A. Character B. Unicode C. Native D. Unicode native 3. You need to import data from a data file that has a different number of fields than the target table. What could you do to import the file (select all that apply)? A. Create a format file to map the columns B. Create an XML format file to map the columns C. Run BCP without a format file D. Run BULK INSERT without a format file 4. You need to export data based on a join of two tables into a single flat file. Which of the following bcp command line arguments supports this kind of operation? A. in B. out C. queryout D. format 390 Chapter8•ETLTechniques 5. When doing a BULK INSERT operation you receive an error stating that the transaction log for the database is full. What can you do to make the BULK INSERT succeed (Select all that apply)? A. Set the database’s recovery model to BULK_LOGGED B. Run the BULK INSERT with the TABLOCK option C. Set the database’s recovery model to FULL D. Use BCP instead of BULK INSERT 6. A BULK INSERT operation you run weekly takes too long to execute. You have been asked to optimize the performance of the operation. Which of the following options could help (select all that apply)? A. Break the file into smaller pieces and run multiple BULK INSERT state- ments in parallel B. Break the file into smaller pieces and run multiple BCP commands in par- allel C. Ask for the source file to be sorted in the same order as the clustered index on the target table, and use the ORDER option. D. Drop any non-clustered indexes from the table before the load 7. When you are performing a minimally logged bulk operation against a data- base using the BULK_LOGGED recovery model, what must you do after the bulk operation completes to ensure your ability to recover the database? A. Change the database recovery model to FULL B. Change the database recovery model to SIMPLE C. Truncate the transaction log D. Backup the transaction log 8. You have created a linked server to your Oracle instance to control access to the data in the Oracle instance via SQL Server. You now want to prevent your users from performing distributed ad hoc queries against your Oracle instance. However, there are situations where developers need to perform distributed ad hoc queries against SQL Server instances. What could you do to prevent ad hoc access to only the Oracle instances? A. Use sp_configure to set “Ad Hoc Distributed Queries” to 0 B. Enable the “Disallow adhoc access” property on the Oracle OLE DB provider ETLTechniques•Chapter8 391 C. Un-install the Oracle providers from the server D. Create a linked server to the Oracle instance 9. You need to write a query that joins data from your local SQL Server Instance with data from an Oracle instance. You need to be able to submit specific syntax to the Oracle instance to get the correct results by using a pass-through query. No linked servers currently exist for the remote Oracle instance. You are not an administrator on the system. Which one of the following choices meets your needs? A. Use OPENQUERY( ) B. Use OPENDATASOURCE( ) C. Use OPENROWSET( ) D. Create a Linked Server 10. You need to provide support for distributed queries to a remote SQL Server instance, but you need to allow it only for selected users. Which one of the following solutions meets the requirements? A. Grant execute permissions on the OPENROWSET function to the selected users B. Create a linked server and assign the selected users credentials to use when connecting to the remote instance C. Enable the “disallow adhoc access” on the SQL Server OLE DB to prevent ad hoc access D. Use sp_configure to set the “Ad Hoc Distributed Queries” to 1 11. Developers complain that they are receiving errors when trying to perform ad hoc distributed queries against Oracle, although they are able to run distributed ad hoc queries against SQL Server. What must you do to solve the problem? A. Install the Oracle client libraries on the developer workstations. B. Use sp_configure to set the “Ad Hoc Distributed Queries” to 1 C. Enable the “disallow adhoc access” property on the Oracle OLE DB provider D. Disable the “disallow adhoc access” property on the Oracle OLE DB provider . the best option from the following possibilities: A. Use BCP in a SQL Server Agent Job B. Use BULK INSERT in a SQL Server Agent Job C. Use SQLCMD in a SQL Server Agent Job D. Use OSQL in a SQL. the SQL Server Agent service. Ensure that the SQL Server Agent Job is being run with a proxy that has access to the databases the package connects to, and that the connection strings to the. Otherwise, the XML format files are often easier to work with, and they are the new format file type. Q: When I open my source file in notepad, I can see the data. There are spaces between the

Ngày đăng: 07/07/2014, 00:20