Jun 2, 2008

Import/Export in MS SQL Server 2005 Express

Actually, you can do the Import/Export in the Express edition, also you can run the SSIS. (But cannot create the script by Wizard)

Re-cap from other links

REF:
http://sgdotnet.org/forums/thread/55310.aspx


Download the MS SQL Server Express Edition from MS website
Install both of the followings
1) SQL Server 2005 Express Edition with Advanced Services SP2 &
2) Microsoft SQL Server 2005 Express Edition Toolkit

Now, you can run the import/export wizard by the default link
C:\Program Files\Microsoft SQL Server\90\DTS\Binn\DTSWizard.exe

If you have SSIS (".dtsx") created by the standard edition, you can run the dtsx in command prompt (cmd)
"C:\Program Files\Microsoft SQL Server\90\DTS\Binn\dtexec.exe" /f "C:\MyPackage.dtsx"

You can refer the dtexec by the MS website
Option Description

/? [option_name]

(Optional). Displays the command prompt options, or displays help for the specified option_name and then closes the utility.

If you specify an option_name argument, dtexec starts SQL Server Books Online and displays the dtexec Utility topic.

/CheckF[ile] filespec

(Optional). Sets the CheckpointFileName property on the package to the path and file specified in filespec. This file is used when the package restarts. If this option is specified and no value is supplied for the file name, the CheckpointFileName for the package is set to an empty string. If this option is not specified, the values in the package are retained.

/CheckP[ointing] {on\off}

(Optional). Sets a value that determines whether the package will use checkpoints during package execution. The value on specifies that a failed package is to be rerun. When the failed package is rerun, the run-time engine uses the checkpoint file to restart the package from the point of failure.

The default value is on if the option is declared without a value. Package execution will fail if the value is set to on and the checkpoint file cannot be found. If this option is not specified, the value set in the package is retained. For more information, see Using Checkpoints in Packages.

The /CheckPointing on option of dtexec is equivalent to setting the SaveCheckpoints property of the package to True, and the CheckpointUsage property to Always.

/Com[mandFile] filespec

(Optional). Specifies that during the command sourcing phase of the utility, the file specified in filespec is opened, options from the file are read until EOF is found in the file. filespec is a text file that contains additional dtexec command options. The filespec argument specifies the file name and path of the command file to associate with the execution of the package.

/Conf[igFile] filespec

(Optional). Specifies a configuration file to extract values from. Using this option, you can set a run-time configuration that differs from the configuration that was specified at design time for the package. You can store different configuration settings in an XML configuration file and then load the settings before package execution by using the /ConfigFile option.

/Conn[ection] id_or_name;connection_string [[;id_or_name;connection_string]…]

(Optional). Specifies that the connection manager with the specified name or GUID is located in the package, and specifies a connection string.

This option requires that both parameters be specified: the connection manager name or GUID must be provided in the id_or_name argument, and a valid connection string must be specified in the connection_string argument. For more information, see Connection Managers.

/Cons[oleLog] [[displayoptions];[list_options;src_name_or_guid]...]

(Optional). Displays specified log entries to the console during package execution. If this option is omitted, no log entries are shown in the console. If the option is specified without parameters that limit the display, every log entry will display. To limit the entries that are displayed to the console, you can specify the columns to show by using the displayoptions parameter, and limit the log entry types by using the list_options parameter.

The displayoptions values are as follows:

  • N (Name)
  • C (Computer)
  • O (Operator)
  • S (Source Name)
  • G (Source GUID)
  • X (Execution GUID)
  • M (Message)
  • T (Time Start and End)

The list_options values are as follows:

  • I - Specifies the inclusion list. Only the source names or GUIDs that are specified are logged.
  • E - Specifies the exclusion list. The source names or GUIDs that are specified are not logged.
  • The src_name_or_guid parameter specified for inclusion or exclusion is an event name, source name, or source GUID.

