Showing posts with label iam. Show all posts
Showing posts with label iam. Show all posts

Thursday, March 29, 2012

Getting the OUT parameter of stored proc in .cmd file.

Hi,
Iam new to BCP and .cmd commands in sqlserver. I want to know how to access
the output parameter of stored proc in .cmd command. Based on the value i
need to terminate the program. Below are the details.
In the .cmd file we use the below syntax for truncating a table.
isql -E -S%1 -d%2 -Q"truncate table tb_mast"
Right now this needs to be replaced by calling a stored procedure by passing
the table name and get the return value to check sucess/failure through the
output parameter. If any error the program (.cmd) should terminate.
Store procedure is ready and it is working fine. Procedure will be like
sp_truncate_table (paramerer1 IN, parameter2 OUTPUT). If successful
parameter2 will be set as 0, else 1.
How do I call the procedure in the .cmd file and check the success/failure b
y
getting the output parameter?
Please help me in this regard. Hope my explanation is clear.
Thanks in advance.
Vivek.
rHi,
May not be possible directly. Why do you want to have a command file to do
this?
You could truncate table inside the stored procedure by implementing a
condition right.If there is any technical difficulty please write back.
Thanks
Hari
SQL Server MVP
"rvivek2000" wrote:

> Hi,
> Iam new to BCP and .cmd commands in sqlserver. I want to know how to acces
s
> the output parameter of stored proc in .cmd command. Based on the value i
> need to terminate the program. Below are the details.
> In the .cmd file we use the below syntax for truncating a table.
> isql -E -S%1 -d%2 -Q"truncate table tb_mast"
> Right now this needs to be replaced by calling a stored procedure by passi
ng
> the table name and get the return value to check sucess/failure through th
e
> output parameter. If any error the program (.cmd) should terminate.
> Store procedure is ready and it is working fine. Procedure will be like
> sp_truncate_table (paramerer1 IN, parameter2 OUTPUT). If successful
> parameter2 will be set as 0, else 1.
> How do I call the procedure in the .cmd file and check the success/failure
by
> getting the output parameter?
> Please help me in this regard. Hope my explanation is clear.
> Thanks in advance.
> Vivek.
> --
> r
>|||rvivek2000 wrote:
> Hi,
> Iam new to BCP and .cmd commands in sqlserver. I want to know how to acces
s
> the output parameter of stored proc in .cmd command. Based on the value i
> need to terminate the program. Below are the details.
> In the .cmd file we use the below syntax for truncating a table.
> isql -E -S%1 -d%2 -Q"truncate table tb_mast"
> Right now this needs to be replaced by calling a stored procedure by passi
ng
> the table name and get the return value to check sucess/failure through th
e
> output parameter. If any error the program (.cmd) should terminate.
> Store procedure is ready and it is working fine. Procedure will be like
> sp_truncate_table (paramerer1 IN, parameter2 OUTPUT). If successful
> parameter2 will be set as 0, else 1.
> How do I call the procedure in the .cmd file and check the success/failure
by
> getting the output parameter?
> Please help me in this regard. Hope my explanation is clear.
> Thanks in advance.
> Vivek.
>
Have a look at the EXIT command that can be used with isql. You can use
it to set the ERRORLEVEL based the results of a query.
Tracy McKibben
MCDBA
http://www.realsqlguy.com

Getting the OUT parameter of stored proc in .cmd file.

