« Previous : 1 : 2 : 3 : 4 : Next »

DB에 접속하는 Client program이 non-Unicode program이라면 DB세팅전에 필히 확인하여 OS locale와 SQL Server collation 설정이 필수적이다.
(SQL Server에서 데이터가 저장된 DB의 Collation 변경 작업은 개안습이다.)

Windows OS에서 non-Unicode program 언어 설정방법
Control Panel(제어판) > Region and Language(지역 및 언어설정) >  Advanced(고급) Tab 에서
Language for non-Unicode program 설정을 해당 언어로 설정.

예를 들어 중국어 기반에 non-Unicode program과 이에 연동하는 DB를 세팅할 경우 다음과 같이 설정해야 한다.
non-Unicode program 이 구동되는 OS : Chinese(PRC)
SQL Server가 구동되는 OS : Chinese(PRC)
SQL Server default collation : Chinese_PRC_CI_AS

알고 있으면 아주 간단한 문제인데, 모르면 정말 아주 큰일이다... 언어 설정이 중구난방으로되어 DB에서 저장되는 문자열이 모두 엄하게 저장되었다. 조용히 다른 일자리를 찾아보도록 권고한다...ㅋㅋ
사실 프로그램과 DB가 유니코드 쓰면 이런 고민 자체가 필요 없어진다....
프로그램 초기 설계시 제발 유니코드로 좀....

<Windows Locale와 SQL Server Default Collation>

Windows locale

Windows LCID

SQL LCID

Default collation

Afrikaans (South Africa)

0x0436

0x0409

Latin1_General_CI_AS

Albanian (Albania)

0x041c

0x041c

Albanian_CI_AS

Alsatian (France)

0x0484

0x0409

Latin1_General_CI_AS

Amharic (Ethiopia)

0x045e

0x0409

Latin1_General_CI_AS

Arabic (Algeria)

0x1401

0x0401

Arabic_CI_AS

Arabic (Bahrain)

0x3c01

0x0401

Arabic_CI_AS

Arabic (Egypt)

0x0c01

0x0401

Arabic_CI_AS

Arabic (Iraq)

0x0801

0x0401

Arabic_CI_AS

Arabic (Jordan)

0x2c01

0x0401

Arabic_CI_AS

Arabic (Kuwait)

0x3401

0x0401

Arabic_CI_AS

Arabic (Lebanon)

0x3001

0x0401

Arabic_CI_AS

Arabic (Libya)

0x1001

0x0401

Arabic_CI_AS

Arabic (Morocco)

0x1801

0x0401

Arabic_CI_AS

Arabic (Oman)

0x2001

0x0401

Arabic_CI_AS

Arabic (Qatar)

0x4001

0x0401

Arabic_CI_AS

Arabic (Saudi Arabia)

0x0401

0x0401

Arabic_CI_AS

Arabic (Syria)

0x2801

0x0401

Arabic_CI_AS

Arabic (Tunisia)

0x1c01

0x0401

Arabic_CI_AS

Arabic (U.A.E.)

0x3801

0x0401

Arabic_CI_AS

Arabic (Yemen)

0x2401

0x0401

Arabic_CI_AS

Armenian (Armenia)

0x042b

0x0419

Latin1_General_CI_AS

Assamese (India)

0x044d

0x044d

Not available at server level

Azeri (Azerbaijan, Cyrillic)

0x082c

0x082c

Deprecated, not available at server level

Azeri (Azerbaijan, Latin)

0x042c

0x042c

Deprecated, not available at server level

Bashkir (Russia)

0x046d

0x046d

Latin1_General_CI_AI

Basque (Basque)

0x042d

0x0409

Latin1_General_CI_AS

Belarusian (Belarus)

0x0423

0x0419

Cyrillic_General_CI_AS

Bengali (Bangladesh)

0x0845

0x0445

Not available at server level

Bengali (India)

0x0445

0x0439

Not available at server level

Bosnian (Bosnia and Herzegovina, Cyrillic)

0x201a

0x201a

Latin1_General_CI_AI

Bosnian (Bosnia and Herzegovina, Latin)

0x141a

0x141a

Latin1_General_CI_AI

Breton (France)

0x047e

0x047e

Latin1_General_CI_AI

Bulgarian (Bulgaria)

0x0402

0x0419

Cyrillic_General_CI_AS

Catalan (Catalan)

0x0403

0x0409

Latin1_General_CI_AS

Chinese (Hong Kong SAR, PRC)

0x0c04

0x0404

Chinese_Taiwan_Stroke_CI_AS

Chinese (Macao SAR)

0x1404

0x1404

Latin1_General_CI_AI

Chinese (Macau)

*0x21404

0x21404

Latin1_General_CI_AI

Chinese (PRC)

0x0804

0x0804

Chinese_PRC_CI_AS

Chinese (PRC)

*0x20804

0x20804

Chinese_PRC_Stroke_CI_AS

Chinese (Singapore)

0x1004

0x0804

Chinese_PRC_CI_AS

Chinese (Singapore)

*0x21004

0x20804

Chinese_PRC_Stroke_CI_AS

Chinese (Taiwan)

*0x30404

0x30404

Chinese_Taiwan_Bopomofo_CI_AS

Chinese (Taiwan)

0x0404

0x0404

Chinese_Taiwan_Stroke_CI_AS

Corsican (France)

0x0483

0x0483

Latin1_General_CI_AI

Croatian (Bosnia and Herzegovina, Latin)

0x101a

0x041a

Croatian_CI_AS

Croatian (Croatia)

0x041a

0x041a

Croatian_CI_AS

Czech (Czech Republic)

0x0405

0x0405

Czech_CI_AS

Danish (Denmark)

0x0406

0x0406

Danish_Norwegian_CI_AS

Dari (Afghanistan)

0x048c

0x048c

Latin1_General_CI_AI

Divehi (Maldives)

0x0465

0x0465

Not available at server level

Dutch (Belgium)

0x0813

0x0409

Latin1_General_CI_AS

Dutch (Netherlands)

0x0413

0x0409

Latin1_General_CI_AS

English (Australia)

0x0c09

0x0409

Latin1_General_CI_AS

English (Belize)

0x2809

0x0409

Latin1_General_CI_AS

English (Canada)

0x1009

0x0409

Latin1_General_CI_AS

English (Caribbean)

0x2409

0x0409

Latin1_General_CI_AS

English (India)

0x4009

0x0409

Latin1_General_CI_AS

English (Ireland)

0x1809

0x0409

Latin1_General_CI_AS

English (Jamaica)

0x2009

0x0409

Latin1_General_CI_AS

English (Malaysia)

0x4409

0x0409

Latin1_General_CI_AS

English (New Zealand)

0x1409

0x0409

Latin1_General_CI_AS

English (Philippines)

0x3409

0x0409

Latin1_General_CI_AS

English (Singapore)

0x4809

0x0409

Latin1_General_CI_AS

English (South Africa)

0x1c09

0x0409

Latin1_General_CI_AS

English (Trinidad and Tobago)

0x2c09

0x0409

Latin1_General_CI_AS

English (United Kingdom)

0x0809

0x0409

Latin1_General_CI_AS

English (United States)

0x0409

0x0409

SQL_Latin1_General_CP1_CI_AS

English (Zimbabwe)

0x3009

0x0409

Latin1_General_CI_AS

Estonian (Estonia)

0x0425

0x0425

Estonian_CI_AS

Faroese (Faroe Islands)

0x0438

0x0409

Latin1_General_CI_AS

Filipino (Philippines)

0x0464

0x0409

Latin1_General_CI_AS

Finnish (Finland)

0x040b

0x040b

Finnish_Swedish_CI_AS

French (Belgium)

0x080c

0x040c

French_CI_AS

French (Canada)

0x0c0c

0x040c

French_CI_AS

French (France)

0x040c

0x040c

French_CI_AS

French (Luxembourg)

0x140c

0x040c

French_CI_AS

French (Monaco)

0x180c

0x040c

French_CI_AS

French (Switzerland)

0x100c

0x040c

French_CI_AS

Frisian (Netherlands)

0x0462

0x0462

Latin1_General_CI_AI

Galician (Spain)

0x0456

0x0409

Latin1_General_CI_AS

Georgian (Georgia)

*0x10437

0x10437

Georgian_Modern_Sort_CI_AS

Georgian (Georgia)

0x0437

0x0419

Latin1_General_CI_AS

German - Phone Book Sort (DIN)

*0x10407

0x10407

German_PhoneBook_CI_AS

German (Austria)

0x0c07

0x0409

Latin1_General_CI_AS

German (Germany)

0x0407

0x0409

Latin1_General_CI_AS

German (Liechtenstein)

0x1407

0x0409

Latin1_General_CI_AS

German (Luxembourg)

0x1007

0x0409

Latin1_General_CI_AS

German (Switzerland)

0x0807

0x0409

Latin1_General_CI_AS

Greek (Greece)

0x0408

0x0408

Greek_CI_AS

Greenlandic (Greenland)

0x046f

0x0406

Danish_Norwegian_CI_AS

Gujarati (India)

0x0447

0x0439

Not available at server level

Hausa (Nigeria, Latin)

0x0468

0x0409

Latin1_General_CI_AS

Hebrew (Israel)

0x040d

0x040d

Hebrew_CI_AS

Hindi (India)

0x0439

0x0439

Not available at server level

Hungarian (Hungary)

0x040e

0x040e

Hungarian_CI_AS

Hungarian Technical Sort

*0x1040e

0x1040e

Hungarian_Technical_CI_AS

Icelandic (Iceland)

0x040f

0x040f

Icelandic_CI_AS

Igbo (Nigeria)

0x0470

0x0409

Latin1_General_CI_AS

Indonesian (Indonesia)

0x0421

0x0409

Latin1_General_CI_AS

Inuktitut (Canada, Latin)

0x085d

0x0409

Latin1_General_CI_AS

Inuktitut (Syllabics) Canada

0x045d

0x045d

Latin1_General_CI_AI

Irish (Ireland)

0x083c

0x0409

Latin1_General_CI_AS

Italian (Italy)

0x0410

0x0409

Latin1_General_CI_AS

Italian (Switzerland)

0x0810

0x0409

Latin1_General_CI_AS

Japanese (Japan XJIS)

0x0411

0x0411

Japanese_CI_AS

Japanese (Japan)

*0x040411

0x40411

Latin1_General_CI_AI

Kannada (India)

0x044b

0x0439

Not available at server level

Kazakh (Kazakhstan)

0x043f

0x043f

Kazakh_90_CI_AS

Khmer (Cambodia)

0x0453

0x0453

Not available at server level

K'iche (Guatemala)

0x0486

0x0c0a

Modern_Spanish_CI_AS

Kinyarwanda (Rwanda)

0x0487

0x0409

Latin1_General_CI_AS

Konkani (India)

0x0457

0x0439

Not available at server level

Korean (Korea Dictionary Sort)

0x0412

0x0412

Korean_Wansung_CI_AS

Kyrgyz (Kyrgyzstan)

0x0440

0x0419

Cyrillic_General_CI_AS

Lao (Lao PDR)

0x0454

0x0454

Not available at server level

Latvian (Latvia)

0x0426

0x0426

Latvian_CI_AS

Lithuanian (Lithuania)

0x0427

0x0427

Lithuanian_CI_AS

Lower Sorbian (Germany)

0x082e

0x0409

Latin1_General_CI_AS

Luxembourgish (Luxembourg)

0x046e

0x0409

Latin1_General_CI_AS

Macedonian (Macedonia, FYROM)

0x042f

0x042f

Macedonian_FYROM_90_CI_AS

Malay (Brunei Darussalam)

0x083e

0x0409

Latin1_General_CI_AS

Malay (Malaysia)

0x043e

0x0409

Latin1_General_CI_AS

Malayalam (India)

0x044c

0x0439

Not available at server level

Maltese (Malta)

0x043a

0x043a

Latin1_General_CI_AI

Maori (New Zealand)

0x0481

0x0481

Latin1_General_CI_AI

Mapudungun (Chile)

0x047a

0x047a

Latin1_General_CI_AI

Marathi (India)

0x044e

0x0439

Not available at server level

Mohawk (Canada)

0x047c

0x047c

Latin1_General_CI_AI

Mongolian (Mongolia)

0x0450

0x0419

Cyrillic_General_CI_AS

Mongolian (PRC)

0x0850

0x0419

Cyrillic_General_CI_AS

Nepali (Nepal)

0x0461

0x0461

Not available at server level

Norwegian (Bokmål, Norway)

0x0414

0x0414

Latin1_General_CI_AI

Norwegian (Nynorsk, Norway)

0x0814

0x0414

Latin1_General_CI_AI

Occitan (France)

0x0482

0x040c

French_CI_AS

Oriya (India)

0x0448

0x0439

Not available at server level

Pashto (Afghanistan)

0x0463

0x0463

Not available at server level

Persian (Iran)

0x0429

0x0429

Latin1_General_CI_AI

Polish (Poland)

0x0415

0x0415

Polish_CI_AS

Portuguese (Brazil)

0x0416

0x0409

Latin1_General_CI_AS

Portuguese (Portugal)

0x0816

0x0409

Latin1_General_CI_AS

Punjabi (India)

0x0446

0x0439

Not available at server level

Quechua (Bolivia)

0x046b

0x0409

Latin1_General_CI_AS

Quechua (Ecuador)

0x086b

0x0409

Latin1_General_CI_AS

Quechua (Peru)

0x0c6b

0x0409

Latin1_General_CI_AS

Romanian (Romania)

0x0418

0x0418

Romanian_CI_AS

Romansh (Switzerland)

0x0417

0x0417

Latin1_General_CI_AI

Russian (Russia)

0x0419

0x0419

Cyrillic_General_CI_AS

Sami (Inari, Finland)

0x243b

0x083b

Latin1_General_CI_AI

Sami (Lule, Norway)

0x103b

0x043b

Latin1_General_CI_AI

Sami (Lule, Sweden)

0x143b

0x083b

Latin1_General_CI_AI

Sami (Northern, Finland)

0x0c3b

0x083b

Latin1_General_CI_AI

Sami (Northern, Norway)

0x043b

0x043b

Latin1_General_CI_AI

Sami (Northern, Sweden)

0x083b

0x083b

Latin1_General_CI_AI

Sami (Skolt, Finland)

0x203b

0x083b

Latin1_General_CI_AI

Sami (Southern, Norway)

0x183b

0x043b

Latin1_General_CI_AI

Sami (Southern, Sweden)

0x1c3b

0x083b

Latin1_General_CI_AI

Sanskrit (India)

0x044f

0x0439

Not available at server level

Serbian (Bosnia and Herzegovina, Cyrillic)

0x1c1a

0x0c1a

Latin1_General_CI_AI

Serbian (Bosnia and Herzegovina, Latin)

0x181a

0x081a

Latin1_General_CI_AI

Serbian (Serbia, Cyrillic)

0x0c1a

0x0c1a

Latin1_General_CI_AI

Serbian (Serbia, Latin)

0x081a

0x081a

Latin1_General_CI_AI

Sesotho sa Leboa/Northern Sotho (South Africa)

0x046c

0x0409

Latin1_General_CI_AS

Setswana/Tswana (South Africa)

0x0432

0x0409

Latin1_General_CI_AS

Sinhala (Sri Lanka)

0x045b

0x0439

Not available at server level

Slovak (Slovakia)

0x041b

0x041b

Slovak_CI_AS

Slovenian (Slovenia)

0x0424

0x0424

Slovenian_CI_AS

Spanish (Argentina)

0x2c0a

0x0c0a

Modern_Spanish_CI_AS

Spanish (Bolivia)

0x400a

0x0c0a

Modern_Spanish_CI_AS

Spanish (Chile)

0x340a

0x0c0a

Modern_Spanish_CI_AS

Spanish (Colombia)

0x240a

0x0c0a

Modern_Spanish_CI_AS

Spanish (Costa Rica)

0x140a

0x0c0a

Modern_Spanish_CI_AS

Spanish (Dominican Republic)

0x1c0a

0x0c0a

Modern_Spanish_CI_AS

Spanish (Ecuador)

0x300a

0x0c0a

Modern_Spanish_CI_AS

Spanish (El Salvador)

0x440a

0x0c0a

Modern_Spanish_CI_AS

Spanish (Guatemala)

0x100a

0x0c0a

Modern_Spanish_CI_AS

Spanish (Honduras)

0x480a

0x0c0a

Modern_Spanish_CI_AS

Spanish (Mexico)

0x080a

0x0c0a

Modern_Spanish_CI_AS

Spanish (Nicaragua)

0x4c0a

0x0c0a

Modern_Spanish_CI_AS

Spanish (Panama)

0x180a

0x0c0a

Modern_Spanish_CI_AS

Spanish (Paraguay)

0x3c0a

0x0c0a

Modern_Spanish_CI_AS

Spanish (Peru)

0x280a

0x0c0a

Modern_Spanish_CI_AS

Spanish (Puerto Rico)

0x500a

0x0c0a

Modern_Spanish_CI_AS

Spanish (Spain)

0x0c0a

0x0c0a

Modern_Spanish_CI_AS

Spanish (Spain, Traditional Sort)

0x040a

0x040a

Traditional_Spanish_CI_AS

Spanish (United States)

0x540a

0x0409

Latin1_General_CI_AS

Spanish (Uruguay)

0x380a

0x0c0a

Modern_Spanish_CI_AS

Spanish (Venezuela)

0x200a

0x0c0a

Modern_Spanish_CI_AS

Swahili (Kenya)

0x0441

0x0409

Latin1_General_CI_AS

Swedish (Finland)

0x081d

0x040b

Finnish_Swedish_CI_AS

Swedish (Sweden)

0x041d

0x040b

Finnish_Swedish_CI_AS

Syriac (Syria)

0x045a

0x045a

Not available at server level

Tajik (Tajikistan)

0x0428

0x0419

Cyrillic_General_CI_AS

Tamazight (Algeria, Latin)

0x085f

0x085f

Latin1_General_CI_AI

Tamil (India)

0x0449

0x0439

Not available at server level

Tatar (Russia)

0x0444

0x0444

Cyrillic_General_CI_AS

Telugu (India)

0x044a

0x0439

Not available at server level

Thai (Thailand)

0x041e

0x041e

Thai_CI_AS

Tibetan (PRC)

0x0451

0x0451

Not available at server level

Turkish (Turkey)

0x041f

0x041f

Turkish_CI_AS

Turkmen (Turkmenistan)

0x0442

0x0442

Latin1_General_CI_AI

Uighur (PRC)

0x0480

0x0480

Latin1_General_CI_AI

Ukrainian (Ukraine)

0x0422

0x0422

Ukrainian_CI_AS

Upper Sorbian (Germany)

0x042e

0x042e

Latin1_General_CI_AI

Urdu (Pakistan)

0x0420

0x0420

Latin1_General_CI_AI

Uzbek (Uzbekistan, Cyrillic)

0x0843

0x0419

Cyrillic_General_CI_AS

Uzbek (Uzbekistan, Latin)

0x0443

0x0443

Uzbek_Latin_90_CI_AS

Vietnamese (Vietnam)

0x042a

0x042a

Vietnamese_CI_AS

Welsh (United Kingdom)

0x0452

0x0452

Latin1_General_CI_AI

Wolof (Senegal)

0x0488

0x040c

French_CI_AS

Xhosa/isiXhosa (South Africa)

0x0434

0x0409

Latin1_General_CI_AS

Yakut (Russia)

0x0485

0x0485

Latin1_General_CI_AI

Yi (PRC)

0x0478

0x0409

Latin1_General_CI_AS

Yoruba (Nigeria)

0x046a

0x0409

Latin1_General_CI_AS

Zulu/isiZulu (South Africa)

0x0435

0x0409

Latin1_General_CI_AS

 

출처 : http://msdn.microsoft.com/en-us/library/ms143508.aspx 

이올린에 북마크하기(0) 이올린에 추천하기(0)

Posted by 좐군

2012/03/14 13:13 2012/03/14 13:13
, ,
Response
No Trackback , No Comment
RSS :
http://John.tobe30.com/tc/rss/response/342

Trackback URL : http://John.tobe30.com/tc/trackback/342

Leave a comment
[로그인][오픈아이디란?]

[SQL] SQL Server - Trace Stop & Close & Remove

SQL Server에서 Trace를 멈추거나 제거할 때 사용하는 SQL
(서비스 중간에 긴급하게 잠시동안 Profiler를 실행한 후 종료가 되지 않을 때 유용)
-------------------------------------------------------------------
--서버에 존재하고 있는 trace 정보를 반환한다.
-- traceid : Trace id
-- property : Trace property
-- 1= 추적 옵션
-- 2 = 파일 이름
-- 3 = 최대 크기
-- 4 = 중지 시간
-- 5 = 현재 추적 상태. 0 = 중지됨. 1 = 실행 중.
-- value : Property value.
-------------------------------------------------------------------
DECLARE @v_traceid INT
SELECT @v_traceid  = null --NULL=ALL
SELECT *
FROM ::fn_trace_getinfo(@v_traceid)
--------------------------------------------------------------------
--------------------------------------------------
-- Define constant.
DECLARE @STOP INT
DECLARE @START INT
DECLARE @CLOSE_REMOVE INT
SELECT @STOP = 0
SELECT @START = 1
SELECT @CLOSE_REMOVE = 2
--------------------------------------------------
DECLARE @v_traceid INT
SELECT @v_traceid = 2
--지정한 trace id를 상태를 변경한다.
--아래는 trace id 2를 서버에서 닫고 제거한다.
exec sp_trace_setstatus @traceid=@v_traceid  , @status=@CLOSE_REMOVE
-- trace id 2  닫고 제거되었기 때문에 반환하는 정보가 없다.
SELECT *
FROM ::fn_trace_getinfo(@v_traceid)
---------------------------------------------------
출처 : 직접 작성.
이올린에 북마크하기(0) 이올린에 추천하기(0)

Posted by 좐군

2011/10/11 14:46 2011/10/11 14:46
,
Response
No Trackback , No Comment
RSS :
http://John.tobe30.com/tc/rss/response/336

Trackback URL : http://John.tobe30.com/tc/trackback/336

Leave a comment
[로그인][오픈아이디란?]
-- XML 의 exist 메소드를 활용 사례
--  : XML 문서에서 어떤 속성의 특정값이 존재하는지를 검사
-- (only SQL Server 2005)
DECLARE @v_xml XML
SELECT @v_xml = N'<rows><row id="1" tag="1"/><row id="1" tag="0"/></rows>'

--rows/row/@tag속성의 값이 1인 엘리멘트가 존재하지를 반환
SELECT @v_xml.exist('rows/row[@tag="1"]')   result
---존재함
---result = 1  

SELECT @v_xml.exist('rows/row[@tag="2"]')   result
---존재하지 않음
---result = 0

출처 : 직접 작성.

이올린에 북마크하기(0) 이올린에 추천하기(0)

Posted by 좐군

2010/02/11 23:16 2010/02/11 23:16
, , , ,
Response
No Trackback , No Comment
RSS :
http://John.tobe30.com/tc/rss/response/297

Trackback URL : http://John.tobe30.com/tc/trackback/297

Leave a comment
[로그인][오픈아이디란?]

This step-by-step article describes how to install a certificate on a computer that is running Microsoft SQL Server 2000 or Microsoft SQL Server 2005 by using Microsoft Management Console (MMC) and describes how to enable SSL Encryption at the server, or for specific clients.

Note You cannot use this method to put a certificate on a SQL Server clustered server.

If your company has implemented an Enterprise Certificate Authority, you can request certificates for a SQL Server stand-alone server, and then use the certificate for Secure Sockets Layer (SSL) encryption.

You can enable the
Force Protocol Encryption option on the server, or on the client.

Note Do not enable the Force Protocol Encryption option on both the client and the server. To enable Force Protocol Encryption on the server, use the Server Network Utility. To enable Force Protocol Encryption on the client, use the Client Network Utility.

Important If you enable SSL encryption by using the Client Network Utility, then all connections from that client will request SSL encryption to any SQL Server to which that client connects.

Warning If you enable Force Protocol Encryption on the client computer, you cannot connect to previous versions of SQL Server from that specific client. Previous versions of SQL Server do not recognize SSL encryption.

If you enable
Force Protocol Encryption on the server, you must install a certificate on the server.

If you want to enable
Force Protocol Encryption on the client, you must have a certificate on the server and the client must have the Trusted Root Authority updated to trust the server certificate.

Note If you are using SQL Server 2005 to enable encrypted connections for an instance of SQL Server 2005, you can set the value of the ForceEncryption option to Yes. For more information, see the "How to: Enable Encryption Connections to the Database Engine (SQL Server Configuration Manager)" topic in SQL Server 2005.

[Install a certificate on a server with Microsoft Management Console (MMC)]

To use SSL encryption, you must install a certificate on the server. Follow these steps to install the certificate by using the Microsoft Management Console (MMC) snap-in.

How to Configure the MMC Snap-in
  1. To open the Certificates snap-in, follow these steps:
    1. To open the MMC console, click Start, and then click Run. In the Run dialog box type:

      MMC
    2. On the Console menu, click Add/Remove Snap-in....
    3. Click Add, and then click Certificates. Click Add again.
    4. You are prompted to open the snap-in for the current user account, the service account, or for the computer account. Select the Computer Account.
    5. Select Local computer, and then click Finish.
    6. Click Close in the Add Standalone Snap-in dialog box.
    7. Click OK in the Add/Remove Snap-in dialog box. Your installed certificates are located in the Certificates folder in the Personal container.
  2. Use the MMC snap-in to install the certificate on the server:
    1. Click to select the Personal folder in the left-hand pane.
    2. Right-click in the right-hand pane, point to All Tasks, and then click Request New Certificate....
    3. The Certificate Request Wizard dialog box opens. Click Next. Select Certificate type is "computer".
    4. In the Friendly Name text box you can type a friendly name for the certificate or leave the text box blank, and then complete the wizard. After the wizard finishes, you will see the certificate in the folder with the fully qualified computer domain name.

    5. If you want to enable encryption for a specific client or clients, skip this step and proceed to the Enable encryption for a specific client section of this article.

      If you want to enable encryption at the server, open the Server Network Utility on the server where the certificate is installed, and then click to select the
      Force protocol encryption check box. Restart the MSSQLServer (SQL Server) service for the encryption to take effect. Your server is now ready to use SSL encryption.

