Error 3031: Problem in mapping fragments starting at line… nullable column

Error 3031: Problem in mapping fragments starting at line… nullable column

In SQL I added a column to a table and initially had the column as Not Nullable. I then updated a view to use the new column. I then updated Entity Framework model from the database. I then changed my mind and made the column nullable. I then updated EF model once again and it would not compile. No-manner of updating column Nullable properties worked.

After some reading suggested this was a bug in EF. As a precaution I updated the view in SQL to refresh the schema went to EF and removed and added it again.

Crystal Reports run-time error – “Failed to open a rowset”

Details: HY000:[Microsoft][SQL Server Native Client 10.0]Connection is busy with results for another comand

SOLVED
Report ran in Crystal Reports designer. Problem turned out to be that there was an unlinked table in Visual designer. Replaced the fields from this table with fields in a view, then removed this table from the report and report then ran

USED this entry:
SRS 18th Dec 2012

THIS ERROR Can also be if there are truly multiple start points for your Crystal Report

In this case use two connections.  This could be the same ODBC connection added to the report again. This works as proved 11-Jan-13
See Purchasing\Requirements.rpt

ODBC Crystal Reports ODBC hanging due to Tracing Log file

Problem on a colleagues machine where ODBC was very slow on Crystal Reports.

We thought problem was due to 32-bit and 64-bit ODBC. Possibly see http://support.microsoft.com/kb/942976

SOLVED
However problem was that ODBC > Tracing > Tracing was on. Stopped it and crystal reports immediately went quicker. The log file was also very big 200,000 Kb.

SQL Server Report Manager takes a long time to start up

See post below
May need to go to Programs > turn windows features on or off for IIS Manager

http://www.developmentnow.com/g/115_2005_11_0_0_641257/Report-Manager-Start-Up.htm

I believe the setting you are looking for is the “Shutdown worker processes
after being idle for…” on the Performance tab of the application pool that
the Reports virtual directory is assigned to.
See old post below for details:
[quoted text, click to view]

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

If you are running Windows 2003 server for your IIS reportserver, then this
is a simple issue – I’ll explain what happens:
The report service engine, once it is idle for more than the default 20
minutes, the worker process is shutdown.
This is controlled by IIS.
Open up the Internet Information Services (IIS) Manager
Expand the server node then the application pools.
On my IIS machine, I created an application pool dedicated to the
reportserver & reportmanager virtual webs.
But anyways, for the application pool that the reportserver is pointing to
if you left everything to their defaults will be the DefaultAppPool.
Right click the default app pool and select properties.
There are two things that are checked by default – On the recycling tab
there is a checkbox for recycling worker processes – it is currently set to
1740 minutes (29 hours). Leave it.
The other one is on the performance tab – which is the one you are
interested in changing….
See the “Idle Timeout” section and increase the number of minutes to be 8
hours a typical working day – 8*60 = 480 minutes.
Next, to be sure the “morning person” that runs the first report doesn’t get
the delay, set up a schedule for either a dummy or adhoc report to fire off
like at 6am so that the report component worker processes get loaded.

VPN gets stuck on “Verifying username and password”

When attempting to connect the VPN gets stuck on “Verifying username and password” (hangs). After a while it then gets stuck on “Connecting to **.**.***.*** using *” and eventually returns a long message and may attempt to redial. The solution below is for messages containing text including GRE.

HYPOTHESES

  1. Also I was using both a laptop and PC with VPN switching to a couple of companies. It may fail on one machine if the other machine is already logged in.
  2. Possibly following a failed connection, I found that a VPN I have used a lot on Windows 7 had a blank User name: when this was normally filled in.

EXPERIMENT

  1. Hypothesis 1:- Reverse the first machine to log in. This time the other machine VPN started failing and in fact scenario 2, the User name became blank.

SOLVED
Create a new VPN which worked, then delete the old VPN

UNSOLVED
For error message 800 there are different problems. One of these is conflict between two computers. There may be a timeout on the server before another computer may connect, possible 30 minutes. Secondly may need to uncheck “Use default gateway on remote network”, this worked once, did not work several times.

ALSO
There are pages on web e.g. however first try above
http://www.sevenforums.com/network-sharing/90522-vpn-not-accepting-incoming-connections.html

SQL Server Operators – SQL Agent Alert System – Notify Operators

After adding SQL Operators you need to restart SQL Agent

ERROR in SQL Agent Jobs
… NOTE: Failed to notify ‘<operator name>’ via email.

[476] Database Mail is not enabled for agent notifications. Cannot send e-mail to
[475] Database Mail is not enabled for agent notifications.

May have log in SSMS > SQL Server Agent > Error Logs

SOLVED
Credit to:
http://sqlblog.jfperry.com/jpsql/post/2009/04/07/NOTE-Failed-to-notify-7boperator7d-via-email.aspx

This was set up on one of my work servers. For a different company this needed to be set up.

On SQL 2005+ you have to tell SQL Server Agent / Properties / Alert System, which profile that you’d like to enable. Here’s what it does.
e.g. and don’t forget to restart SQL Agent

To set up SQL Server Agent Mail to use Database Mail

  1. In Object Explorer, expand a server.
  2. Right-click SQL Server Agent, and then click Properties.
  3. Click Alert System.
  4. Select Enable Mail Profile.
  5. In the Mail system list, choose Database Mail.
  6. In the Mail profile list, select a mail profile for Database Mail.

Or less likely Transact SQL

USE [msdb]
GO
EXEC master.dbo.xp_instance_regwrite
N'HKEY_LOCAL_MACHINE', N'SOFTWARE\Microsoft\MSSQLServer\SQLServerAgent',
N'DatabaseMailProfile',
N'REG_SZ',
N'MyDatabaseProfile'
GO

Windows 7 Homegroup – Blocked by McAffee – Also how to set-up

I set up Windows 7 Homegroup on my PC and was able to see this from my laptop.
However I was unable to see my PC from my laptop.
SOLVED
After some reading decided to remove my almost redundant McAffee from my laptop. As soon as I did this Homegroup started working. As did remote connections to SQL Server.

New Problem 12th July 2012

Not able to see PC HomeGroup folders on laptop. Solution was to set up a Library on PC and then Share with for this library – rather than direct on folder

AMD HD6770 Secondary Screen Flicker

Problem
Open google and run mouse over menu. Second screen flickers with a horizontal line across it.

SOLVED

  1. Catalyst Control Center
  2. Performance
  3. Enable AMD Overdrive check box. Uncheck this. Apply.

Reported in several websites

“Missing Operating system” on Boot

ERROR Yikes.
When  playing with BIOS settings to try and use Graphics card + OnBoard (see previous post), I was curious to see if OnBoard would work on it’s own. So change one option to IDE, with no graphics card. At this point I had no monitor, possibly only on boot. I may have at some point used some form of Restore Default Settings. From this point forth it would not boot, but would just display “Missing Operating System”.

SOLVED: With more technical support we realised that the SATA configuration settings were something other than RAID, which this machine is on. After reverting this back to RAID the machine booted again.

SQL Agent job calling stored procedure msdb.dbo.sp_send_dbmail @query does not return any records

ERROR:
SQL Agent job calling stored procedure msdb.dbo.sp_send_dbmail @query does not return any records

SOLUTION
Add the Database Name into the @query

BACKGROUND
This may be because of the default database of the account which executes the SQL Agent job.

EXAMPLE
If @query does not include the database name (three-part naming), it is possible that although the EXISTS may fire, the @query does not.
To solve add the Database Name into the @query.

BEGIN TRY

IF EXISTS(SELECT * FROM Production.vAuditSOCDBTable)
  BEGIN
   DECLARE @MyBody nvarchar(100)
   SET @MyBody = ‘<message>’ + char(13) + char(10)

   EXEC msdb.dbo.sp_send_dbmail
    @profile_name = ‘<>’,
    @recipients = ”,
    @blind_copy_recipients = ”,
    @query = ‘SELECT * FROM <databasename>..’,
    –or possibly @execute_query_database = ‘databasename’,
    @subject = ‘subject’,
    –@attach_query_result_as_file = 1 ,
    @body = @MyBody;

   PRINT ‘message’
  END
 ELSE
  PRINT ‘nothing in audit’

END TRY
BEGIN CATCH
 SELECT ERROR_NUMBER() ErrorNumber, ERROR_MESSAGE() [Message]
 PRINT ‘FAILED’
END CATCH