SQL 데이터열 암호화를 위한 xp_crypt 확장 프로시져

이미 DB를 다루는 분들중에는 이용하고 계시는 XP_CRYPT
MSSQL 자체에서 제공하지 않는 데이터열 암호화를 제공하는 확장 프로시져 모듈 입니다.
(*MySQL은 자체 모듈로 이미 제공하고 있는 상태입니다.)

모듈은 다음 사이트에서 다운로드가 가능합니다.
http://www.activecrypt.com

SQL Server 2005 및 Oracle 은 윈도우 및 리눅스용 까지 제공하고 있습니다.


사용법은 간단합니다. 위 모듈을 다운로드 받은다음, dll 파일을 다음 경로에 복사해 넣습니다.

C:\Program Files\Microsoft SQL Server\MSSQL\Binn


그런다음, SQL서버에 등록을 해주면 됩니다. 다음 쿼리문이 아니더라도 EM 또는 SMS 같은 GUI 도구를 이용해서도 쉽게 등록이 가능합니다.

 use master
 go
 sp_addextendedproc 'xp_crypt', 'xp_crypt.dll'
 go


프로시져에 대한 자세한 사용법은 다음 문서를 참고하시면 됩니다.
http://www.xpcrypt.com/xpho/

사용법은 그리 복잡하지 않습니다. 키를 생성해야 하고, 그 키 값을 이용한 함수를 만든 다음에야,  그 함수를 통해서 암화화 가 가능해 집니다.

일단, 꼭 필요한 데이터열만 암호화를 해야 합니다. 암호화를 통한 비용 손실도 고려를 해야 하기 때문입니다. XP_CRYPT 의 성능 비교에 관련된 글도 참고를 해보시기 바랍니다.
http://blog.dbguide.net/nihil77/2118


최근에 SQL Server 2005 가 발표되면서, 자체 암호화 기능을 제공합니다.

SQL Server 2005의 데이터 암호화 도움말을 참고해 보세요.
ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.ko/udb9/html/38e9bf58-10c6-46ed-83cb-e2d76cda0adc.htm

출처 : Tong - nunosix님의 DataBase통

안정적인 DNS서비스 DNSEver DNS server, DNS service
Posted by 키르히아이스
,
대량 데이터 가져오기 및 내보내기

Microsoft SQL Server에서는 SQL Server 테이블과 데이터 파일 사이에 대량으로 데이터(대량 데이터)를 가져오고 내보낼 수 있습니다. 이 기능은 SQL Server와 다른 데이터 원본 간에 데이터를 효과적으로 전송하는 데 필수적입니다. 대량 내보내기는 SQL Server 테이블의 데이터를 데이터 파일로 복사하는 것입니다. 대량 가져오기는 데이터 파일에서 SQL Server 테이블로 데이터를 로드하는 것입니다. 예를 들어 Microsoft Excel 응용 프로그램의 데이터를 데이터 파일로 내보낸 다음 해당 데이터를 SQL Server 테이블에 대량으로 가져올 수 있습니다.

대량 가져오기 및 내보내기 작업 정보

데이터 대량 가져오기 및 내보내기에 사용할 수 있는 여러 방법을 나열하고 간단하게 비교합니다. In-process와 Out-of-process 작업을 비교하고 서식 파일에 대해 설명하며 쿼리 프로세서와 대량 가져오기 작업에 대한 정보를 제공하고 성능 고려 사항을 제공합니다.

데이터 대량 가져오기에 대한 기본 지침

데이터를 대량으로 가져오기 위한 중요한 지침 목록을 제공합니다.

bcp 유틸리티를 사용하여 대량 데이터 가져오기 및 내보내기

bcp 유틸리티를 사용하여 데이터를 대량으로 가져오거나 내보내는 방법을 개괄적으로 설명합니다.

BULK INSERT 또는 OPENROWSET(BULK...)를 사용하여 데이터 대량 가져오기

Transact-SQL BULK INSERT 문이나 OPENROWSET 함수를 사용하여 데이터를 대량으로 가져오고 내보내는 방법을 개괄적으로 설명합니다. 또한 Transact-SQL 문을 사용하여 원격 데이터 파일에서 데이터를 대량으로 가져오는 방법에 대한 정보와 보안 고려 사항을 제공합니다.

