Collation( codificação de caracteres ) no MS SQL Server

Porque as páginas que acessam o banco de dados estão exibindo caracteres estranhos ?

Para resolver problemas de acentuação com aplicações em PHP, Java e outras linguagens não-Microsoft que utilizam o SQL Server, consulte antes Resolvendo problemas de acentuação em PHP / Java e SQL Server

Isto ocorre devido ao fato da sua base de dados local utilizar um collation diferente do collation padrão da Locaweb (SQL_Latin1_General_CP850_CI_AI).

Nestes casos, é necessário que você altere o collation da sua base na Locaweb para o mesmo collation utilizado na sua base local e efetue uma nova exportação dos dados.

Para verificar qual é o collation utilizado na sua base de dados local, execute o comando sp_helpdb e verifique no campo status o item collation.

Para alterar o collation da sua base na Locaweb, basta executar as instruções abaixo.

 

 

ALTER DATABASE <nome_banco> SET SINGLE_USER WITH ROLLBACK IMMEDIATE; ALTER DATABASE <nome_banco> COLLATE <novo_collation>; ALTER DATABASE <nome_banco> SET MULTI_USER;

 

  • Como alterar o collation do campo de uma tabela.

 

ALTER TABLE <tabela> ALTER COLUMN <campo> <tipo_de_dado> COLLATE <novo_collation>;

 

  • Como verificar o collation atual da sua base.

 

SP_HELPDB <sua_base>;

Verifique na coluna Status o Collation

Em caso de dúvidas sobre qual collation utilizar verifique a Documentação Oficial

Observações:

  • Lembre-se de remover os sinais de maior (>) e menor (<).
  • A alteração de collation da base somente afeta os novos objetos criados, as tabelas já existentes permanecerão com o collation anterior.
  • Na Videobes, inicialmente, todas as bases são habilitadas usando o collation SQL_Latin1_General_CP850_CI_AI.
O artigo ajudou ?
SimNão

45 Comments

Jestem pod wrażeniem Twojej otchłani koncepcji i kolumna umiejętność złożoną pytanie dostępną Pojemną pracę|To post to klejnot Więc zadowolony jak poncz konfigurowałem to|Ty ojciec niesamowite zdolność wydziału do kasowania atrakcyjna treść|To pismo na najwyższym poziomie zdobyłeś modern obserwującego|Twój enter był zarówno wnikliwy, jak i uroczo napisany|Jestem zdumiony by jak wiele kulturalnie z tego posta|wykonujesz znaczną pracę To dispatch jest ratyfikacją o tym} {https://kredytero.pl|kredytero.pl|kredyt|kredyty|kredyt online|kredyty online|kredyt przez internet|kredyty przez internet}!

ìåéä złożoną problem dostępną Dużą pracę|To post to klejnot Więc zadowolony jak poncz znalazłem to|Ty musisz niesamowite umiejętność do kasowania atrakcyjna treść|To pismo na najwyższym poziomie zdobyłeś unfamiliar obserwującego|Twój post był zarówno wnikliwy, jak i uroczo napisany|Jestem zdumiony podczas jak wiele kulturalnie z tego posta|wykonujesz ogromną pracę To wysłanie jest pozostań o tym} {pożyczki online|pożyczki|pożyczki pozabankowe|http://pozyczkaland.pl/|pozyczkaland.pl/|pożyczka online|pożyczka|pożyczka pozabankowa}!

I really got here from the beginning to the end of your mail and turned into promptly captivated through your insights. Your perspective fish for is both uncomplicated and concept-provoking. it is evident that you’ve achieved successfully delve into, and your understanding to present the facts in an attractive means is wonderful. this is a rationale i’ve been interested in after a while, and your post has provided me with a manufacturer new outlook. thanks in compensation sharing your https://cialisbov.com/.

I’ve just finished reading your latest blog post, and I must say, it’s outstanding! The depth of your analysis coupled with your engaging writing style made for an exceptional read. What struck me most was your ability to break down complex ideas into digestible, relatable content. Your examples and real-life applications brought the topic to life. I’ve gained a lot from your insights and am grateful for the learning. Keep up the fantastic work – your blog is a treasure trove of knowledge!

Your latest blog post truly resonated with me! The depth of insight and the clarity of your thoughts are commendable. It’s evident that you’ve put a lot of thought and research into this topic, and it shows. Your ability to present complex ideas in such an accessible and engaging manner is a rare skill. Thank you for sharing your knowledge and perspective – it’s been a thought-provoking read and I’m already looking forward to your next piece!

My coder is trying to convince me to move to .net from PHP. I have always disliked the idea because of the expenses. But he’s tryiong none the less. I’ve been using WordPress on a number of websites for about a year and am concerned about switching to another platform. I have heard good things about blogengine.net. Is there a way I can import all my wordpress content into it? Any kind of help would be really appreciated!

online kasino- World’s Top Online Casinos, new user welfare register bonus 66₱, daily Betting Rebate 2. fast withdraw, good bonus, variety of games, World brand is trustworthy. Slot games, Card games , Live Casino, Animals(Cockfight games), fishing.

Deixe uma resposta