Change SQL database collation

SQL database can be changed by using this sql script

ALTER DATABASE UnuScriptTest SET SINGLE_USER WITH ROLLBACK IMMEDIATE;

GO

ALTER DATABASE UnuScriptTest COLLATE Latin1_General_CI_AS;
GO

ALTER DATABASE UnuScriptTest SET MULTI_USER;

GO
Advertisements

Issue with SQL: the log for database ‘tempdb’ is not available

When working with AX error looks something like ” cannot select data for “/username” in sql” with select including tempdb.

When logging in into SQL following error appears :

trmpdb error

 

This issue can be solved by following method:

Check if log files exist using:

use tempdb
go
sp_helpfile
go

If they do exist, then simply restart sql server service, and it should work. Or at least it worked for me