HumanResources.myTeam 테이블 만들기

여러 대량 데이터 가져오기 및 내보내기 항목에서 예로 사용되는 테이블의 작성 방법에 대해 설명합니다.

데이터를 가져오거나 내보내기 위한 데이터 형식

데이터 형식 요구 사항과 관련된 제한 및 고려 사항에 대해 설명합니다. 또한 이 항목에서는 호환성을 위한 데이터 형식의 지정 방법을 알려 줍니다.

데이터를 가져오거나 내보내기 위한 서식 파일

서식 파일에 대해 설명합니다. 서식 파일을 통해 SQL Server에서 데이터 파일을 쓰거나 읽는 융통성 있는 방법으로 성능을 향상시킵니다. 또한 bcp 유틸리티를 사용하여 서식 파일을 만드는 방법에 대해 설명합니다.

XML 문서 대량 가져오기 및 내보내기 예

XML 문서를 SQL Server 데이터베이스로 대량 가져오거나 SQL Server 데이터베이스에서 대량으로 내보낼 수 있는 방법을 보여 줍니다.

데이터 대량 가져오기 및 내보내기 시나리오

데이터를 가져오거나 내보내기 위한 일반적인 여러 시나리오에 대해 설명합니다.

대량 가져오기 성능 최적화

대량 가져오기 작업을 위해 성능을 최적화하는 방법에 대해 설명합니다.

 

 

 

서식 파일 소개

http://msdn.microsoft.com/ko-kr/library/aa337558.aspx

 

비 XML 서식 파일 이해

http://msdn.microsoft.com/ko-kr/library/ms191479.aspx

 

데이터 파일에 접두사 길이 지정

http://msdn.microsoft.com/ko-kr/library/ms190779.aspx

 

안정적인 DNS서비스 DNSEver DNS server, DNS service
Posted by 키르히아이스
,

Frequently Encountered HRESULTS from OLE
This list was compiled from the Winerror.h file, which ships with the Win32 SDK. This list is actually a subset of a much more complete set of OLE errors. However, this is the set most likely to be raised by OLE or OLE-DB to ADO.


   Unsigned     Signed
     HRESULT   Hex HRESULT                    Description
   ----------  -----------  ----------------------------------------------
   0x80000001  -2147483647  Not implemented
   0x80000002  -2147483646  Ran out of memory
   0x80000003  -2147483645  One or more arguments are invalid
   0x80000004  -2147483644  No such interface supported
   0x80000005  -2147483643  Invalid pointer
   0x80000006  -2147483642  Invalid handle
   0x80000007  -2147483641  Operation aborted
   0x80000008  -2147483640  Unspecified error
   0x80000009  -2147483639  General access denied error
   0x8000000A  -2147483638  The data necessary to complete this operation
                            is not yet available.
   0x80004001  -2147467263  Not implemented
   0x80004002  -2147467262  No such interface supported
   0x80004003  -2147467261  Invalid pointer
   0x80004004  -2147467260  Operation aborted
   0x80004005  -2147467259  Unspecified error
   0x80004006  -2147467258  Thread local storage failure
   0x80004007  -2147467257  Get shared memory allocator failure
   0x80004008  -2147467256  Get memory allocator failure
   0x80004009  -2147467255  Unable to initialize class cache
   0x8000400A  -2147467254  Unable to initialize RPC services
   0x8000400B  -2147467253  Cannot set thread local storage channel control
   0x8000400C  -2147467252  Could not allocate thread local storage channel
                            control
   0x8000400D  -2147467251  The user supplied memory allocator is
                            unacceptable
   0x8000400E  -2147467250  The OLE service mutex already exists
   0x8000400F  -2147467249  The OLE service file mapping already exists
   0x80004010  -2147467248  Unable to map view of file for OLE service
   0x80004011  -2147467247  Failure attempting to launch OLE service
   0x80004012  -2147467246  There was an attempt to call CoInitialize a
                            second time while single threaded
   0x80004013  -2147467245  A Remote activation was necessary but was not
                            allowed
   0x80004014  -2147467244  A Remote activation was necessary but the
                            server name provided was invalid
   0x80004015  -2147467243  The class is configured to run as a security
                            id different from the caller
   0x80004016  -2147467242  Use of Ole1 services requiring DDE windows is
                            disabled
   0x80004017  -2147467241  A RunAs specification must be
                            <domain name>\<user name> or simply <user name>
   0x80004018  -2147467240  The server process could not be started.  The
                            pathname may be incorrect.
   0x80004019  -2147467239  The server process could not be started as the
                            configured identity.  The pathname may be
                            incorrect or unavailable.
   0x8000401A  -2147467238  The server process could not be started because
                            the configured identity is incorrect.  Check
                            the username and password.
   0x8000401B  -2147467237  The client is not allowed to launch this
                            server.
   0x8000401C  -2147467236  The service providing this server could not
                            be started.
   0x8000401D  -2147467235  This computer was unable to communicate with
                            the computer providing the server.
   0x8000401E  -2147467234  The server did not respond after being
                            launched.
   0x8000401F  -2147467233  The registration information for this server
                            is inconsistent or incomplete.
   0x80004020  -2147467232  The registration information for this interface
                            is inconsistent or incomplete.
   0x80004021  -2147467231  The operation attempted is not supported.
   0x8000FFFF  -2147418113  Catastrophic failure
   0x80070005  -2147024891  General access denied error
   0x80070006  -2147024890  Invalid handle
   0x8007000E  -2147024882  Ran out of memory
   0x80070057  -2147024809  One or more arguments are invalid


Debugging HRESULTS from OLE-DB
Some OLE-DB error messages, such as 80040e37 (Table 'x' does not exist) are
fairly obvious whether using ADO or OLE-DB. Others such as 0x80040E06 (Invalid chapter) are not as clear to an ADO developer. You can use the ITest/ISpy tools that ship with the OLE-DB SDK to spy on the OLE-DB calls. ITest/ISpy are similar to ODBC Spy and you can use them for complex debugging in ADO/DB applications.

This list was compiled from the Oledberr.h file, which ships with the OLE-DB SDK:

   Unsigned     Signed
     HRESULT   Hex HRESULT                    Description
   ----------  -----------  ----------------------------------------------
   0x80040E00  -2147217920  Invalid accessor
   0x80040E01  -2147217919  Creating another row would have exceeded the
                            total number of active rows supported by the
                            rowset
   0x80040E02  -2147217918  Unable to write with a read-only accessor
   0x80040E03  -2147217917  Given values violate the database schema
   0x80040E04  -2147217916  Invalid row handle
   0x80040E05  -2147217915  An object was open
   0x80040E06  -2147217914  Invalid chapter
   0x80040E07  -2147217913  A literal value in the command could not be                                   converted to the correct type due to a reason
                            other than data overflow
   0x80040E08  -2147217912  Invalid binding info
   0x80040E09  -2147217911  Permission denied
   0x80040E0A  -2147217910  Specified column does not contain bookmarks or
                            chapters
   0x80040E0B  -2147217909  Some cost limits were rejected
   0x80040E0C  -2147217908  No command has been set for the command object
   0x80040E0D  -2147217907  Unable to find a query plan within the given
                            cost limit
   0x80040E0E  -2147217906  Invalid bookmark
   0x80040E0F  -2147217905  Invalid lock mode
   0x80040E10  -2147217904  No value given for one or more required
                            parameters
   0x80040E11  -2147217903  Invalid column ID
   0x80040E12  -2147217902  Invalid ratio
   0x80040E13  -2147217901  Invalid value
   0x80040E14  -2147217900  The command contained one or more errors
   0x80040E15  -2147217899  The executing command cannot be canceled
   0x80040E16  -2147217898  The provider does not support the specified
                            dialect
   0x80040E17  -2147217897  A data source with the specified name already
                            exists
   0x80040E18  -2147217896  The rowset was builtover a live data feed and
                            cannot be restarted
   0x80040E19  -2147217895  No key matching the described characteristics
                            could be found within the current range
   0x80040E1A  -2147217894  Ownership of this tree has been given to the
                            provider
   0x80040E1B  -2147217893  The provider is unable to determine identity
                            for newly inserted rows
   0x80040E1C  -2147217892  No nonzero weights specified for any goals
                            supported, so goal was rejected; current goal
                            was not changed
   0x80040E1D  -2147217891  Requested conversion is not supported
   0x80040E1E  -2147217890  lRowsOffset would position you past either end
                            of the rowset, regardless of the cRows value
                            specified; cRowsObtained is 0
   0x80040E1F  -2147217889  Information was requested for a query, and the
                            query was not set
   0x80040E20  -2147217888  Provider called a method from IRowsetNotify in
                            the consumer and NT
   0x80040E21  -2147217887  Errors occurred
   0x80040E22  -2147217886  A non-NULL controlling IUnknown was specified
                            and the object being created does not support
                            aggregation
   0x80040E23  -2147217885  A given HROW referred to a hard- or soft-
                            deleted row
   0x80040E24  -2147217884  The rowset does not support fetching backwards
   0x80040E25  -2147217883  All HROWs must be released before new ones can
                            be obtained
   0x80040E26  -2147217882  One of the specified storage flags was not
                            supported
   0x80040E27  -2147217881  The comparison operator was invalid

   0x80040E28  -2147217880  The specified status flag was neither
                            DBCOLUMNSTATUS_OK nor DBCOLUMNSTATUS_ISNULL
   0x80040E29  -2147217879  The rowset cannot scroll backwards
   0x80040E2A  -2147217878  Invalid region handle
   0x80040E2B  -2147217877  The specified set of rows was not contiguous to
                            or overlapping the rows in the specified watch
                            region
   0x80040E2C  -2147217876  A transition from ALL* to MOVE* or EXTEND* was
                            specified
   0x80040E2D  -2147217875  The specified region is not a proper subregion
                            of the region identified by the given watch
                            region handle
   0x80040E2E  -2147217874  The provider does not support multi-statement
                            commands
   0x80040E2F  -2147217873  A specified value violated the integrity
                            constraints for a column or table
   0x80040E30  -2147217872  The given type name was unrecognized
   0x80040E31  -2147217871  Execution aborted because a resource limit has
                            been reached; no results have been returned
   0x80040E32  -2147217870  Cannot clone a command object whose command
                            tree contains a rowset or rowsets
   0x80040E33  -2147217869  Cannot represent the current tree as text
   0x80040E34  -2147217868  The specified index already exists
   0x80040E35  -2147217867  The specified index does not exist
   0x80040E36  -2147217866  The specified index was in use
   0x80040E37  -2147217865  The specified table does not exist
   0x80040E38  -2147217864  The rowset was using optimistic concurrency and
                            the value of a column has been changed since
                            it was last read
   0x80040E39  -2147217863  Errors were detected during the copy
   0x80040E3A  -2147217862  A specified precision was invalid
   0x80040E3B  -2147217861  A specified scale was invalid
   0x80040E3C  -2147217860  Invalid table ID
   0x80040E3D  -2147217859  A specified type was invalid
   0x80040E3E  -2147217858  A column ID was occurred more than once in the
                            specification
   0x80040E3F  -2147217857  The specified table already exists
   0x80040E40  -2147217856  The specified table was in use
   0x80040E41  -2147217855  The specified locale ID was not supported
   0x80040E42  -2147217854  The specified record number is invalid
   0x80040E43  -2147217853  Although the bookmark was validly formed, no
                            row could be found to match it
   0x80040E44  -2147217852  The value of a property was invalid
   0x80040E45  -2147217851  The rowset was not chaptered
   0x80040E46  -2147217850  Invalid accessor
   0x80040E47  -2147217849  Invalid storage flags
   0x80040E48  -2147217848  By-ref accessors are not supported by this
                            provider
   0x80040E49  -2147217847  Null accessors are not supported by this
                            provider
   0x80040E4A  -2147217846  The command was not prepared
   0x80040E4B  -2147217845  The specified accessor was not a parameter
                            accessor
   0x80040E4C  -2147217844  The given accessor was write-only
   0x80040E4D  -2147217843  Authentication failed
   0x80040E4E  -2147217842  The change was canceled during notification; no
                            columns are changed
   0x80040E4F  -2147217841  The rowset was single-chaptered and the chapter
                            was not released
   0x80040E50  -2147217840  Invalid source handle
   0x80040E51  -2147217839  The provider cannot derive parameter info and
                            SetParameterInfo has not been called
   0x80040E52  -2147217838  The data source object is already initialized
   0x80040E53  -2147217837  The provider does not support this method
   0x80040E54  -2147217836  The number of rows with pending changes has
                            exceeded the set limit
   0x80040E55  -2147217835  The specified column did not exist
   0x80040E56  -2147217834  There are pending changes on a row with a
                            reference count of zero
   0x80040E57  -2147217833  A literal value in the command overflowed the
                            range of the type of the associated column
   0x80040E58  -2147217832  The supplied HRESULT was invalid
   0x80040E59  -2147217831  The supplied LookupID was invalid
   0x80040E5A  -2147217830  The supplied DynamicErrorID was invalid
   0x80040E5B  -2147217829  Unable to get visible data for a newly-inserted
                            row that has not yet been updated
   0x80040E5C  -2147217828  Invalid conversion flag
   0x80040E5D  -2147217827  The given parameter name was unrecognized
   0x80040E5E  -2147217826  Multiple storage objects can not be open
                            simultaneously
   0x80040E5F  -2147217825  The requested filter could not be opened
   0x80040E60  -2147217824  The requested order could not be opened
   0x80040E61  -2147217823  Bad tuple
   0x80040E62  -2147217822  Bad coordinate
   0x80040E63  -2147217821  The given axis was not valid for this Dataset
   0x80040E64  -2147217820  One or more of the given cell ordinals was invalid
   0x80040E65  -2147217819  The supplied columnID was invalid
   0x80040E67  -2147217817  The supplied command does not have a DBID (Note:                             DBID is SQL shorthand for Database ID.)
   0x80040E68  -2147217816  The supplied DBID already exists
   0x80040E69  -2147217815  The maximum number of Sessions supported by the
                            provider has already been created. The consumer
                            must release one or more currently held Sessions
                            before obtaining a new Session object
   0x80040E72  -2147217806  The index ID is invalid
   0x80040E73  -2147217805  The initialization string does not conform
                            to specification
   0x80040E74  -2147217804  The OLE DB root enumerator did not return any
                            providers that matched an of the SOURCES_TYPEs
                            requested
   0x80040E75  -2147217803  The initialization string specifies a provider
                            which does not match the currently active
                            provider.
   0x80040E76  -2147217802  The specified DBID is invalid
   0x80040E6A  -2147217814  Invalid trustee value
   0x80040E6B  -2147217813  The trustee is not for the current data source
   0x80040E6C  -2147217812  The trustee does not support memberships/
                            collections
   0x80040E6D  -2147217811  The object is invalid or unknown to the provider
   0x80040E6E  -2147217810  No owner exists for the object
   0x80040E6F  -2147217809  The access entry list supplied is invalid
   0x80040E70  -2147217808  The trustee supplied as owner is invalid or
                            unknown to the provider
   0x80040E71  -2147217807  The permission supplied in the access entry list
                            is invalid
   0x80040E77  -2147217801  The ConstraintType was invalid or not supported
                            by the provider.
   0x80040E78  -2147217800  The ConstraintType was not CONSTRAINTTYPE_FOREIGNKEY
                            and cForeignKeyColumns was not zero
  
   0x80040E79  -2147217799  The Deferrability was invalid or the value was not
                            supported by the provider
   0x80040E80  -2147217792  The MatchType was invalid or the value was not
                            supported by the provider
   0x80040E8A  -2147217782  The UpdateRule or DeleteRule was invalid or the
                            value was not supported by the provider
   0x80040E8B  -2147217781  The pConstraintID did not exist in the data source
   0x80040E8C  -2147217780  The dwFlags was invalid
   0x80040E8D  -2147217779  The rguidColumnType pointed to a GUID that does not
                            match the object type of this column or this column
                            was not set
   0x80040E8E  -2147217778  The requested URL was out-of-scope
   0x80040E90  -2147217776  The provider could not drop the object
   0x80040E91  -2147217775  There is no source row
   0x80040E92  -2147217774  The OLE DB object represented by this URL is locked
                            by one or more other processes
   0x80040E93  -2147217773  The client requested an object type that is only
                            valid for a collection
   0x80040E94  -2147217772  The caller requested write access to a read-only
                            object
   0x80040E95  -2147217771  The provider could not connect to the server for
                            this object
   0x80040E96  -2147217770  The provider could not connect to the server for
                            this object
   0x80040E97  -2147217769  The attempt to bind to the object timed out
   0x80040E98  -2147217768  The provider was unable to create an object at
                            this URL because an object named by this URL
                            already exists
   0x80040E99  -2147217767  The provider could not drop the object
   0x80040E9A  -2147217766  The provider was unable to create an object
                            at this URL because the server was out of
                            physical storage
   0x00040EC0       265920  Fetching requested number of rows would have
                            exceeded total number of active rows supported
                            by the rowset
   0x00040EC1       265921  One or more column types are incompatible;
                            conversion errors will occur during copying
   0x00040EC2       265922  Parameter type information has been overridden
                            by caller
   0x00040EC3       265923  Skipped bookmark for deleted or non-member row
   0x00040EC4       265924  Errors found in validating tree
   0x00040EC5       265925  There are no more rowsets
   0x00040EC6       265926  Reached start or end of rowset or chapter
   0x00040EC7       265927  The provider re-executed the command
   0x00040EC8       265928  Variable data buffer full
   0x00040EC9       265929  There are no more results
   0x00040ECA       265930  Server cannot release or downgrade a lock until
                            the end of the transaction
   0x00040ECB       265931  Specified weight was not supported or exceeded
                            the supported limit and was set to 0 or the
                            supported limit
   0x00040ECC       265932  Consumer is uninterested in receiving further
                            notification calls for this reason
   0x00040ECD       265933  Input dialect was ignored and text was returned
                            in different dialect
   0x00040ECE       265934  Consumer is uninterested in receiving further
                            notification calls for this phase
   0x00040ECF       265935  Consumer is uninterested in receiving further
                            notification calls for this reason
   0x00040ED0       265936  The operation is being processed asynchronously
   0x00040ED1       265937  In order to reposition to the start of the
                            rowset, the provider had to reexecute the
                            query; either the order of the columns changed
                            or columns were added to or removed from the
                            rowset
   0x00040ED2       265938  The method had some errors; errors have been
                            returned in the error array
   0x00040ED3       265939  Invalid row handle
   0x00040ED4       265940  A given HROW referred to a hard-deleted row
    
  
   0x00040ED5       265941  The provider was unable to keep track of all
                            the changes; the client must refetch the data
                            associated with the watch region using another
                            method
   0x00040ED6       265942  Execution stopped because a resource limit has
                            been reached; results obtained so far have been
                            returned but execution cannot be resumed
   0x00040ED7       265943  The bind failed because the provider was unable
                            to satisfy all of the bind flags or properties
   0x00040ED8       265944  A lock was upgraded from the value specified
   0x00040ED9       265945  One or more properties were changed as allowed
                            by provider
   0x00040EDA       265946  Errors occurred
   0x00040EDB       265947  A specified parameter was invalid
   0x00040EDC       265948  Updating this row caused more than one row to
                            be updated in the data source
   0x00040EDD       265949  The row has no row-specific columns

 

안정적인 DNS서비스 DNSEver DNS server, DNS service
Posted by 키르히아이스
,

출처 : http://blog.naver.com/allnight123/8973173

 

http://wowhoon.pe.kr 의 박훈님이 제공해 주신 번역문입니다.

좋은글 제공해주신 박훈님께 감사드립니다.


 

문제해결

이번 챕터에서는 문제와 해결 과정을 설명한다.

* 사용자 계정 정의

* MySQL Data를 Dump하는 방법

* 커맨드라인 명령 옵션의 최적화

 

사용자 계정 정의 

당신의 시스템 위에 MySQL Server를 설치했을 때, root user 

(전체를 엑서스 할 있는 특권사용자)가 기본사용자로 설정된다. 

당신은 root user 를 사용하여 ODBC로 MySQL Server에 로그온 해야 한다.

 

MySQL 데이터 덤프

아래의 테이블은 MySQL Data를 Dump하고 mysqldump 텍스트 파일에서 

테이터 베이스를 재생하기 위한 구문(SQL Script) 의 설명을 제공한다. 

Command 명령

Description 설명

mysqldump

MySQL 데이터 베이스에서 스키마와 데이터를 파일로 뽑아내는 도구

mysql

MySQL 로드 해서 다른 명령어를 실행할 있다.

-u user name

root MySQL 사용자명, 이사용자는 모든 DBA 권한을 가지고 있다.

-ppassword

MySQL 데이터베이스의 root user 사용자 비밀번호

--opt

Table Dump속도를 최적화하고 다시 최적속도로 읽어 Dump 파일을 기록 한다. 옵션은  –add-drop-table, -add-locks, --all, -, --extended-insert, --quick, –lock-tables 가능하다.
선택 가능한 항목에 대해서는 MySQL 색션에서 –opt, refer the Optimizing Options 참조하 바란다.

databasename

텍스트 파일에 Dump 하고자 하는 원본 데이터 베이스 이름

<

UNIX Windows NT/ 2000 입력 전환을 위해 사용되는 기호.

filename.sql
 
filename.sql

MySQL 포함하고 있는 파일명

 

다음을 사용하여 MySQL Data Dump수 있다.

 

#> mysqldump –u user name –ppassword –opt databasename < filename.sql 

 

데이터 베이스로부터 mysqldump 사용하여 뽑아낸 텍스트 파일로 

데이터 베이스를 재생성 하기 위하여 다음의 Command 사용.

 

#> mysql –u user name –ppassword databasename < filename.sql 

#> mysql u 사용자명 ppassword databasename < filename.sql

 

 

커맨드 라인 옵션의 최적화

