![]() The name of the Heterogeneous Services initialization file is init SID. Each agent has its own heterogeneous services initialization file. To configure the agent, you must set the initialization parameters in the heterogeneous services initialization file. Step 4: Create the Heterogeneous Services Initialization File Verify that the Version field lists the correct version of the source Excel file. For example, odbc_excel.Ĭlick Select Workbook to select the Excel file from which you want to extract data. The ODBC Microsoft Setup dialog box is shown in Figure 5-1.įigure 5-1 ODBC Microsoft Excel Setup Dialog Boxĭescription of "Figure 5-1 ODBC Microsoft Excel Setup Dialog Box" Select Microsoft Excel Driver as the driver for which you want to set up the data source.Ĭlick Finish to open the ODBC Microsoft Excel Setup dialog box. Navigate to the System DSN tab and click Add to open the Create New Data Source dialog box. This opens the ODBC Data Source Administrator dialog box. Select Start, Settings, Control Panel, Administrative Tools, Data Sources (ODBC). ![]() Set up a System Data Source Name (DSN) using the Microsoft ODBC Administrator. Ensure that the column names confirm to the rules for naming columns in the Oracle Database.įrom the Insert menu, select Name and then Define. The range should include the column names and the data. In the employee_details worksheet, highlight the range to query from Oracle. If you want to delimit the data to be imported from the Excel file, then define a name for the range of data being sourced: Step 2: Delimit the Data in the Excel File (Optional) ![]() By default, the ODBC driver for Excel is installed on a Windows system. To read data from Microsoft Excel, you need the ODBC driver for Excel. This command works for the SQL Server Native Client ODBC driver.This case study shows you how to use an Excel file called employees.xls as a source in Oracle Warehouse Builder. The second command uses the ForEach Windows PowerShell keyword to step through each member of $DsnArray.įor each member, the command uses the current cmdlet to migrate DSNs using the SQL Server Native Client 10.0 driver to a newer version of that driver. The first command gets ODBC data source names by using the Get-OdbcDsn cmdlet, and then stores them in the $DsnArray variable. PS C:\> Add-OdbcDsn -Name $Dsn.Name -DsnType $Dsn.DsnType -Platform $Dsn.Platform -DriverName 'SQL Server Native Client 12.0' -SetPropertyValue $Dsn.PropertyValue # if DSN attributes have been changed in the new driver version # You can change the property array as well, Example 4: Migrates DSNs to a newer version of a driver PS C:\> $DsnArray = Get-OdbcDsn -DriverName 'SQL Server Native Client 10.0' Without PassThru, the cmdlet does not return anything. ![]() The command includes the PassThru parameter. ![]() This command adds the ODBC System DSNs named MyPayroll that use SQL Server Native Client 10.0 with the specified DSN properties, and then stores the results in the $NewDsn variable. Example 3: Add and store an ODBC System DSN PS C:\> $NewDsn = Add-OdbcDsn -Name "MyPayroll" -DriverName "SQL Server Native Client 10.0" -DsnType "System" -SetPropertyValue "Trusted_Connection=Yes", "Database=Payroll") -PassThru This command adds the ODBC System DSNs named MyPayroll that use SQL Server Native Client 10.0 with the specified DSN properties.īecause the command does not include the Platform parameter, the platform architecture is the default, native platform. Example 2: Add an ODBC System DSN PS C:\> Add-OdbcDsn -Name "MyPayroll" -DriverName "SQL Server Native Client 10.0" -DsnType "System" -SetPropertyValue "Trusted_Connection=Yes", "Database=Payroll") This command adds a 32-bit ODBC User DSN named MyPayroll that uses the specified 32-bit driver with the specified properties. Examples Example 1: Add a 32-bit ODBC User DSN PS C:\> Add-OdbcDsn -Name "MyPayroll" -DriverName "Microsoft Access Driver (*.mdb, *.accdb)" -DsnType "User" -Platform "32-bit" -SetPropertyValue 'Dbq=C:\mydatabase.accdb' You can specify the properties of the DSN by using the SetPropertyValue parameter.ĭo not use the Set-OdbcDsn cmdlet to add a new DSN.įor more information about ODBC, data source names, and drivers, see Microsoft Open Database Connectivity (ODBC), Data Sources, and Drivers on the Microsoft Developer Network. The Add-OdbcDsn cmdlet adds an Open Database Connectivity (ODBC) data source name (DSN) to the computer. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |