• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 212
  • Last Modified:

how to find code page SQL

Hello,

how to find code page SQL for an instance?

Thanks

bibi
0
bibi92
Asked:
bibi92
  • 3
  • 2
2 Solutions
 
morpheiosCommented:
Its named collations:

SELECT DATABASEPROPERTYEX('AdventureWorks', 'Collation') SQLCollation;

Open in new window


ResultSet:
SQLCollation
————————————
SQL_Latin1_General_CP1_CI_AS

Open in new window

0
 
morpheiosCommented:
It was for database

for server

SELECT CONVERT (varchar, SERVERPROPERTY('collation'))

Open in new window

0
 
bibi92Author Commented:
Is CP1 the code page?
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
morpheiosCommented:
In this exapmle Latin1 is collation

http://msdn.microsoft.com/en-us/library/aa214408

Code page       Description
1258       Vietnamese
1257       Baltic
1256       Arabic
1255       Hebrew
1254       Turkish
1253       Greek
1252       Latin1 (ANSI)
1251       Cyrillic
1250       Central European
950       Chinese (Traditional)
949       Korean
936       Chinese (Simplified)
932       Japanese
874       Thai
850       Multilingual (MS-DOS Latin1)
437       MS-DOS U.S. English
0
 
keyuCommented:
You can either run the SQL query:
SELECT SERVERPROPERTY('instancename')  

 using your connection, or you can use the SMO (SQL Server Management Objects) to get that information:
using(SqlConnection _con = new SqlConnection(your-connection-string))
{
   string instanceName = new Microsoft.SqlServer.Management.Smo.Server
                            (new ServerConnection(_con)).InstanceName;
}
0
 
bibi92Author Commented:
Thanks bibi
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now