당신이 자동적으로 활성화한 옵션은 mysqldump내에서 Command Line 에서 

-opt 를 사용하여 쓸 수 있다. 

MySQL Data Dump에 관 한 더 많은 정보를 얻으려면 

Dumping MySQL Data 섹션을 참고하길 바란다. 

다음의 표는 -opt Command의 옵션이다. 

Command

Description

--add-drop-table 

테이블을 추가하거나 삭제 같은 것이 존재하면 삭제한다.

--all

옵션을 생성할 모든 MySQL 항목을 포함한다.

--extended-insert

복합적인 로우w insert 수 있다.

--quick

쿼리를 버퍼링하지 않고 바로 표준 출력으로 바로 dump한다. 만일 옵션을 사용하는 동안에 mysqldump 중지하면, 그것에 의해 서버가 대기(wate)하기 때문에 다른 클라이언트가 간섭을 있다.

--lock-tables

모든 테이블들 읽기 전용으로 만든다.

 

MySQL 에러 메시지

이 섹션은 MySQL에서 SQL Server 2000으로 마이그레이션 하는 동안 볼 수 

있는 에러 메시지를 표시한다. 

DTS로 데이터를 옮기는 동안 다음의 에러 메시지들이 출력될 수도 있습니다. : 

에러 메시지 