[Enable encryption for a specific client]

For the client to request the SSL encryption, the client computer must trust the server certificate and the certificate must already exist on the server. You have to use the MMC snap-in to export the Trusted Root Certification Authority used by the server certificate:
  1. To export the server certificate's Trusted Root Certificate Authority (CA), follow these steps:
    1. Open MMC, and then locate your certificate in the Personal folder.
    2. Right-click the certificate name, and then click Open.
    3. Review the Certification Path tab. Note the top most item.
    4. Navigate to the Trusted Root Certification Authorities folder, and then locate the Certificate Authority noted in step c..
    5. Right-click CA, point to All Tasks, and then click Export.
    6. Select all the defaults, and then save the exported file to your disk where the client computer can access the file.
  2. Follow these steps to import the certificate on the client computer:
    1. Navigate to the client computer by using the MMC snap-in, and then browse to the Trusted Root Certification Authorities folder.
    2. Right-click the Trusted Root Certification Authorities folder, point to All Tasks, and then click Import.
    3. Browse, and then select the certificate (.cer file) that you generated in step 1. Select the defaults to complete the remaining part of the wizard.
    4. Use the SQL Server Client Network Utility.
    5. Click to select the Force Protocol encryption option. Your client is now ready to use SSL encryption.

[How to test your client connection]

To test your client connection you can either:
  • Use the Query Analyzer Tool.

    -or-

  • Use any ODBC application where you can change the connection string.
Query Analyzer Tool

To use the Query Analyzer Tool, follow these steps:
  1. Use the SQL Server Client Network Utility.
  2. Click to select the Force protocol encryption option.
  3. Connect to the server that is running SQL Server 2000 by using Query Analyzer.
  4. Monitor the communication by using Microsoft Network Monitor or a Network Sniffer.
ODBC or OLEDB Application Sample Connection Strings

If you use ODBC or OLEDB connection strings, follow these steps:
  1. Modify the ODBC or OLEDB connection string. For example:

    ODBC
    Driver=SQLServer;Server=ServerNameHere;UID=UserIdHere;PWD=PasswordHere;Network=DBNETLIB.DLL;Encrypt=YES
    OLEDB
    Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=dbNameHere;Data Source=ServerNameHere;Use Encryption for Data=True
  2. Connect to the server that is running SQL Server 2000, and then monitor the communication by using Microsoft Network Monitor or a Network Sniffer.

[Troubleshooting]

After you successfully install the certificate, the certificate does not appear in the Certificate list on the Certificate tab.

Note The Certificate tab is in the Protocols for <InstanceName> Properties dialog box that is opened from SQL Server Configuration Manager.

This issue occurs because you may have installed an invalid certificate. If the certificate is invalid, it will not be listed on the
Certificate tab. To determine whether the certificate that you installed is valid, follow these steps:
  1. Open the Certificates snap-in. To do this, see step 1 in the "How to Configure the MMC Snap-in" section.
  2. In the Certificates snap-in, expand Personal, and then expand Certificates.
  3. In the right pane, locate the certificate that you installed.
  4. Determine whether the certificate meets the following requirements:
    • In the right pane, the value in the Intended Purpose column for this certificate must be Server Authentication.
    • In the right pane, the value in the Issued To column must be the server name.
  5. Double-click the certificate, and then determine whether the certificate meets the following requirements:
    • On the General tab, you receive the following message:
      You have a private key that corresponds to this certificate.
    • On the Details tab, the value for the Subject field must be server name.
    • The value for the Enhanced Key Usage field must be Server Authentication (<number>).
    • On the Certification Path tab, the server name must appear under Certification path.
If any one of these requirements is not met, the certificate is invalid.
이올린에 북마크하기(0) 이올린에 추천하기(0)

Posted by 좐군

2009/11/28 23:50 2009/11/28 23:50
,
Response
No Trackback , No Comment
RSS :
http://John.tobe30.com/tc/rss/response/241

Trackback URL : http://John.tobe30.com/tc/trackback/241

Leave a comment
[로그인][오픈아이디란?]

[펌]SQL Server 2005 connectivity error messages

One of the more visible changes we made in connectivity space for SQL Server 2005 was enhancing error messages reported to the user in case of connection failures.  I have seen several cases over the last several months, and in this post I would like to list some of them with the root cause that caused them.  The cause may not be the only one triggering a particular error message, and there may be other error messages of interest. 

This is a semi-random selection from real cases I investigated.  Likely I will post another batch some time in the future, and I would be happy to see replies with additional errors, particularly if the root cause is unclear. 

The examples are from various client stacks – ODBC or OLEDB from SQL Native Client or from managed SqlClient. 

The exact formatting of the messages will depend on the application you use.  Most of the examples below used OSQL, SQLCMD, or SQL Server Management Studio. 

  • Connecting to a server by the server’s name from SqlClient, the server name is aliased to TCP, the server is up and running but it does not listen on TCP (or is not running at all):

An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: TCP Provider, error: 0 - No connection could be made because the target machine actively refused it.) (Microsoft SQL Server, Error: 10061)

  • Local connection from SqlClient; server is not running:

(a) default instance:

An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 2)

(b) named instance:

An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Shared Memory Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 2)

  • Remote connection from ODBC, Windows Firewall is turned on on the server machine but there is an exception for File and Printer Sharing:

 [SQL Native Client]Unable to complete login process due to delay in opening server connection

  • A successful TCP connection from SqlClient to the server was broken due to a TCP keep-alive heartbeat failure (typically indicating problems with the underlying network infrastructure):

A transport-level error has occurred when receiving results from the server. (provider: TCP Provider, error: 0 - The specified network name is no longer available.)

Possibly:

A transport-level error has occurred when sending the request to the server. (provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.)

  • OBDC connection attempt when server is not ready to process a new local connection, possibly due to overload: 

[SQL Native Client]Shared Memory Provider: Timeout error [258].
[SQL Native Client]Login timeout expired
[SQL Native Client]Unable to complete login process due to delay in prelogin response

[SQL Native Client]Shared Memory Provider: Could not open a connection to SQL Server [121].
[SQL Native Client]Login timeout expired
[SQL Native Client]An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections.

  • There is a space after server name in the connection string:

