I read a heavy data from csv file to sql server table,but i cant encode that data with this encode code:
Encoding.GetEncoding(1256)
I read this link and notice this:
https://msdn.microsoft.com/en-us/library/ms186356.aspx
The code 1256 is Arabic Encode,and i want to change my database collation with under solution:
- Right click on my database
- choose option
change collation
But when click ok i get this error:TITLE: Microsoft SQL Server Management Studio
Alter failed for Database 'behzad'. (Microsoft.SqlServer.Smo)
ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
The database could not be exclusively locked to perform the operation. ALTER DATABASE failed. The default collation of database 'behzad' cannot be set to Arabic_100_CI_AS_KS. (Microsoft SQL Server, Error: 5030)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&ProdVer=12.00.2000&EvtSrc=MSSQLServer&EvtID=5030&LinkId=20476
BUTTONS:
OK