Hi,
Iam new to BCP and .cmd commands in sqlserver. I want to know how to access
the output parameter of stored proc in .cmd command. Based on the value i
need to terminate the program. Below are the details.
In the .cmd file we use the below syntax for truncating a table.
isql -E -S%1 -d%2 -Q"truncate table tb_mast"
Right now this needs to be replaced by calling a stored procedure by passing
the table name and get the return value to check sucess/failure through the
output parameter. If any error the program (.cmd) should terminate.
Store procedure is ready and it is working fine. Procedure will be like
sp_truncate_table (paramerer1 IN, parameter2 OUTPUT). If successful
parameter2 will be set as 0, else 1.
How do I call the procedure in the .cmd file and check the success/failure by
getting the output parameter?
Please help me in this regard. Hope my explanation is clear.
Thanks in advance.
Vivek.
--
rHi,
May not be possible directly. Why do you want to have a command file to do
this?
You could truncate table inside the stored procedure by implementing a
condition right.If there is any technical difficulty please write back.
Thanks
Hari
SQL Server MVP
"rvivek2000" wrote:
> Hi,
> Iam new to BCP and .cmd commands in sqlserver. I want to know how to access
> the output parameter of stored proc in .cmd command. Based on the value i
> need to terminate the program. Below are the details.
> In the .cmd file we use the below syntax for truncating a table.
> isql -E -S%1 -d%2 -Q"truncate table tb_mast"
> Right now this needs to be replaced by calling a stored procedure by passing
> the table name and get the return value to check sucess/failure through the
> output parameter. If any error the program (.cmd) should terminate.
> Store procedure is ready and it is working fine. Procedure will be like
> sp_truncate_table (paramerer1 IN, parameter2 OUTPUT). If successful
> parameter2 will be set as 0, else 1.
> How do I call the procedure in the .cmd file and check the success/failure by
> getting the output parameter?
> Please help me in this regard. Hope my explanation is clear.
> Thanks in advance.
> Vivek.
> --
> r
>|||rvivek2000 wrote:
> Hi,
> Iam new to BCP and .cmd commands in sqlserver. I want to know how to access
> the output parameter of stored proc in .cmd command. Based on the value i
> need to terminate the program. Below are the details.
> In the .cmd file we use the below syntax for truncating a table.
> isql -E -S%1 -d%2 -Q"truncate table tb_mast"
> Right now this needs to be replaced by calling a stored procedure by passing
> the table name and get the return value to check sucess/failure through the
> output parameter. If any error the program (.cmd) should terminate.
> Store procedure is ready and it is working fine. Procedure will be like
> sp_truncate_table (paramerer1 IN, parameter2 OUTPUT). If successful
> parameter2 will be set as 0, else 1.
> How do I call the procedure in the .cmd file and check the success/failure by
> getting the output parameter?
> Please help me in this regard. Hope my explanation is clear.
> Thanks in advance.
> Vivek.
>
Have a look at the EXIT command that can be used with isql. You can use
it to set the ERRORLEVEL based the results of a query.
Tracy McKibben
MCDBA
http://www.realsqlguy.com

Friday, March 9, 2012

getting native error 18456 Error = login failed for user(username) when using BCP

Hi ,
can any one help in exporting data to a flat file by using BCP,
iam trying to use BCP but iam getting following error
Error : native error 18456 Error = login failed for user when using
BCP
thanks well in advanceexec master..xp_cmdshell 'BCP northwind..orders OUT
c:\test1.txt -c -C850 -SServer -Usa -Ppwd'
"RPK" <praveen.rampally@.gmail.com> wrote in message
news:1143093192.808073.125810@.u72g2000cwu.googlegroups.com...
> Hi ,
> can any one help in exporting data to a flat file by using BCP,
> iam trying to use BCP but iam getting following error
> Error : native error 18456 Error = login failed for user when using
> BCP
> thanks well in advance
>

Sunday, February 19, 2012

Getting Error 1935 when trying to install SQLXML 3 SP3