osql -E -S "<serverName> ,1433"
Login failed for user ''. The user is not associated with a trusted SQL Server connection.

The server ERRORLOG/EventLog shows something similar to:

2005-08-11 12:46:04.29 Logon       Error: 17806, Severity: 20, State: 2.
2005-08-11 12:46:04.29 Logon       SSPI handshake failed with error code 0x8009030c while establishing a connection with integrated security; the connection has been closed. [CLIENT: <IP address>]
2005-08-11 12:46:04.29 Logon       Error: 18452, Severity: 14, State: 1.
2005-08-11 12:46:04.29 Logon       Login failed for user ''. The user is not associated with a trusted SQL Server connection. [CLIENT: <IP address>]

  • Remote OLEDB connection using TCP to a server that is blocked by Firewall

HResult 0x274C, Level 16, State 1
TCP Provider: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

Error: Microsoft SQL Native Client : An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections..
Error: Microsoft SQL Native Client : Login timeout expired.

  • Remote OLEDB connection using TCP to a server that is either not running or does not have TCP/IP protocol enabled for incoming connections (but is not blocked by the Firewall on the server machine):

HResult 0x274D, Level 16, State 1
TCP Provider: No connection could be made because the target machine actively refused it.

Error: Microsoft SQL Native Client : An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections..
Error: Microsoft SQL Native Client : Login timeout expired.

출처 : http://blogs.msdn.com/sql_protocols/archive/2005/09/28/474698.aspx


이올린에 북마크하기(0) 이올린에 추천하기(0)

Posted by 좐군

2009/11/28 23:19 2009/11/28 23:19
,
Response
No Trackback , No Comment
RSS :
http://John.tobe30.com/tc/rss/response/240

Trackback URL : http://John.tobe30.com/tc/trackback/240

Leave a comment
[로그인][오픈아이디란?]

SSMS 에 Add-in인 SSMS Tool Pack을 소개하려 한다.  SSMS2005 버전과 SSMS2008 버전이 별도로 존재하므로 알맞은 버전을 설치해야 한다.
다운로드 : http://www.ssmstoolspack.com/Download.aspx
SSMS Tool Pack 은 다음과 기능을 제공한다.
( 필자의 경우 테이블에 데이터를 INSERT-SQL로 생성해주는 기능을 아주 유용하게 사용하고 있다.)


Features
Source : http://www.ssmstoolspack.com/Features.aspx
With windows connection color indicator you always know to which server you're connected to. The color strip can be docked to any side of the window and it's color can be easily changed from either it's context menu or from server coloring options.
Coloring for each server can be added, removed or just disabled.
Window Connection Coloring Thumbnail



Query Execution History (Soft Source Control) and Current Window History
Every SQL statement that you run is logged in a file on your disk or in a table in a database you specify with a connection string. This way, if you're working on some script you can get the full history of every change you've made between check-out and check-in of your file.
SQL Statements are saved in a list that is written to a file and/or a database with a timer which you can set to a desired interval.

Older query history logs can be auto deleted. Time after the logs are deleted is user settable.
Query Execution History Thumbnail
Current window history is a dockable window that show queries executed in a currently active window. There is also a search box at the top that filters results as you type. Current History Window Thumbnail




Search Table or Database Data
Simple search for a search term through all non-binary columns in a single table or in every table of a database. You can search in four ways: Contains, Starts with, Ends with and Equals.
Search Table or Database Thumbnail


Uppercase/Lowercase keywords and proper case Database Object Names
Set all keywords to uppercase or lowercase letters. Custom keywords can be added.
Format all database objects to their proper case sensitive name.
Format text Thumbnail


Run one script on multiple databases
Run selected or full window text on selected databases on the currently connected server. A new window is opened that contains one script for all databases. Run one script on multiple databases Thumbnail


Copy execution plan bitmaps to clipboard
Copy selected or all execution plans to a bitmap that is saved on the clipboard. Large execution plans that don't fit in the window are also copied in full.
Width of a picture containing all execution plans is equal to the width of the widest execution plan.
Copy execution plan bitmaps to clipboard Thumbnail


Search Results in Grid Mode and Execution Plans
Find all occurrences of your search string in the execution plans or in the results in datagrid mode.
Search results and execution plans Thumbnail


Generate Insert statements for a single table, the whole database or current resultsets in grids
Insert statements for the whole database are generated by the order of PK-FK relationships. Top tables with no FK's are scripted first. Binary data is by default fully scripted. If you wish you can also set the scripting data limit between 0 and 10 Mb. Larger values then the limit are then scripted as NULL.

Insert statements for the data in result grids are scripted into a new temporary table for each grid. For example from 5 result grids insert statements for 5 temporary tables get created.
Generate insert statements Thumbnail


Text document Regions and Debug sections
Regions behave in the same way as in Visual Studio. You can collapse them and expand them. Debug sections are sections that get commented or deleted when you change your script to Release configuration. A debug section is also a collapsable region. If you deploy a script in debug mode with added debug sections it will fail when run from SSMS without SSMS Tools Pack installed. You can of course comment those sections yourself by simply searching for start and end text of the debug sections. Regions and Debug section Thumbnail


Running custom scripts from Object explorer's Context menu
You can specify a custom script text, its name and node on Object Explorer on which you want to run it from. Node name, current database, current connection string and current server can also be specified in the custom script with keywords that are replaced with their respective values at script runtime. Run custom script Thumbnail


CRUD (Create, Read, Update, Delete) stored procedure generation
CRUD stored procedure generation for tables based on fully customizable templates that you can change to suit your needs. CRUD Thumbnail


New query template
When opening a new query window you can specify a template that will be displayed. New query Template Thumbnail

이올린에 북마크하기(0) 이올린에 추천하기(0)

Posted by 좐군

2009/10/20 00:21 2009/10/20 00:21
, ,
Response
No Trackback , No Comment
RSS :
http://John.tobe30.com/tc/rss/response/222

Trackback URL : http://John.tobe30.com/tc/trackback/222

Leave a comment
[로그인][오픈아이디란?]
DECLARE @old_datefirst INT
SELECT @old_datefirst = @@DATEFIRST

DECLARE @v_dayname_monday INT
SELECT @v_dayname_monday = 1
SET DATEFIRST @v_dayname_monday

DECLARE @v_date DATETIME
SELECT @v_date = '2009-08-01'    ---특정 날짜 지정.

SELECT @v_date date
, DATEPART(year, @v_date) [Year]
, DATEPART(week, @v_date) [Week of Year]
, DATEPART(dayofyear, @v_date) [Day of Year]
, CASE
WHEN DATEPART(weekday, @v_date) > 1 THEN DATEADD(day, (DATEPART(weekday, @v_date)-1) * -1 , @v_date)
ELSE @v_date END [First-day of Week]
, CASE
WHEN DATEPART(weekday, @v_date) < 7 THEN DATEADD(day, 7-DATEPART(weekday, @v_date), @v_date)
ELSE @v_date END [Last-day of Week]

SET DATEFIRST @old_datefirst

/*
실행결과
date                 Year Week of Year Day of Year First-day of Week   Last-day of Week
2009-08-01 2009 31                         213                 2009-07-27            2009-08-02
*/
이올린에 북마크하기(0) 이올린에 추천하기(0)

Posted by 좐군

2009/08/20 22:00 2009/08/20 22:00
, ,
Response
No Trackback , No Comment
RSS :
http://John.tobe30.com/tc/rss/response/189

Trackback URL : http://John.tobe30.com/tc/trackback/189

Leave a comment
[로그인][오픈아이디란?]

DECLARE @v_xml XML
, @v varchar(max)
SELECT @v_xml = '<row id=""/>'
, @v = 'xxxxx'
SET @v_xml.modify(' replace value of (/row/@id)[1] with sql:variable("@v") ');
SELECT @v_xml ;

--반환값
<row id="xxxxx" />

이올린에 북마크하기(0) 이올린에 추천하기(0)

Posted by 좐군

2009/08/11 19:33 2009/08/11 19:33
,
Response
No Trackback , No Comment
RSS :
http://John.tobe30.com/tc/rss/response/188

Trackback URL : http://John.tobe30.com/tc/trackback/188

Leave a comment
[로그인][오픈아이디란?]

[SQL Server]SQL Server 2005 XML ASCII 문자(1~31) 사용시 오류 문제.


1. 오류 재현 코드

DECLARE @v_xml XML DECLARE @v_looper INT SELECT @v_looper = 1 WHILE (@v_looper<31) BEGIN SELECT @v_looper = @v_looper + 1 BEGIN TRY   SELECT @v_Xml = N'<rows>

<row attr="' + CHAR(@v_looper) + '" />

</rows>' PRINT 'Success! ASCII Code:' + CAST(@v_looper AS VARCHAR(10)) END TRY BEGIN CATCH PRINT 'Failure! ASCII Code:' + CAST(@v_looper AS VARCHAR(10)) --PRINT ERROR_NUMBER() --PRINT ERROR_MESSAGE() END CATCH END


실행결과

Error! ASCII Code:2

Error! ASCII Code:3 Error! ASCII Code:4 Error! ASCII Code:5 Error! ASCII Code:6 Error! ASCII Code:7 Error! ASCII Code:8 Success! ASCII Code:9 Success! ASCII Code:10 Error! ASCII Code:11 Error! ASCII Code:12 Success! ASCII Code:13 Error! ASCII Code:14 Error! ASCII Code:15 Error! ASCII Code:16 Error! ASCII Code:17 Error! ASCII Code:18 Error! ASCII Code:19 Error! ASCII Code:20 Error! ASCII Code:21 Error! ASCII Code:22 Error! ASCII Code:23 Error! ASCII Code:24 Error! ASCII Code:25 Error! ASCII Code:26 Error! ASCII Code:27 Error! ASCII Code:28 Error! ASCII Code:29 Error! ASCII Code:30 Error! ASCII Code:31

위 실행결과에서 확인할 수 있듯이 ASCII코드 1에서 31사이에 사용 가능한 Character는

