Tuesday, March 27, 2012
Count how many times a character appeared in a string
I'm having trouble googling this problem ...
Would anyone know the easiest way to obtain the number of times a
character appeared in a given string?
Thanks
ACA WHILE loop will do the trick. Just for fun though, here's a set-based
approach that uses the good old numbers table:
SELECT TOP 100 number = IDENTITY(INT, 1, 1)
INTO #numbers
FROM syscomments a1
CROSS JOIN syscomments a2
ALTER TABLE #numbers
ADD CONSTRAINT pk_number
PRIMARY KEY CLUSTERED (number)
DECLARE @.string VARCHAR(20)
DECLARE @.letter CHAR(1)
SELECT @.string = 'THIS IS A TEST'
SELECT @.letter = 'S'
SELECT @.letter AS letter, COUNT(*) AS occurrences
FROM #numbers n
WHERE SUBSTRING(@.string, n.number, 1) = @.letter
DROP TABLE #numbers
"AC" <anchi.chen@.gmail.com> wrote in message
news:1150341230.216963.54010@.g10g2000cwb.googlegroups.com...
> Hi all,
> I'm having trouble googling this problem ...
> Would anyone know the easiest way to obtain the number of times a
> character appeared in a given string?
>
> Thanks
> AC
>|||Thanks Mike. I'll give that a try.
Thanks again.
AC|||DECLARE @.foo VARCHAR(64);
DECLARE @.c VARCHAR(1);
SET @.foo = 'How many qs are in this qqq qqq blat?';
SET @.c = 'q';
SELECT Number_Of_Qs = LEN(@.foo) - LEN(REPLACE(@.foo, @.c, ''));
"AC" <anchi.chen@.gmail.com> wrote in message
news:1150341230.216963.54010@.g10g2000cwb.googlegroups.com...
> Hi all,
> I'm having trouble googling this problem ...
> Would anyone know the easiest way to obtain the number of times a
> character appeared in a given string?
>
> Thanks
> AC
>|||This is such a smart and short solution.
Thanks Aaron
Aaron Bertrand [SQL Server MVP] wrote:
> DECLARE @.foo VARCHAR(64);
> DECLARE @.c VARCHAR(1);
> SET @.foo = 'How many qs are in this qqq qqq blat?';
> SET @.c = 'q';
> SELECT Number_Of_Qs = LEN(@.foo) - LEN(REPLACE(@.foo, @.c, ''));
>
>
Monday, March 19, 2012
could not obtain information about...
date and installing, among others SP4 for win2k.
"SQL Server Scheduled Job 'DB Backup Job for DB Maintenance Plan 'Michaels B
ackup Plan'' (0x8E4169EC6E0A93468357CC016A8A9186) - Status: Failed - Invoked
on: 2004-01-19 02:00:00 - Message: The job failed. Unable to determine if
the owner (MYSERVER\mylogin) of job DB Backup Job for DB Maintenance Plan 'M
ichaels Backup Plan' has server access (reason: Could not obtain information
about Windows NT group/user 'MYSERVER\mylogin'. [SQLSTATE 42000] (Error 819
8))."
the only thing that changed was the updates, which can be significant but I
certainly didn't change anything related to my account. I have recreated th
e plan with the same result.
I can open the LOGON section of SQLadmin and see my name there, I can open i
t and close it but if I try to make any changes it says messages similar to
the above on.
KB articles suggested ading the everyone group to the pre2000 users group bu
t that sounds dangerous.
Help? what else can I look at. I am the sysop and should have all the necess
ary rightsIn message <eoafD3t3DHA.2556@.TK2MSFTNGP10.phx.gbl>, mmac <no@.thanks.com>
writes
quote:
>I am getting the following message in my event logs since hitting windows
>update_and installing, among others _SP4 for win2k.
>"SQL Server Scheduled Job 'DB Backup Job for DB Maintenance Plan
>'Michaels Backup Plan'' (0x8E4169EC6E0A93468357CC016A8A9186) -
>Status: Failed - Invoked on: 2004-01-19 02:00:00 - Message: The job
>failed._ Unable to determine if the owner (MYSERVER\mylogin) of job DB
>Backup Job for DB Maintenance Plan 'Michaels Backup Plan' has server
>access (reason: Could not obtain information about Windows NT
>group/user 'MYSERVER\mylogin'. [SQLSTATE 42000] (Error 8198))."
>the only thing that changed was the updates, which can be significant but
>_I certainly didn't change anything related to my account. I have recreated
>the plan with the same result.
>I can open the LOGON section of SQLadmin and see my name there, I
>can open it and close it but if I try to make any changes it says messages
>similar to the above on.
>KB articles suggested ading the everyone group to the pre2000 users
>group but that sounds dangerous.
>Help? what else can I look at. I am the sysop and should have all the
>necessary rights
I assume you have seen KB 241643, but have you tried the first
workaround "Change the job owner to a standard SQL Server user or system
administrator (sa)."? I have read this many times, and the second option
has never worked for me, so I go straight for option 1. I suspect there
may be other causes, perhaps network issues between SQL and the DC.
PRB: 8198 Error Message Returned from Job Owned by Windows NT
Authenticated User
http://support.microsoft.com?kbid=241643
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com
PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org|||"Darren Green" <darren.green@.reply-to-newsgroup-sqldts.com> wrote in message
news:7r2qD3R8WFEAFwOw@.sqldts.com...
quote:|||Lets try that again.
> In message <eoafD3t3DHA.2556@.TK2MSFTNGP10.phx.gbl>, mmac <no@.thanks.com>
> writes
recreated[QUOTE]
messages[QUOTE]
> I assume you have seen KB 241643, but have you tried the first
> workaround "Change the job owner to a standard SQL Server user or system
> administrator (sa)."? I have read this many times, and the second option
> has never worked for me, so I go straight for option 1. I suspect there
> may be other causes, perhaps network issues between SQL and the DC.
> PRB: 8198 Error Message Returned from Job Owned by Windows NT
> Authenticated User
> http://support.microsoft.com?kbid=241643
>
> --
> Darren Green (SQL Server MVP)
> DTS - http://www.sqldts.com
> PASS - the definitive, global community for SQL Server professionals
> http://www.sqlpass.org
>
I saw the KB article and I couldn't make option 2 work either so that is
encouraging :-?
The DC and the SQL server are the same machine so comms shouldn't be an
issue.
I'll try creating a new backup plan under sa but could you tell me what a
"Standard Sql Server User " is?
"Darren Green" <darren.green@.reply-to-newsgroup-sqldts.com> wrote in message
news:7r2qD3R8WFEAFwOw@.sqldts.com...
quote:|||In message <u1fxN$d4DHA.2612@.tk2msftngp13.phx.gbl>, mmac <no@.thanks.com>
> In message <eoafD3t3DHA.2556@.TK2MSFTNGP10.phx.gbl>, mmac <no@.thanks.com>
> writes
recreated[QUOTE]
messages[QUOTE]
> I assume you have seen KB 241643, but have you tried the first
> workaround "Change the job owner to a standard SQL Server user or system
> administrator (sa)."? I have read this many times, and the second option
> has never worked for me, so I go straight for option 1. I suspect there
> may be other causes, perhaps network issues between SQL and the DC.
> PRB: 8198 Error Message Returned from Job Owned by Windows NT
> Authenticated User
> http://support.microsoft.com?kbid=241643
>
> --
> Darren Green (SQL Server MVP)
> DTS - http://www.sqldts.com
> PASS - the definitive, global community for SQL Server professionals
> http://www.sqlpass.org
>
writes
quote:
>Lets try that again.
>I saw the KB article and I couldn't make option 2 work either so that is
>encouraging :-?
>The DC and the SQL server are the same machine so comms shouldn't be an
>issue.
>I'll try creating a new backup plan under sa but could you tell me what a
>"Standard Sql Server User " is?
>
A standard SQL Server user, or SQL (Server) login, is what you use as
opposed to and integrated or NT authentication login. This option is
only available if the server is set to Mixed Mode security.
sa is a SQL login, but BUILTIN\Administrators is a integrated login.
Make sense?
Darren
quote:
>"Darren Green" <darren.green@.reply-to-newsgroup-sqldts.com> wrote in messag
e
>news:7r2qD3R8WFEAFwOw@.sqldts.com...
>recreated
>messages
>
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com
PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org
could not obtain information about...
--=_NextPart_000_000A_01C3DE9A.B4361940
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
I am getting the following message in my event logs since hitting = windows update and installing, among others SP4 for win2k.
"SQL Server Scheduled Job 'DB Backup Job for DB Maintenance Plan = 'Michaels Backup Plan'' (0x8E4169EC6E0A93468357CC016A8A9186) - Status: = Failed - Invoked on: 2004-01-19 02:00:00 - Message: The job failed. = Unable to determine if the owner (MYSERVER\mylogin) of job DB Backup Job = for DB Maintenance Plan 'Michaels Backup Plan' has server access = (reason: Could not obtain information about Windows NT group/user = 'MYSERVER\mylogin'. [SQLSTATE 42000] (Error 8198))."
the only thing that changed was the updates, which can be significant = but I certainly didn't change anything related to my account. I have = recreated the plan with the same result.
I can open the LOGON section of SQLadmin and see my name there, I can = open it and close it but if I try to make any changes it says messages = similar to the above on.
KB articles suggested ading the everyone group to the pre2000 users = group but that sounds dangerous.
Help? what else can I look at. I am the sysop and should have all the = necessary rights
--=_NextPart_000_000A_01C3DE9A.B4361940
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&
I am getting the following message in my = event logs since hitting windows update and installing, among others SP4 = for win2k.
"SQL Server Scheduled Job 'DB Backup Job = for DB Maintenance Plan 'Michaels Backup Plan'' = (0x8E4169EC6E0A93468357CC016A8A9186) - Status: Failed - Invoked on: 2004-01-19 02:00:00 - Message: The job failed. Unable to determine if the owner (MYSERVER\mylogin) of job = DB Backup Job for DB Maintenance Plan 'Michaels Backup Plan' has server = access (reason: Could not obtain information about Windows NT group/user 'MYSERVER\mylogin'. [SQLSTATE 42000] (Error 8198))."
the only thing that changed was the = updates, which can be significant but I certainly didn't change anything related = to my account. I have recreated the plan with the same result.
I can open the LOGON section of SQLadmin = and see my name there, I can open it and close it but if I try to make any changes = it says messages similar to the above on.
KB articles suggested ading the everyone = group to the pre2000 users group but that sounds dangerous.
Help? what else can I look at. I am the = sysop and should have all the necessary rights
--=_NextPart_000_000A_01C3DE9A.B4361940--In message <eoafD3t3DHA.2556@.TK2MSFTNGP10.phx.gbl>, mmac <no@.thanks.com>
writes
>I am getting the following message in my event logs since hitting windows
>update and installing, among others SP4 for win2k.
>"SQL Server Scheduled Job 'DB Backup Job for DB Maintenance Plan
>'Michaels Backup Plan'' (0x8E4169EC6E0A93468357CC016A8A9186) -
>Status: Failed - Invoked on: 2004-01-19 02:00:00 - Message: The job
>failed. Unable to determine if the owner (MYSERVER\mylogin) of job DB
>Backup Job for DB Maintenance Plan 'Michaels Backup Plan' has server
>access (reason: Could not obtain information about Windows NT
>group/user 'MYSERVER\mylogin'. [SQLSTATE 42000] (Error 8198))."
>the only thing that changed was the updates, which can be significant but
> I certainly didn't change anything related to my account. I have recreated
>the plan with the same result.
>I can open the LOGON section of SQLadmin and see my name there, I
>can open it and close it but if I try to make any changes it says messages
>similar to the above on.
>KB articles suggested ading the everyone group to the pre2000 users
>group but that sounds dangerous.
>Help? what else can I look at. I am the sysop and should have all the
>necessary rights
I assume you have seen KB 241643, but have you tried the first
workaround "Change the job owner to a standard SQL Server user or system
administrator (sa)."? I have read this many times, and the second option
has never worked for me, so I go straight for option 1. I suspect there
may be other causes, perhaps network issues between SQL and the DC.
PRB: 8198 Error Message Returned from Job Owned by Windows NT
Authenticated User
http://support.microsoft.com?kbid=241643
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com
PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org|||"Darren Green" <darren.green@.reply-to-newsgroup-sqldts.com> wrote in message
news:7r2qD3R8WFEAFwOw@.sqldts.com...
> In message <eoafD3t3DHA.2556@.TK2MSFTNGP10.phx.gbl>, mmac <no@.thanks.com>
> writes
> >
> >I am getting the following message in my event logs since hitting windows
> >update and installing, among others SP4 for win2k.
> >
> >"SQL Server Scheduled Job 'DB Backup Job for DB Maintenance Plan
> >'Michaels Backup Plan'' (0x8E4169EC6E0A93468357CC016A8A9186) -
> >Status: Failed - Invoked on: 2004-01-19 02:00:00 - Message: The job
> >failed. Unable to determine if the owner (MYSERVER\mylogin) of job DB
> >Backup Job for DB Maintenance Plan 'Michaels Backup Plan' has server
> >access (reason: Could not obtain information about Windows NT
> >group/user 'MYSERVER\mylogin'. [SQLSTATE 42000] (Error 8198))."
> >
> >the only thing that changed was the updates, which can be significant but
> > I certainly didn't change anything related to my account. I have
recreated
> >the plan with the same result.
> >
> >I can open the LOGON section of SQLadmin and see my name there, I
> >can open it and close it but if I try to make any changes it says
messages
> >similar to the above on.
> >
> >KB articles suggested ading the everyone group to the pre2000 users
> >group but that sounds dangerous.
> >
> >Help? what else can I look at. I am the sysop and should have all the
> >necessary rights
> I assume you have seen KB 241643, but have you tried the first
> workaround "Change the job owner to a standard SQL Server user or system
> administrator (sa)."? I have read this many times, and the second option
> has never worked for me, so I go straight for option 1. I suspect there
> may be other causes, perhaps network issues between SQL and the DC.
> PRB: 8198 Error Message Returned from Job Owned by Windows NT
> Authenticated User
> http://support.microsoft.com?kbid=241643
>
> --
> Darren Green (SQL Server MVP)
> DTS - http://www.sqldts.com
> PASS - the definitive, global community for SQL Server professionals
> http://www.sqlpass.org
>|||Lets try that again.
I saw the KB article and I couldn't make option 2 work either so that is
encouraging :-?
The DC and the SQL server are the same machine so comms shouldn't be an
issue.
I'll try creating a new backup plan under sa but could you tell me what a
"Standard Sql Server User " is?
"Darren Green" <darren.green@.reply-to-newsgroup-sqldts.com> wrote in message
news:7r2qD3R8WFEAFwOw@.sqldts.com...
> In message <eoafD3t3DHA.2556@.TK2MSFTNGP10.phx.gbl>, mmac <no@.thanks.com>
> writes
> >
> >I am getting the following message in my event logs since hitting windows
> >update and installing, among others SP4 for win2k.
> >
> >"SQL Server Scheduled Job 'DB Backup Job for DB Maintenance Plan
> >'Michaels Backup Plan'' (0x8E4169EC6E0A93468357CC016A8A9186) -
> >Status: Failed - Invoked on: 2004-01-19 02:00:00 - Message: The job
> >failed. Unable to determine if the owner (MYSERVER\mylogin) of job DB
> >Backup Job for DB Maintenance Plan 'Michaels Backup Plan' has server
> >access (reason: Could not obtain information about Windows NT
> >group/user 'MYSERVER\mylogin'. [SQLSTATE 42000] (Error 8198))."
> >
> >the only thing that changed was the updates, which can be significant but
> > I certainly didn't change anything related to my account. I have
recreated
> >the plan with the same result.
> >
> >I can open the LOGON section of SQLadmin and see my name there, I
> >can open it and close it but if I try to make any changes it says
messages
> >similar to the above on.
> >
> >KB articles suggested ading the everyone group to the pre2000 users
> >group but that sounds dangerous.
> >
> >Help? what else can I look at. I am the sysop and should have all the
> >necessary rights
> I assume you have seen KB 241643, but have you tried the first
> workaround "Change the job owner to a standard SQL Server user or system
> administrator (sa)."? I have read this many times, and the second option
> has never worked for me, so I go straight for option 1. I suspect there
> may be other causes, perhaps network issues between SQL and the DC.
> PRB: 8198 Error Message Returned from Job Owned by Windows NT
> Authenticated User
> http://support.microsoft.com?kbid=241643
>
> --
> Darren Green (SQL Server MVP)
> DTS - http://www.sqldts.com
> PASS - the definitive, global community for SQL Server professionals
> http://www.sqlpass.org
>|||In message <u1fxN$d4DHA.2612@.tk2msftngp13.phx.gbl>, mmac <no@.thanks.com>
writes
>Lets try that again.
>I saw the KB article and I couldn't make option 2 work either so that is
>encouraging :-?
>The DC and the SQL server are the same machine so comms shouldn't be an
>issue.
>I'll try creating a new backup plan under sa but could you tell me what a
>"Standard Sql Server User " is?
>
A standard SQL Server user, or SQL (Server) login, is what you use as
opposed to and integrated or NT authentication login. This option is
only available if the server is set to Mixed Mode security.
sa is a SQL login, but BUILTIN\Administrators is a integrated login.
Make sense?
Darren
>"Darren Green" <darren.green@.reply-to-newsgroup-sqldts.com> wrote in message
>news:7r2qD3R8WFEAFwOw@.sqldts.com...
>> In message <eoafD3t3DHA.2556@.TK2MSFTNGP10.phx.gbl>, mmac <no@.thanks.com>
>> writes
>> >
>> >I am getting the following message in my event logs since hitting windows
>> >update and installing, among others SP4 for win2k.
>> >
>> >"SQL Server Scheduled Job 'DB Backup Job for DB Maintenance Plan
>> >'Michaels Backup Plan'' (0x8E4169EC6E0A93468357CC016A8A9186) -
>> >Status: Failed - Invoked on: 2004-01-19 02:00:00 - Message: The job
>> >failed. Unable to determine if the owner (MYSERVER\mylogin) of job DB
>> >Backup Job for DB Maintenance Plan 'Michaels Backup Plan' has server
>> >access (reason: Could not obtain information about Windows NT
>> >group/user 'MYSERVER\mylogin'. [SQLSTATE 42000] (Error 8198))."
>> >
>> >the only thing that changed was the updates, which can be significant but
>> > I certainly didn't change anything related to my account. I have
>recreated
>> >the plan with the same result.
>> >
>> >I can open the LOGON section of SQLadmin and see my name there, I
>> >can open it and close it but if I try to make any changes it says
>messages
>> >similar to the above on.
>> >
>> >KB articles suggested ading the everyone group to the pre2000 users
>> >group but that sounds dangerous.
>> >
>> >Help? what else can I look at. I am the sysop and should have all the
>> >necessary rights
>> I assume you have seen KB 241643, but have you tried the first
>> workaround "Change the job owner to a standard SQL Server user or system
>> administrator (sa)."? I have read this many times, and the second option
>> has never worked for me, so I go straight for option 1. I suspect there
>> may be other causes, perhaps network issues between SQL and the DC.
>> PRB: 8198 Error Message Returned from Job Owned by Windows NT
>> Authenticated User
>> http://support.microsoft.com?kbid=241643
>>
>> --
>> Darren Green (SQL Server MVP)
>> DTS - http://www.sqldts.com
>> PASS - the definitive, global community for SQL Server professionals
>> http://www.sqlpass.org
>
--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com
PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org
Could not obtain information about Windows NT group/user .......error code 0x534...
== I asked this question directly to Remus and wanted to share the response to all of those people using this forum ==
We recently moved our database server from SQL Server 2000 to SQL Server 2005. All applications on our intranet development server stay the same [VS.NET 2003], but recently resources in our Dev DB server ran out of space. While doing a thorough investigation, I noticed ERRORLOG file was occupying about 35 Gig of HDD space. I immediately checked SQL Server error log and noticed an entry which says –
===========================================================================================
Date 7/7/2006 4:45:37 PM
Log SQL Server (Current - 7/7/2006 4:45:00 PM)
Source spid77s
Message
The activated proc [dbo].[SqlQueryNotificationStoredProcedure-5eaf8465-d0cb-4be7-93b6-44bb979dd41c] running on queue BW_Content.dbo.SqlQueryNotificationService-5eaf8465-d0cb-4be7-93b6-44bb979dd41c output the following: 'Could not obtain information about Windows NT group/user 'BWCINC\HoffK', error code 0x534.'
===========================================================================================
What is this SqlQueryNotificationService in my database? Is it a SQL Server 2005 thing? Why the same kind of stored procedure does not exist in other databases, but BW_Content? This error is getting repeated most probably every second and is filling up our server.
I believe our corporate IT people removed our domain accounts from BWCINC domain to BWCORP domain and probably some application which is using BWCINC\HoffK credential is getting errored out. I tried to locate this application and was not successful.
Is there anyway that I can stop this ERRORLOG from growing? How can I delete these log entries so that I can make space on our Hard Drive? Is there an easy way in SQL Server 2005 to locate which application is creating this error?
Response from Remus:
The 'SqlQueryNotificationService-...' is the service created by SqlDependency when you call SqlDependency.Start (). The problem you describe appears because the 'dbo' user of the database is mapped to the login that originally created this database. The SqlDependency created queue has an EXECUTE AS OWNER clause, owner is 'dbo' and therefore this is equivalent to an EXECUTE AS USER = 'dbo'. The error you see is reported by the domain controller when asked to give information about the original account 'dbo' mapps to (that is, BWCINC\HoffK'): Error code: (Win32) 0x534 (1332) - No mapping between account names and security IDs was done.
To solve the issue, change 'dbo' to match a correct login, using either sp_changedbowner or ALTER AUTHORIZATION ON DATABASE::[dbname] TO [somavalidlogin]
To find the databases that have this problem, run this query:
select name, suser_sname(owner_sid) from sys.databases
The databses that have the problem will show NULL on the second column.
A similar problem is described here: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=65711&SiteID=1
To remove the entries, use sp_cycle_errorlog to force a new errorlog file, then delete the huge log file.
I executed ALTER AUTHORIZATION ON DATABASE::[BW_Content] TO [sa];
I got this error in SQL Error Log once and the growth of ERRORLOG was stopped.
===============================================================
Date 7/10/2006 1:16:55 PM
Log SQL Server (Current - 7/10/2006 1:17:00 PM)
Source spid20s
Message
The query notification dialog on conversation handle '{6BDE95F7-0EFB-DA11-9064-000C2921B41B}.' closed due to the following error: '<?xml version="1.0"?><Error xmlns="http://schemas.microsoft.com/SQL/ServiceBroker/Error"><Code>-8490</Code><Description>Cannot find the remote service 'SqlQueryNotificationService-c15bb868-ed56-47d2-bf91-ce18b320989a' because it does not exist.</Description></Error>'.
===============================================================
Should I be concerned about this error?
Thanks
-Binoy
Thanks for sharing this!|||Binoy Sankar wrote:
I got this error in SQL Error Log once and the growth of ERRORLOG was stopped.
===============================================================
Date 7/10/2006 1:16:55 PM
Log SQL Server (Current - 7/10/2006 1:17:00 PM)Source spid20s
Message
The query notification dialog on conversation handle '{6BDE95F7-0EFB-DA11-9064-000C2921B41B}.' closed due to the following error: '<?xml version="1.0"?><Error xmlns="http://schemas.microsoft.com/SQL/ServiceBroker/Error"><Code>-8490</Code><Description>Cannot find the remote service 'SqlQueryNotificationService-c15bb868-ed56-47d2-bf91-ce18b320989a' because it does not exist.</Description></Error>'.===============================================================
Should I be concerned about this error?
Don't worry abouyt it. The error means that the client disconnected and the temporary service was dropped before the notification was fired.
Thanks,
~ Remus
Could not obtain information
We've just recently changed/upgraded server boxes and went from Windows 2000
Server to Windows 2003 Server with
SQLServer 2000 sp4 installed on both. The Startup Service Account settings f
or both SQLServer and SQLServer
Agent is 'System Account'. On the original machine backups worked without a
flaw, but with the new machine I
receive the following error:
<<error from SQL Agent Error log>>
[298] SQLServer Error: 8198, Could not obtain information about Windows
NT group/user 'DOMAINNAME\username'.
[SQLSTATE 42000] (ConnIsLoginSysAdmin)
When remoted into the new machine with 'DOMAINNAME\username' and doing an "e
xec xp_logininfo
'DOMAINNAME\username'" in Query Analyzer I get the same error as follows:
<<error from Query Analyzer>>
Server: Msg 8198, Level 16, State 24, Procedure xp_logininfo, Line 58
Could not obtain information about Windows NT group/user 'DOMAINNAME\usernam
e'.
I've looked at kb241643 and kb834124 and realize there is a workaround, but
this same account gets locked by AD
at least a couple of times a day when I try and use it to login to this and/
or other machines I administer (this
account is an admin account used strictly for administration purposes, I hav
e an individual account that I use
for my desktop and laptop). It seems to have began shortly after I had to ch
ange the password for this account.
I believe, the error and the lockout are related (my inexperience shows as I
do not have anything concrete to
make that assumption) so I would really like to know why this is happening a
nd how to correct it.
Thank you.
gdr
--
Gary D. Rezek
University Nerworking Systems and Services
South Dakota State UniversityHi,
Is both SQL box on same Domain ? are they have the same User Account in it ?
Have you set Password Policy for Account Lockout ?if so ,after how many
attempts it locks account ? i suspect that theirs is no such user ..
Regards
--
Andy Davis
Active Crypt Team
---SQL Server Encryption
Decryption Software
http://www.activecrypt.com
"Gary D. Rezek" wrote:
> Hi All,
> We've just recently changed/upgraded server boxes and went from Windows 20
00 Server to Windows 2003 Server with
> SQLServer 2000 sp4 installed on both. The Startup Service Account settings
for both SQLServer and SQLServer
> Agent is 'System Account'. On the original machine backups worked without
a flaw, but with the new machine I
> receive the following error:
> <<error from SQL Agent Error log>>
> [298] SQLServer Error: 8198, Could not obtain information about Window
s NT group/user 'DOMAINNAME\username'.
> [SQLSTATE 42000] (ConnIsLoginSysAdmin)
> When remoted into the new machine with 'DOMAINNAME\username' and doing an
"exec xp_logininfo
> 'DOMAINNAME\username'" in Query Analyzer I get the same error as follows:
> <<error from Query Analyzer>>
> Server: Msg 8198, Level 16, State 24, Procedure xp_logininfo, Line 58
> Could not obtain information about Windows NT group/user 'DOMAINNAME\usern
ame'.
> I've looked at kb241643 and kb834124 and realize there is a workaround, bu
t this same account gets locked by AD
> at least a couple of times a day when I try and use it to login to this an
d/or other machines I administer (this
> account is an admin account used strictly for administration purposes, I h
ave an individual account that I use
> for my desktop and laptop). It seems to have began shortly after I had to
change the password for this account.
> I believe, the error and the lockout are related (my inexperience shows as
I do not have anything concrete to
> make that assumption) so I would really like to know why this is happening
and how to correct it.
> Thank you.
> gdr
> --
> Gary D. Rezek
> university Nerworking Systems and Services
> South Dakota State University
>
>|||Hi Andy,
Yes both boxes are on the same domain and have the same user accounts in the
m. As far as I can tell the 2 boxes
are near identical with their setups. The AD guys have set a lockout policy
of 5 bad logins within 15 minutes
locks the account out for 15 minutes.
Thanks.
gdr
"Andy Davis" <activecrypt@.gmail.com> wrote in message news:873FAFB3-F604-45F4-913F-EAF6D2C0A
CA0@.microsoft.com...[vbcol=seagreen]
> Hi,
> Is both SQL box on same Domain ? are they have the same User Account in it
?
> Have you set Password Policy for Account Lockout ?if so ,after how many
> attempts it locks account ? i suspect that theirs is no such user ..
> Regards
> --
> Andy Davis
> Active Crypt Team
> ---SQL Server Encryption
> Decryption Software
> http://www.activecrypt.com
>
> "Gary D. Rezek" wrote:
>
Could not obtain a required interface error
I have created a linked server that connects to "mpp" file, and it connects and opens successfuly returning a list of tables that exists in the linked server to the mpp file.
But the problem i am facing now that whne i write a select statment to get data from the tables in this linked server
select * from linktompp.testmpp.dbo.tasks
such that linktompp is the linked server name
testmpp is the catalog name
tasks is the table name i need to select data from
it shows an error that says
"Could not obtain a required interface from OLE DB provider 'Microsoft.Project.OleDB.11.0'."
"[OLE/DB Provider 'Microsoft.Project.OleDB.11.0' IUnknown::QueryInterface returned 0x80004002: IGetDataSource]"
could anyone tell me the reason of this error
thanks
Hi my friend
I try to insert data into MSP
i can select data from MSP and show into datagrid
but now i coulde not insert data
i live in Iran,you can call to me with Email:jazayery@.gmail.com
Best Reagard
Could not obtain a required interface error
I have created a linked server that connects to "mpp" file, and it connects and opens successfuly returning a list of tables that exists in the linked server to the mpp file.
But the problem i am facing now that whne i write a select statment to get data from the tables in this linked server
select * from linktompp.testmpp.dbo.tasks
such that linktompp is the linked server name
testmpp is the catalog name
tasks is the table name i need to select data from
it shows an error that says
"Could not obtain a required interface from OLE DB provider 'Microsoft.Project.OleDB.11.0'."
"[OLE/DB Provider 'Microsoft.Project.OleDB.11.0' IUnknown::QueryInterface returned 0x80004002: IGetDataSource]"
could anyone tell me the reason of this error
thanks
Hi my friend
I try to insert data into MSP
i can select data from MSP and show into datagrid
but now i coulde not insert data
i live in Iran,you can call to me with Email:jazayery@.gmail.com
Best Reagard
Could not obtain a DataReader object from the specified data flow component.
I am getting the following exception when attempting to read from a DataReaderDestination:
System.Exception was unhandled
Message="Could not obtain a DataReader object from the specified data flow component."
Source="Microsoft.SqlServer.Dts.DtsClient"
StackTrace:
at Microsoft.SqlServer.Dts.DtsClient.DtsCommand.internalPrepare(Boolean fReaderRequired)
at Microsoft.SqlServer.Dts.DtsClient.DtsCommand.ExecuteReaderInThread()
at Microsoft.SqlServer.Dts.DtsClient.DtsCommand.ExecuteReader(CommandBehavior behavior)
at CA3DataImportTool.ViewSSISOutput.btnRun_Click(Object sender, EventArgs e) in C:\Documents and Settings\rhein\My Documents\Visual Studio 2005\Projects\CA3DataImportTool\CA3DataImportTool\ViewSSISOutput.cs:line 35
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at CA3DataImportTool.Program.Main() in C:\Documents and Settings\rhein\My Documents\Visual Studio 2005\Projects\CA3DataImportTool\CA3DataImportTool\Program.cs:line 18
at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
If I use the example from SQL Server BOL (http://msdn2.microsoft.com/en-us/library/ms135917.aspx), and make a new package for the sample in the same project, the sample works. The only thing that I can see that is significantly different between my code and the sample is that my DataReaderDestination has a lot more data in it, but here's the relevant code:
string dtexecArgs;
string dataReaderName;
DtsConnection dtsConnection;
DtsCommand dtsCommand; //IDbCommand
IDataReader dtsDataReader;
DataTable dtsTable;
dtexecArgs = @."/FILE ""C:\Documents and Settings\rhein\My Documents\Visual Studio 2005\Projects\CA3DataImportTool\ML3000_IntegrationProject\Package.dtsx"" ";
dataReaderName = "DataReaderDest";
dtsConnection = new DtsConnection();
dtsConnection.ConnectionString = dtexecArgs;
dtsConnection.Open();
dtsCommand = new DtsCommand(dtsConnection);
dtsCommand.CommandText = dataReaderName;
dtsDataReader = dtsCommand.ExecuteReader(CommandBehavior.Default); // EXCEPTION HERE
Please help!
Richard Hein
I get this when I have the worng name, check the name of your data reader destination really is DataReaderDest.|||Quadruple checked ... I tried changing the name, increasing the DtsCommand timeout to 30 seconds, and I added another Data Flow Task to the same package with a DataReaderDestination and it worked. Very strange ... I must be missing something!
|||I looked at the difference between the Data Flow Tasks, and after some tests, I found that Delay Validation = true causes this error. Changing it to false solved the problem.|||Ahh yes, that one is fun too. For completeness, the real error you get when you get the data reader name (CommandText) wrong is, "The specified data flow component was not found in the package."