SQL server -T-SQL questions and examples.
Lessons once learned and now recorded.
ASP.NET page returns this erorr: The EXECUTE permission was denied on the object ‘aspnet_CheckSchemaVersion’, database ‘YourDB’, schema ‘dbo’. (1) First try runing this command/wizard: %WinDir%\Microsoft.NET\Framework\v2.0.50727\aspnet_regsql.exe (2) If this doesn’t work, try this query: — Add user ASPNET to DB role USE YourDB GO sp_addrolemember ‘aspnet_Membership_FullAccess’, ‘ASPNET’ These steps should resolve […]
This article contains 3 examples: – T-SQL; – MS Access; – AS/400. This example shows a standard T-SQL syntax tested on MS SQL 2005 server: update P set P.CertMemberLevelID = Z.CertLevelTo from UPM_MemberPermissionMask P INNER JOIN zzzCertRegistryUpdate Z ON P.MemberID = Z. Cert2ID Here we are updating one […]
It is meaningless to compare for equality (==) two fields of type SmallDateTime, because they contain time component and they are hardly ever the same. Here are some interesting ways around this problem to check, if two SmallDateTime fields have the same date component.
It was time to move many sites from W2K3 Server (Windows 2003 Server) and SQL 2000 Server to a new W2K8 Server (Windows 2008 Server) and SQL 2008 Server. And if I ever have to do it again, I will check with these notes. The greatest secret in technical life […]
This article shows how to use string parameters to make selection on Boolean fields. What is it you need to select “true”, “false” of “ALL” records. How WHERE statement will look like in that case? […]
You have a large table (in my case it has 8,697,647 records) with an Asset Number and a Business Unit, and you would like to know if any asset has record with multiple Business Units. You can count records of unique Asset/BU combinations, but this is not what you want: […]
You have 180 days to evaluate. You can check number of days till expiration: open your SQL Server Management Studio and widen first line in Help — About box. What if your trial is about to expire, and you need just a few more days to evaluate? You can switch […]
What is Wrong with Home Server? After a RAID drive hiccup on my local Windows 2008 Server, I was more inclined to consider an external hosting options. And one of my friends already uses Amazon hosting for at least 4 years now. So I decided to invest some time to […]
Environment ASP or ASP.NET site is running on IIS 7.5. SQL Server 2008 R2 Express (10.50.1600.1) running on Windows 2008 Server R2 (W2K8 R2) x64. Problem You will see one of two errors depending on whether you dealing with ASP or ASP.NET sites. On ASP.NET sites you will […]