If you use multiple /ConsoleLog options on the same command prompt, they interact as follows:

  • Their order of appearance has no effect.
  • If no inclusion lists are present on the command line, exclusion lists are applied against all kinds of log entries.
  • If any inclusion lists are present on the command line, exclusion lists are applied against the union of all inclusion lists.

For several examples of the /ConsoleLog option, see the Remarks section.

/D[ts] package_path

(Optional). Loads a package from the SSIS Package Store. The package_path argument specifies the relative path of the SSIS package, starting at the root of the SSIS Package Store, and includes the name of the SSIS package. If the path or file name specified in the package_path argument contains a space, you must put quotation marks around the package_path argument.

The /DTS option cannot be used together with the /File or /SQL option. If multiple options are specified, dtexec fails.

/De[crypt] password

(Optional). Sets the decryption password that is used when you load a package with password encryption.

/F[ile] filespec

(Optional). Loads a package that is saved in the file system. The filespec argument specifies the path and file name of the package. You can specify the path as either a Universal Naming Convention (UNC) path or a local path. If the path or file name specified in the filespec argument contains a space, you must put quotation marks around the filespec argument.

The /File option cannot be used together with the /DTS or /SQL option. If multiple options are specified, dtexec fails.

/H[elp] [option_name]

(Optional). Displays help for the options, or displays help for the specified option_name and closes the utility.

If you specify an option_name argument, dtexec starts SQL Server Books Online and displays the dtexec Utility topic.

/L[ogger] classid_orprogid;configstring

(Optional). Associates one or more log providers with the execution of an SSIS package. The classid_orprogid parameter specifies the log provider, and can be specified as a class GUID. The configstring is the string that is used to configure the log provider.

The following list shows the available log providers:

  • Text file:
    • ProgID: DTS.LogProviderTextFile.1
    • ClassID: {59B2C6A5-663F-4C20-8863-C83F9B72E2EB}
  • SQL Server Profiler:
    • ProgID: DTS.LogProviderSQLProfiler.1
    • ClassID: {5C0B8D21-E9AA-462E-BA34-30FF5F7A42A1}
  • SQL Server:
    • ProgID: DTS.LogProviderSQLServer.1
    • ClassID: {6AA833A1-E4B2-4431-831B-DE695049DC61}
  • Windows Event Log:
    • ProgID: DTS.LogProviderEventLog.1
    • ClassID: {97634F75-1DC7-4F1F-8A4C-DAF0E13AAA22}
  • XML File:
    • ProgID: DTS.LogProviderXMLFile.1
    • ClassID: {AFED6884-619C-484F-9A09-F42D56E1A7EA}

/M[axConcurrent] concurrent_executables

(Optional). Specifies the number of executable files that the package can run concurrently. The value specified must be either a non-negative integer, or -1. A value of -1 means that SSIS will allow a maximum number of concurrently running executables that is equal to the total number of processors on the computer executing the package, plus two.

/P[assword] password

(Optional). Allows the retrieval of a package that is protected by SQL Server Authentication. This option is used together with the /User option. If the /Password option is omitted and the /User option is used, a blank password is used. The password value may be quoted.

Security Note:
When possible, use Windows Authentication.

/Rem comment

(Optional). Includes comments on the command prompt or in command files. The argument is optional. The value of comment is a string that must be enclosed in quotation marks, or contain no white space. If no argument is specified, a blank line is inserted. comment values are discarded during the command sourcing phase.