I have a Windows 2003 Server SP1. I have SQL 2000 Server SP4 running on it.
I
am trying to instal SQL XML 3 SP3 on this server. But the installation abort
s
midway giving an error.I got the following in the event log.
Product: SQLXML 3.0 SP3 -- Error 1935. An error occured during the
installation of assembly component {303994BA-6487-47AE-AF1D-7AF6088EEBDB}.
HRESULT: 0x80070002. assembly interface: IAssemblyCacheItem, function:
Commit, assembly name:
Microsoft.MSXML2,publicKeyToken="6bd6b9abf345378f",version="4.20.9818.0",typ
e="win32",processorArchitecture="x86"
Please help. Thanks in advance
Rupesh NairThis may be due to another process locking MSXML4.dll. You may need to
shutdown any applications that may be using MSXML4.dll and then retry the
install.
If you are unsure which of your processes may be using MSXML4.dll, you can
use a tool like ListDlls from SysInternals to determine which process is
holding onto it.
Give this a try, and see if it works out.
Bertan ARI
This posting is provided "AS IS" with no warranties, and confers no rights.
"Rupesh" <Rupesh@.discussions.microsoft.com> wrote in message
news:3BF087C5-3655-4332-8B79-34E4B559280F@.microsoft.com...
>I have a Windows 2003 Server SP1. I have SQL 2000 Server SP4 running on it.
>I
> am trying to instal SQL XML 3 SP3 on this server. But the installation
> aborts
> midway giving an error.I got the following in the event log.
> Product: SQLXML 3.0 SP3 -- Error 1935. An error occured during the
> installation of assembly component {303994BA-6487-47AE-AF1D-7AF6088EEBDB}.
> HRESULT: 0x80070002. assembly interface: IAssemblyCacheItem, function:
> Commit, assembly name:
> Microsoft.MSXML2,publicKeyToken="6bd6b9abf345378f",version="4.20.9818.0",t
ype="win32",processorArchitecture="x86"
> Please help. Thanks in advance
> Rupesh Nair
>

Getting Error 1935 when trying to install SQLXML 3 SP3

I have a Windows 2003 Server SP1. I have SQL 2000 Server SP4 running on it. I
am trying to instal SQL XML 3 SP3 on this server. But the installation aborts
midway giving an error.I got the following in the event log.
Product: SQLXML 3.0 SP3 -- Error 1935. An error occured during the
installation of assembly component {303994BA-6487-47AE-AF1D-7AF6088EEBDB}.
HRESULT: 0x80070002. assembly interface: IAssemblyCacheItem, function:
Commit, assembly name:
Microsoft.MSXML2,publicKeyToken="6bd6b9abf345378f" ,version="4.20.9818.0",type="win32",processorArchi tecture="x86"
Please help. Thanks in advance
Rupesh Nair
This may be due to another process locking MSXML4.dll. You may need to
shutdown any applications that may be using MSXML4.dll and then retry the
install.
If you are unsure which of your processes may be using MSXML4.dll, you can
use a tool like ListDlls from SysInternals to determine which process is
holding onto it.
Give this a try, and see if it works out.
Bertan ARI
This posting is provided "AS IS" with no warranties, and confers no rights.
"Rupesh" <Rupesh@.discussions.microsoft.com> wrote in message
news:3BF087C5-3655-4332-8B79-34E4B559280F@.microsoft.com...
>I have a Windows 2003 Server SP1. I have SQL 2000 Server SP4 running on it.
>I
> am trying to instal SQL XML 3 SP3 on this server. But the installation
> aborts
> midway giving an error.I got the following in the event log.
> Product: SQLXML 3.0 SP3 -- Error 1935. An error occured during the
> installation of assembly component {303994BA-6487-47AE-AF1D-7AF6088EEBDB}.
> HRESULT: 0x80070002. assembly interface: IAssemblyCacheItem, function:
> Commit, assembly name:
> Microsoft.MSXML2,publicKeyToken="6bd6b9abf345378f" ,version="4.20.9818.0",type="win32",processorArchi tecture="x86"
> Please help. Thanks in advance
> Rupesh Nair
>

Getting error 0x80004005

Hi Everybody,

Iam a sql server developer,iam on a migration project,iam encountering an error when iam editing the control flow task.it says the sql server doesnot exist or access denied,pls can anyone help me on this.

Thanks and Regards,

sg

Just out of curiosity, are you sure that you have access to the SQL Server that you are trying to connect to? Can you connect through SQL Server Management Studio?|||

Hey i have access.thanks for ur reply.

i found out the cause of the error.

Thanks,

sg

|||What was the cause so that others may be able to solve similar issues?. Please post it here.

Thanks,
Phil|||

I didnot indicate the path for connection manager correctly.

Regards,

sg