Showing posts with label extended. Show all posts
Showing posts with label extended. Show all posts

Tuesday, March 27, 2012

Error executing extended stored procedure: Invalid Parameter

When I try to connect to sql server instance I received this error:
TITLE: Microsoft SQL Server Management Studio
--
An exception occurred while executing a Transact-SQL statement or batch.
(Microsoft.SqlServer.ConnectionInfo)
--
ADDITIONAL INFORMATION:
Error executing extended stored procedure: Invalid Parameter
Error executing extended stored procedure: Invalid Parameter (Microsoft SQL
Server, Error: 22001)
when i click refresh button i am able to see my schema, but i can't see the
properties of my base and any table properties. I receive error:
TITLE: Microsoft SQL Server Management Studio
--
Cannot show requested dialog.
--
ADDITIONAL INFORMATION:
Cannot show requested dialog. (SqlMgmt)
--
An exception occurred while executing a Transact-SQL statement or batch.
(Microsoft.SqlServer.ConnectionInfo)
--
Error executing extended stored procedure: Invalid Parameter
Error executing extended stored procedure: Invalid Parameter (Microsoft SQL
Server, Error: 22001)
--
BUTTONS:
OK
--
also the registry key
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names is
locked and can not be opened.
After a reboot the key is now readable and the 2005 instance can be
connected to without these messages.
But after a while it does it again.
does anyone have any idea what is going wrong?Hi
My guess is that you have some group policy or Anti-virus/ISD system that is
locking down this registry key.
John
"nikolakg" wrote:
> When I try to connect to sql server instance I received this error:
> TITLE: Microsoft SQL Server Management Studio
> --
> An exception occurred while executing a Transact-SQL statement or batch.
> (Microsoft.SqlServer.ConnectionInfo)
> --
> ADDITIONAL INFORMATION:
> Error executing extended stored procedure: Invalid Parameter
> Error executing extended stored procedure: Invalid Parameter (Microsoft SQL
> Server, Error: 22001)
>
> when i click refresh button i am able to see my schema, but i can't see the
> properties of my base and any table properties. I receive error:
> TITLE: Microsoft SQL Server Management Studio
> --
> Cannot show requested dialog.
> --
> ADDITIONAL INFORMATION:
> Cannot show requested dialog. (SqlMgmt)
> --
> An exception occurred while executing a Transact-SQL statement or batch.
> (Microsoft.SqlServer.ConnectionInfo)
> --
> Error executing extended stored procedure: Invalid Parameter
> Error executing extended stored procedure: Invalid Parameter (Microsoft SQL
> Server, Error: 22001)
>
> --
> BUTTONS:
> OK
> --
>
> also the registry key
> HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names is
> locked and can not be opened.
> After a reboot the key is now readable and the 2005 instance can be
> connected to without these messages.
> But after a while it does it again.
> does anyone have any idea what is going wrong?

ERROR EXECUTING EXTENDED STORED PROCEDURE Specified user can not login

Hello All,
I'm wrote a program that uses the extended stored procedure XP_CMDSHELL .
The user is not an admin and I'm not sure how to set up a Proxy account.
I'm getting the following error when I try to add the user into the
Non-SysAdmin job step proxy account.
ERROR EXECUTING EXTENDED STORED PROCEDURE Specified user can not login
I gave the users domain rights to the master database on the server and then
gave permission to use the XP_CMDSHELL procedure.
My knowledge on permissions in SQL SERVER 2000 is hazy and I would like to
know what steps I have to take to add a non-admin user to be able to use the
XP_CMDSHELL procedure. Do I have to set anything outside of SQL SERVER
2000?...
Any help will be greatly appreciated.
Thanks,
Matt
If the user invoking xp_cmdshell is not a member of the sysadmin role, the
proxy account will be used.
The proxy account is setup using the dialog on the SQL Agent property page
in SQL Enterprise Manager (Job System tab) or using the extend stored
procedure xp_sqlagent_proxy_account, see
http://msdn.microsoft.com/library/de...aa-sz_8sdm.asp
See http://www.databasejournal.com/featu...le.php/3372131 for
more background.
GertD@.SQLDev.Net
Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.
Copyright SQLDev.Net 1991-2005 All rights reserved.
"Matthew Beirn" <mbeirn@.ssimed.com> wrote in message
news:u7EruuMTFHA.3336@.TK2MSFTNGP10.phx.gbl...
> Hello All,
> I'm wrote a program that uses the extended stored procedure XP_CMDSHELL .
> The user is not an admin and I'm not sure how to set up a Proxy account.
> I'm getting the following error when I try to add the user into the
> Non-SysAdmin job step proxy account.
> ERROR EXECUTING EXTENDED STORED PROCEDURE Specified user can not login
> I gave the users domain rights to the master database on the server and
> then gave permission to use the XP_CMDSHELL procedure.
> My knowledge on permissions in SQL SERVER 2000 is hazy and I would like to
> know what steps I have to take to add a non-admin user to be able to use
> the XP_CMDSHELL procedure. Do I have to set anything outside of SQL
> SERVER 2000?...
> Any help will be greatly appreciated.
> Thanks,
> Matt
>

ERROR EXECUTING EXTENDED STORED PROCEDURE Specified user can not login

Hello All,
I'm wrote a program that uses the extended stored procedure XP_CMDSHELL .
The user is not an admin and I'm not sure how to set up a Proxy account.
I'm getting the following error when I try to add the user into the
Non-SysAdmin job step proxy account.
ERROR EXECUTING EXTENDED STORED PROCEDURE Specified user can not login
I gave the users domain rights to the master database on the server and then
gave permission to use the XP_CMDSHELL procedure.
My knowledge on permissions in SQL SERVER 2000 is hazy and I would like to
know what steps I have to take to add a non-admin user to be able to use the
XP_CMDSHELL procedure. Do I have to set anything outside of SQL SERVER
2000?...
Any help will be greatly appreciated.
Thanks,
MattIf the user invoking xp_cmdshell is not a member of the sysadmin role, the
proxy account will be used.
The proxy account is setup using the dialog on the SQL Agent property page
in SQL Enterprise Manager (Job System tab) or using the extend stored
procedure xp_sqlagent_proxy_account, see
sz_8sdm.asp" target="_blank">http://msdn.microsoft.com/library/d.../>
sz_8sdm.asp
See http://www.databasejournal.com/feat...cle.php/3372131 for
more background.
GertD@.SQLDev.Net
Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.
Copyright SQLDev.Net 1991-2005 All rights reserved.
"Matthew Beirn" <mbeirn@.ssimed.com> wrote in message
news:u7EruuMTFHA.3336@.TK2MSFTNGP10.phx.gbl...
> Hello All,
> I'm wrote a program that uses the extended stored procedure XP_CMDSHELL .
> The user is not an admin and I'm not sure how to set up a Proxy account.
> I'm getting the following error when I try to add the user into the
> Non-SysAdmin job step proxy account.
> ERROR EXECUTING EXTENDED STORED PROCEDURE Specified user can not login
> I gave the users domain rights to the master database on the server and
> then gave permission to use the XP_CMDSHELL procedure.
> My knowledge on permissions in SQL SERVER 2000 is hazy and I would like to
> know what steps I have to take to add a non-admin user to be able to use
> the XP_CMDSHELL procedure. Do I have to set anything outside of SQL
> SERVER 2000?...
> Any help will be greatly appreciated.
> Thanks,
> Matt
>

ERROR EXECUTING EXTENDED STORED PROCEDURE Specified user can not login

Hello All,
I'm wrote a program that uses the extended stored procedure XP_CMDSHELL .
The user is not an admin and I'm not sure how to set up a Proxy account.
I'm getting the following error when I try to add the user into the
Non-SysAdmin job step proxy account.
ERROR EXECUTING EXTENDED STORED PROCEDURE Specified user can not login
I gave the users domain rights to the master database on the server and then
gave permission to use the XP_CMDSHELL procedure.
My knowledge on permissions in SQL SERVER 2000 is hazy and I would like to
know what steps I have to take to add a non-admin user to be able to use the
XP_CMDSHELL procedure. Do I have to set anything outside of SQL SERVER
2000?...
Any help will be greatly appreciated.
Thanks,
MattIf the user invoking xp_cmdshell is not a member of the sysadmin role, the
proxy account will be used.
The proxy account is setup using the dialog on the SQL Agent property page
in SQL Enterprise Manager (Job System tab) or using the extend stored
procedure xp_sqlagent_proxy_account, see
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_xp_aa-sz_8sdm.asp
See http://www.databasejournal.com/features/mssql/article.php/3372131 for
more background.
GertD@.SQLDev.Net
Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.
Copyright © SQLDev.Net 1991-2005 All rights reserved.
"Matthew Beirn" <mbeirn@.ssimed.com> wrote in message
news:u7EruuMTFHA.3336@.TK2MSFTNGP10.phx.gbl...
> Hello All,
> I'm wrote a program that uses the extended stored procedure XP_CMDSHELL .
> The user is not an admin and I'm not sure how to set up a Proxy account.
> I'm getting the following error when I try to add the user into the
> Non-SysAdmin job step proxy account.
> ERROR EXECUTING EXTENDED STORED PROCEDURE Specified user can not login
> I gave the users domain rights to the master database on the server and
> then gave permission to use the XP_CMDSHELL procedure.
> My knowledge on permissions in SQL SERVER 2000 is hazy and I would like to
> know what steps I have to take to add a non-admin user to be able to use
> the XP_CMDSHELL procedure. Do I have to set anything outside of SQL
> SERVER 2000?...
> Any help will be greatly appreciated.
> Thanks,
> Matt
>sql

Friday, February 24, 2012

Error catch in SQL

Hi everyone, I am using an SQL extended stored procedure to send emails in a
DTS package using a cursor that goes through each row in a table.

Email sending code below
======================
exec master.dbo.xp_smtp_sendmail
@.FROM = @.sFrom,
@.FROM_NAME = @.sFrom,
@.TO = @.sRecepients,
@.subject = @.sSubject,
@.message = @.sBody,
@.type = N'text/html',
@.codepage = 0,
@.server =N'MYMAILSERVER'
======================
Fetch Next From EmailCursor ...

Now the problem I have is that if an individual email address in invalid
then an error occurs and the whole DTS package falls over. What I would like
to be able to do is "catch the error", something like this (C# code used as
example)

try
{
exec master.dbo.xp_smtp_sendmail
@.FROM = @.sFrom,
@.FROM_NAME = @.sFrom,
@.TO = @.sRecepients,
@.subject = @.sSubject,
@.message = @.sBody,
@.type = N'text/html',
@.codepage = 0,
@.server =N'MYMAILSERVER'
} catch {
exec master.dbo.xp_smtp_sendmail
@.FROM = "arealaddress@.mybusiness.com",
@.FROM_NAME = @.sFrom,
@.TO = @.sRecepients,
@.subject = @.sSubject,
@.message = @.sBody,
@.type = N'text/html',
@.codepage = 0,
@.server =N'MYMAILSERVER'
}

Is this possible? Normally I would do all the email validation before the
email is entered into the database but unfortunately, I do not have access
to the application code so I am stuck doing it this way.

Thanks in advance
MarkMark (markjones@.n0Sp8mTAIRAWHITIdotAC.NZ) writes:
> Now the problem I have is that if an individual email address in invalid
> then an error occurs and the whole DTS package falls over. What I would
> like to be able to do is "catch the error", something like this (C# code
> used as example)

In T-SQL there is no way to suppress the error. (In SQL2000, that is. The
coming version SQL2005 has the TRY CATCH you are looking for.

Presumably you should be able to have the DTS package to swallow the
error, but I don't know DTS so I can't give any details. The nice and
friendly people in microsoft.public.sqlserver.dts may have some ideas.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||Thanks Erland
Regards
Mark
"Erland Sommarskog" <esquel@.sommarskog.se> wrote in message
news:Xns9554F1DAF21E5Yazorman@.127.0.0.1...
> Mark (markjones@.n0Sp8mTAIRAWHITIdotAC.NZ) writes:
> > Now the problem I have is that if an individual email address in invalid
> > then an error occurs and the whole DTS package falls over. What I would
> > like to be able to do is "catch the error", something like this (C# code
> > used as example)
> In T-SQL there is no way to suppress the error. (In SQL2000, that is. The
> coming version SQL2005 has the TRY CATCH you are looking for.
> Presumably you should be able to have the DTS package to swallow the
> error, but I don't know DTS so I can't give any details. The nice and
> friendly people in microsoft.public.sqlserver.dts may have some ideas.
>
> --
> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
> Books Online for SQL Server SP3 at
> http://www.microsoft.com/sql/techin.../2000/books.asp