/Rep[orting] level [;event_guid_or_name[;event_guid_or_name[...]]

(Optional). Specifies what types of messages to report. The available reporting options for level are as follows:

N No reporting.

E Errors are reported.

W Warnings are reported.

I Informational messages are reported.

C Custom events are reported.

D Data Flow task events are reported.

P Progress is reported.

V Verbose reporting.

The arguments of V and N are mutually exclusive to all other arguments; they must be specified alone. If the /Reporting option is not specified then the default level is E (errors), W (warnings), and P (progress).

All events are preceded with a timestamp in the format "YY/MM/DD HH:MM:SS", and a GUID or friendly name if available.

The optional parameter event_guid_or_name is a list of exceptions to the log providers. The exception specifies the events that are not logged that otherwise might have been logged.

You do not have to exclude an event if the event is not ordinarily logged by default

/Res[tart] {deny | force | ifPossible}

(Optional). Specifies a new value for the CheckpointUsage property on the package. The meaning of the parameters are as follows:

Deny Sets CheckpointUsage property to DTSCU_NEVER.

Force Sets CheckpointUsage property to DTSCU_ALWAYS.

ifPossible Sets CheckpointUsage property to DTSCU_IFEXISTS.

The default value of force is used if no value is specified.

/Set propertyPath;value

(Optional). Overrides the configuration of a variable, property, container, log provider, Foreach enumerator, or connection within a package. When this option is used, /SET changes the propertyPath argument to the value specified. Multiple /SET options can be specified.

You can determine the value of propertyPath by running the Package Configuration Wizard. The paths for items that you select are displayed on the final Completing the Wizard page, and can be copied and pasted. If you have used the wizard only for this purpose, you can cancel the wizard after you copy the paths.

The following is an example of executing a package and providing a new value for a variable:

dtexec /f mypackage.dtsx /set \package.variables[myvariable].Value;myvalue

/Ser[ver] server

(Optional). When the /SQL or /DTS option is specified, this option specifies the name of the server from which to retrieve the package. If you omit the /Server option and the /SQL or /DTS option is specified, package execution is tried against the local server. The server_instance value may be quoted.

/SQ[L] package_path

Loads a package that is stored in SQL Server. The package_path argument specifies the name of the package to retrieve. If folders are included in the path, they are terminated with backslashes ("\"). The package_path value can be quoted. If the path or file name specified in the package_path argument contains a space, you must put quotation marks around the package_path argument.

You can use the /User, /Password, and /Server options together with the /SQL option.

If you omit the /User option, Windows Authentication is used to access the package. If you use the /User option, the /User login name specified is associated with SQL Server Authentication.

The /Password option is used only together with the /User option. If you use the /Password option, the package is accessed with the user name and password information provided. If you omit the /Password option, a blank password is used.

Security Note When possible, use Windows Authentication.

If the /Server option is omitted, the default local instance of SQL Server is assumed.

The /SQL option cannot be used together with the /DTS or /File option. If multiple options are specified, dtexec fails.

/Su[m]

(Optional). Shows an incremental counter that contains the number of rows that will be received by the next component.

/U[ser] user_name

(Optional). Allows the retrieval of a package that is protected by SQL Server Authentication. This option is used only when the /SQL option is specified. The user_name value can be quoted.

Security Note When possible, use Windows Authentication.

/Va[lidate]

(Optional). Stops the execution of the package after the validatation phase, without actually running the package. During validation, use of the /WarnAsError option causes dtexec to treat a warning as an error; therefore the package fails if a warning occurs during validation.

/VerifyB[uild] major[;minor[;build]]

(Optional). Verifies the build number of a package against the build numbers that were specified during the verification phase in the major, minor, and build arguments. If a mismatch occurs, the package will not execute.

The values are long integers. The argument can have one of three forms, with a value for major always required:

  • major
  • major;minor
  • major; minor; build

/VerifyP[ackageID] packageID

(Optional). Verifies the GUID of the package to be executed by comparing it to the value specified in the package_id argument.

/VerifyS[igned]

(Optional). If specified, this option causes the package to fail if the package is not signed.

/VerifyV[ersionID] versionID

(Optional). Verifies the version GUID of a package to be executed by comparing it to the value specified in the version_id argument during package Validation Phase.

/W[arnAsError]

(Optional). Causes the package to consider a warning as an error; therefore, the package will fail if a warning occurs during validation. If no warnings occur during validation and the /Validate option is not specified, the package is executed.




Enjoy !

No comments: