Monday, March 26, 2012
Error 8198: Unable to determine if the owner has server access...
failing with messages like the following. Evidently, SQL Server is having
trouble verifying the credentials of the job owner:
The job failed. Unable to determine if the owner (<Domain>\<user> ) of job
<JobName> has server access (reason: Could not obtain information about
Windows NT group/user (<Domain>\<user> ) '. [SQLSTATE 42000] (Error 8198)
).
I see there are KB articles talking about pre-2000 compatibility, but both
the domain controller and the SQL Server machine are running Windows Server
2003. Does anyone know how to fix this?
(Yes, you can change the job owner as a workaround, but this won't keep
future jobs from being owned by Windows users unless we switch everyone over
to SQL authentication)
Thanks.Check this kb;
825042 FIX: SQL Server Jobs That Are Owned by Non-sysadmin Users May Not
Start
http://support.microsoft.com/?id=825042
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.
Sunday, February 26, 2012
error 30311: Value of type 'System.DBNull' cannot be converted to 'Date'
I'm creating an ISP for extractig data from a text file and put it in a database.
One of the fields in my textfile contains the value '0' or a date. If it's '0' it should be converted to the Null Value. The column in which it has to be saved is of type smalldatetime.
This is the code of my script where I want to check the value of the field in my textfile and convert it to a date or to Null.
Public Overrides Sub Input0_ProcessInputRow(ByVal Row As Input0Buffer)
If Row.cdDateIn = "" Or Row.cdDateIn= "0" Then
Row.cdDateInCorr = CDate(DBNull.Value)
ElseIf Row.cdDateIn_IsNull Then
Row.cdDateInCorr = CDate(DBNull.Value)
Else
Row.cdDateInCorr = CDate(Row.cdDateIn)
End If
End Sub
The error that I get is:
Validation error. Extract FinCD: Conversion of cdDateIn [753]: Eroor 30311: Value of type 'System.DBNull' cannot ben converted to 'Date'.
How do I resolve this problem ?
Why not use a derived column? Expression follows: (Typing from memory)
cdDateIn == "" || cdDateIn == "0" || ISNULL(cdDateIn) ? NULL(DT_DBTIMESTAMP) : (DT_DBTIMESTAMP)cdDateIn
|||You can just set Row.cdDateInCorr_IsNull = true.|||
JayH wrote:
You can just set Row.cdDateInCorr_IsNull = true.
Correct, though if this is all you're doing in the script component, I would stay away from that and use a derived column. There's no reason for the overhead of the script in this case.
|||I've used the code JayH suggested and this works.
Phil, your code is a bit like chinese to me. This ISP I'm working on is my first project in .NET. But I will check this derived column thing.
Thanks four your help.
|||
Phil Brammer wrote:
JayH wrote:
You can just set Row.cdDateInCorr_IsNull = true.
Correct, though if this is all you're doing in the script component, I would stay away from that and use a derived column. There's no reason for the overhead of the script in this case.
Are you sure about this - the IsNull property is for evaluation and not for assigning true or false to it - I believe that it will reset itself when you leave the script task - or am I wrong?
|||
Simon Givoni wrote:
Phil Brammer wrote:
JayH wrote:
You can just set Row.cdDateInCorr_IsNull = true. Correct, though if this is all you're doing in the script component, I would stay away from that and use a derived column. There's no reason for the overhead of the script in this case.
Are you sure about this - the IsNull property is for evaluation and not for assigning true or false to it - I believe that it will reset itself when you leave the script task - or am I wrong?
Yes, I'm sure. You can set the property to True and the null will stick. You cannot set it to False, but it will automatically become False if you set a value to the column. SP2 will raise an exception if you set it to False.
|||Ah yes you are right - here are the full explanation:
The IsNull property of columns in the Script Component now raises a warning when it is used incorrectly.
The code generated by the Script component contains a <columnname> and a <columnname>_IsNull property for each input and output column. The intention of the <columnname>_IsNull property is to allow the user to specify a Null value for the column by setting the value of the property to True. To specify a non-null value, the user should assign a value to the <columnname> property. In earlier versions, if you set <columnname>_IsNull to False, the property was silently reset to True. In SP2, the Script component raises a warning message about the incorrect usage.
Source: http://msdn2.microsoft.com/en-us/library/bb283536.aspx#BKMK_IntegrationServices
Friday, February 17, 2012
Error 21776 and dbo Problem
We recently installed a SQL 2000 version of an older
application we were running. The company took our old
Paradox data and converted it at their site and gave us a
backup to restore to a new database we created on our SQL
server.
After restoring the database, we began to get Error 15023
messages relating to the user and login that the
application uses to grant access to the database. After
some research, I used query analyzer to drop the
questionable users and logins and then re-created them
without a problem. However, we were still getting errors
when trying to connect to the database using the
application.
While troubleshooting the problem, I went to look at the
properties of the sa account and the system threw up
Error 21776-The name dbo was not found in the users
collection. If I try to add a dbo user account to the
database in question, I get Error 15023. I can't drop
and re-create the users and logins because SQL is telling
me I can't do this with a database owner. I can't use
sp_change_users_login because it involves the dbo account.
I don't know where to go from here.
Any comments or suggestions would be appreciated.
Thanks
BrennanHave you checked this article?
305711 BUG: DBO User Does Not Display in Enterprise Manager
http://support.microsoft.com/?id=305711
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.