해결 방안

Cannot connect to MSQL Server <name>. 



Is there a MySQL server running on the system/port you are trying to connect to? 


에러의 원인은 다음과 같다.
- MySQL
경우 포트가 3306번이 기본적으로 설정되어 있다. 만일 다른 Port 사용할 경우 MySQL ODBC에서 바꿔 주기 바란다. 

- 사용자가 DBA 권한으로 MySQL Server 접속할 있는지 확인하여 주길 바란다.

- 사용자 이름이 올바른지 확인하길 란다.  

There is already an object named 'tablename' in the database

.DTS Package가 실행되는 동안 테이블이 생성되었을 경우이다. 패키지가 실행되는 동안 확실히 테이블이 없거나  재생성되는지 확인하길 바란다.

 

결론

이 백서는 MySQL에서 Microsoft SQL Server 2000까지 기초적인 정보와 

성공적으로 데이터를 마이그래이션 하기 위한 대략적인 정보를 제공하였다. 

SQL Server 2000은 스케일러빌리티와 기능성의 더 큰 수준을 제공한다.

 

추가 정보 

Microsoft SQL Server Web site 

Microsoft Developer Network (MSDN) Web site 

Microsoft Universal Data Access Web site 

MySQL Web site 


 MySQL을 MSSQL으로 마이그래이션 - (4) 문서의 끝입니다.

 
안정적인 DNS서비스 DNSEver DNS server, DNS service
Posted by 키르히아이스
,