terça-feira, 22 de maio de 2012

Login failed for user ''.

I was receiving log file entry in the summary of SQL Server log, wich states Login failed for user ''. There were no user name indicated inside the quotes. After many searches in the web, with no success, I've come to a answer.
Before the grand finalle I must say I've done many reconfigurations in IIS, SQL server properties, SQL server services,  Web config of the ASP.NET application, etc. Everything I could find in the Internet I've tried.
Then, I just look the application code for some clue. All of a sudden, a old database name pops up in my screen, prefixing a domain table, used to fill a dropdown list box. I've just deleted the old reference, and voilá (or Eureca!), the login failed for user '<empty>' was eliminated!
No problems with my database configurations, nor the IIS, but only with the application code, ok?
I hope to help many friends with my experience is this situation, when it will be the case, of course. I've spend many hours untill get successful, you don't need anymore.
That's all for now, folks.

Unreacheable code, can be "unthinked" code

It´s just a tip, not related to DB administration, but valid for all areas where the development can reach (including database). When programming, and the compiler warns you about an unreacheable code (e.g. warning CS0162: unreacheable code detected), don't use the pragma compilation instruction which tells the compiler to not to do its job: warn you! It's a bad decision because this means, in major cases, you make a bad algorithm. And against bad programming there is no such hardware power or enough memory. It will be always a heavy weight, maybe a failure or a breach to the security or a bug. But if it's unreacheable, how can it be a problem? What if a hacker change some status which make this part of your code to be reacheable (by tampering, or else)? Treat you code. It will reduce the cyclomatic complexity, become more "dry", and, who knows, more secure. 


Well, we know there are exceptions for almost everything, so, if that's the case, look how to use it in C#:
Pragma warning link: http://msdn.microsoft.com/en-us/library/441722ys(v=vs.80).aspx


Think! That's your job!

quinta-feira, 3 de maio de 2012

Upgrading SDF files from 2.0 to higher versions

When upgrading my .sdf file into a newer version (3.5), I got the error 8007007e the specified module could not be found. This way, no clues, no dinner, no love. After looking around (Internet seems to be infinite when you cant find what you´re lookin for), I have the idea to copy all files from the folder of \program files\SQL Server compact...\ into the folder EN, inside of this same folder, where the isqlw.exe lies down. Voilá, no more problem when upgrading. For some reason, my files were outside the language folder, hence the libraries were also outside, unreacheable for the isqlw.
This applies to SQL Server Compact running on Windows CE 5, using .NET Compact framework 2.0 and 3.5. My desktop has VS2008 and VS2010 ultimate installed.
Hope to help, just in case.

terça-feira, 20 de março de 2012

Permissions problems in SQL Server Reporting Services

If you are having permissions problems in SQL Server Reporting Services, even though your account a member of the Administrators group, try to add it to the users group (users or domain users). After trying dozens of tips, redo multiple configurations, I created another administrative account and this worked without a problem of permission. The difference between this second account and the first was his participation of the user group. Ai was only doing the obvious and include the account that didn't work in the group. Worked without problems. Except that the permissions were based on lower profile, what are the permissions of a user policy. The second administrative account, created for the test, everything was released. All the other tips I used can be found on the Internet.

Problema de permissão no Reporting Services

Se você está tendo problemas de permissões no SQL Server Reporting Services, mesmo sendo sua conta uma integrante do grupo de administradores, experimente adicioná-la ao grupo de usuários (users ou domain users). Depois de tentar dezenas de dicas, refazer várias configurações, criei outra conta administrativa e esta funcionou sem o problema da permissão. A diferença entre esta segunda conta e a primeira era sua participação do grupo de usuários. Ai foi só fazer o óbvio e incluir a conta que não funcionava no grupo. Funcionou sem problemas. Exceto pelo fato de que as permissões foram baseadas no menor perfil, que são as permissões de um usuário comum. Já a segunda conta administrativa, criada para o teste, tudo ficou liberado. Todas as outras dicas que usei podem ser encontradas na Internet.

quinta-feira, 1 de março de 2012

NoSQL para Oracle e SQL Server

Gostaria de saber se há algum material sobre a adoção de tecnologias de gerenciamento e acesso a dados não estruturados, baseadas em NOSQL, para os bancos mais tradicionais, como Oracle e SQLServer. Tenho visto vários bancos para o NoSQL, mas sabemos que a realidade corporativa é bem diferente do desejo acadêmico e tecnológico. Migrar é caro e nem sempre é possível. E todos sabemos que o banco relacional ainda será a solução ideal para a parte transacional das empresas, nos obrigando assim a construir soluções híbridas de gerenciamento de dados, onde o relacional e o não estruturado terão que conviver, e mais que isto, terão que se integrar para se retroalimentarem. Será uma simbiose, como em muitas outras tecnologias. Estou envolvido em alguns projetos de desenvolvimento e não está sobrando tempo para estas pesquisas. Se alguém souber de alguma notícia dos grandes players, favor informar, ou colaborar, como dizemos corporativamente.

domingo, 19 de fevereiro de 2012

SQL Server express não tem Agent

É isto mesmo, nem a versão mais atual do SQL Server Express (atualmente 2008 R2) traz o serviço SQL Server Agent "habilitável". Ele é instalado, mas não é possível inicializá-lo, apesar de tudo parecer que vai funcionar. E não adianta instalar as features. O serviço não indica diretamente o erro, que na verdade é "by design", e por isto não considerado um erro, literalmente. Mas você só descobre depois que já está pronto para usar o serviço, não é mesmo?