9  (TAB : horizontal tab, XML #x9)
10 (LF : line feed, new line, XML #xA)
13 (CR : carriage  return, XML #xD)

이렇게 세가지 뿐이고, 나머지 Character는 다음과 모두 에러를 발생한다.

메시지 9420, 수준 16, 상태 1, 줄 9
XML parsing: line 1, character 18, illegal xml character
이 같은 문제에 대해 MS에서는 해당 문자들은 XML 스펙에서 사용을 금지하고 있으므로 사용하지 말라고 이야기 하고 있다.

PRB: Error Message When an XML Document Contains Low-Order ASCII Characters

원문 : http://support.microsoft.com/kb/315580

SYMPTOMS (증상)

When you attempt to use versions 3.0 or later of the MSXML parser to parse XML documents that contain certain low-order non-printable ASCII characters (that is, characters below ASCII 32), you may receive the following error message:
An Invalid character was found in text content.


CAUSE

Versions 3.0 and later of the MSXML parser strictly enforce the valid XML character ranges that are defined by the World Wide Web Consortium (W3C) XML language specification. XML documents that are parsed using versions 3.0 or later of MSXML cannot contain characters that fall outside the defined valid XML character ranges. The low-order non-printable ASCII characters in the ranges that are listed in the "More Information" section are not valid XML characters. An XML document that contains instances of these characters is not conformant with the W3C specifications and cannot be parsed successfully with versions 3.0 and later of MSXML.


RESOLUTION
To resolve this problem, either remove instances of the low-order non-printable ASCII characters, or replace the characters with an alternate valid character such as the space character (ASCII 32, hex #x20). This solution makes the XML document compliant with the W3C specifications. However, removing or replacing instances of these characters may affect other applications that use the data and to which the characters are significant. Such additional impact can only be identified by testing and will need to be addressed by implementing a fix or workaround that is appropriate for a specific situation.

STATUS
This behavior is by design.


MORE INFOMATION
Versions 2.6 and earlier of the MSXML parser permit XML documents to contain low-order non-printable ASCII characters that fall outside the W3C valid XML character ranges. However, the design of versions 3.0 and later of the MSXML parser has been changed to strictly enforce the valid XML character ranges that are defined in the W3C XML language specification. This design change is required to be able to identify non-conformant XML documents.
The following are the valid XML characters and character ranges (hex values) as defined by the W3C XML language specifications 1.0:
#x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]
The following are the character ranges for low-order non-printable ASCII characters that are rejected by MSXML versions 3.0 and later:
#x0 - #x8 (ASCII 0 - 8)
#xB - #xC (ASCII 11 - 12)
#xE - #x1F (ASCII 14 - 31)
This design change may affect the following users and applications:
  • Internet Explorer users: Users who have been using Internet Explorer versions 5.5 and earlier (and who did not install MSXML 3.0 in Replace mode) to browse and view XML documents that contain one or more instances of the specified low-order non-printable ASCII characters encounter the error message after upgrading to Internet Explorer 6.0 because Internet Explorer 6.0 installs MSXML 3.0 SP2 in Replace mode and uses it to parse XML documents.
  • MDAC and ADO users: Developers and users who load ADO-persisted XML documents that contain one or more instances of the specified low-order non-printable ASCII characters into ADO Recordset objects encounter the error message after upgrading to MDAC 2.7 because MDAC 2.7 installs MSXML 3.0 SP2, which is the version of the MSXML parser that the ADO 2.7 Recordset object uses.
  • Applications that use the MSXML Document Object Model (DOM): Applications that use version independent PROGIDs to instantiate MSXML DOM objects that are used to parse XML documents generate the specified error when MSXML 3.0 or one of its service packs is installed in Replace mode or when the code is modified to use the MSXML 3.0 or 4.0 version specific PROGIDs.


REFERENCES

For additional information on other known causes and workarounds for the error message that is specified in the 'Symptoms' section, click the article numbers below to view the articles in the Microsoft Knowledge Base:
238833  (http://support.microsoft.com/kb/238833/EN-US/ ) PRB: XML Parser: Invalid Character Was Found in Text Content
275883  (http://support.microsoft.com/kb/275883/EN-US/ ) INFO: XML Encoding and DOM Interface Methods

APPLIES TO
  • Microsoft XML Parser 3.0
  • Microsoft XML Parser 3.0 Service Pack 1
  • Microsoft XML Parser 3.0 Service Pack 2
  • Microsoft XML Core Services 4.0
  • Microsoft Data Access Components 2.8


이에 대해서 W3C의 Extensible Markup Language (XML) 1.0 (Fifth Edition) 에서 다음과 같이 정의하고 있다. ("2.2.Characters"에 대한 내용만 일부 복사.)

Extensible Markup Language (XML) 1.0 (Fifth Edition)
W3C Recommendation 26 November 2008
2.2. Characters
[Definition: A parsed entity contains text, a sequence of characters, which may represent markup or character data.] [Definition: A character is an atomic unit of text as specified by ISO/IEC 10646:2000 [ISO/IEC 10646]. Legal characters are tab, carriage return, line feed, and the legal characters of Unicode and ISO/IEC 10646. The versions of these standards cited in A.1 Normative References were current at the time this document was prepared. New characters may be added to these standards by amendments or new editions. Consequently, XML processors MUST accept any character in the range specified for Char. ]

Character Range
[2]    Char    ::=    #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]
/* any Unicode character, excluding the surrogate blocks, FFFE, and FFFF. */

The mechanism for encoding character code points into bit patterns may vary from entity to entity. All XML processors MUST accept the UTF-8 and UTF-16 encodings of Unicode [Unicode]; the mechanisms for signaling which of the two is in use, or for bringing other encodings into play, are discussed later, in 4.3.3 Character Encoding in Entities.

Note:
Document authors are encouraged to avoid "compatibility characters", as defined in section 2.3 of [Unicode]. The characters defined in the following ranges are also discouraged. They are either control characters or permanently undefined Unicode characters:
[#x7F-#x84], [#x86-#x9F], [#xFDD0-#xFDEF],
[#x1FFFE-#x1FFFF], [#x2FFFE-#x2FFFF], [#x3FFFE-#x3FFFF],
[#x4FFFE-#x4FFFF], [#x5FFFE-#x5FFFF], [#x6FFFE-#x6FFFF],
[#x7FFFE-#x7FFFF], [#x8FFFE-#x8FFFF], [#x9FFFE-#x9FFFF],
[#xAFFFE-#xAFFFF], [#xBFFFE-#xBFFFF], [#xCFFFE-#xCFFFF],
[#xDFFFE-#xDFFFF], [#xEFFFE-#xEFFFF], [#xFFFFE-#xFFFFF],
[#x10FFFE-#x10FFFF].

나의 결론 : 지금까지 이런 문제에 대해 전혀 모르고 있었다. XML를 사용하면서 W3C의 XML 스펙 문서를 자세히 읽어 본 적도 없고,  XML관련 서적을 봤을 때 W3C의 XML 스펙에 대해 이야기하는 책도 접해보지 못했다. 새로운 기술을 사용할 때는 기본에 충실하고,  해당 표준 스펙에 대해 충분히 숙지 해야할 것이다. 그리고 또 다른 한가지는 모든 스펙문서가 영문으로 된 경우 많으므로 영어능력을 키우는 것도 중요하겠다. 여기서 다시 한번 모든 학문의 기초는 영어라는 이야기를 되새기면서... 이 씁쓸함은 머지?





이올린에 북마크하기(0) 이올린에 추천하기(0)

Posted by 좐군

2009/06/07 00:47 2009/06/07 00:47

Trackback URL : http://John.tobe30.com/tc/trackback/165

Leave a comment
[로그인][오픈아이디란?]

[SQL Server]sp_reset_connection이 무엇을 하는가?

What does sp_reset_connection do?

Data access API's layers like ODBC, OLE-DB and SqlClient call the (internal) stored procedure sp_reset_connection when re-using a connection from a connection pool. It does this to reset the state of the connection before it gets re-used, however nowhere is documented what things get reset. This article tries to document the parts of the connection that get reset.

sp_reset_connection resets the following aspects of a connection:

  • It resets all error states and numbers (like @@error)
  • It stops all EC's (execution contexts) that are child threads of a parent EC executing a parallel query
  • It will wait for any outstanding I/O operations that is outstanding
  • It will free any held buffers on the server by the connection
  • It will unlock any buffer resources that are used by the connection
  • It will release all memory allocated owned by the connection
  • It will clear any work or temporary tables that are created by the connection
  • It will kill all global cursors owned by the connection
  • It will close any open SQL-XML handles that are open
  • It will delete any open SQL-XML related work tables
  • It will close all system tables
  • It will close all user tables
  • It will drop all temporary objects
  • It will abort open transactions
  • It will defect from a distributed transaction when enlisted
  • It will decrement the reference count for users in current database; which release shared database lock
  • It will free acquired locks
  • It will releases any handles that may have been acquired
  • It will reset all SET options to the default values
  • It will reset the @@rowcount value
  • It will reset the @@identity value
  • It will reset any session level trace options using dbcc traceon()

sp_reset_connection will NOT reset:
  • Security context, which is why connection pooling matches connections based on the exact connection string.
  • If you entered an application role using sp_setapprole, since application roles can not be reverted.

To learn more about connection pooling see Pooling in the Microsoft Data Access Components.


            
이올린에 북마크하기(0) 이올린에 추천하기(0)

Posted by 좐군

2009/05/12 12:59 2009/05/12 12:59
, , ,
Response
No Trackback , No Comment
RSS :
http://John.tobe30.com/tc/rss/response/139

Trackback URL : http://John.tobe30.com/tc/trackback/139

Leave a comment
[로그인][오픈아이디란?]
« Previous : 1 : 2 : 3 : 4 : Next »