Showing posts with label created. Show all posts
Showing posts with label created. Show all posts

Friday, March 30, 2012

Problem with BULK INSERT ASCII file into nvarchar column

Hi,

I have a problem with BULK INSERT. I created the following table:

Code Snippet

create table Test
(id char(4), name nvarchar(16), last char(1))

I am trying to bulk insert data from ASCII (not unicode) file with only two rows:

0011First name
0018Second name

Since it is a fixed length file, I am using the following format file:

Code Snippet

8.0
3
1 SQLCHAR 0 4 "" 1 ID HEBREW_CI_AS
2 SQLCHAR 0 16 "" 2 NAME HEBREW_CI_AS
3 SQLCHAR 0 0 "\r\n" 3 Last HEBREW_CI_AS

With bcp utility everything works just fine!

Code Snippet

bcp Demo.dbo.test in c:\test -T -f c:\test.fmt

But when I use BULK INSERT in the following form:

Code Snippet

BULK INSERT Test FROM 'c:\Test'
WITH
(
FORMATFILE='c:\Test.fmt',
CODEPAGE='OEM'
);

I am getting error

Server: Msg 4863, Level 16, State 1, Line 1
Bulk insert data conversion error (truncation) for row 1, column 2 (name).

Now, one interesting thing: if I change the name field from nvarchar to varchar, it is working with BULK INSERT as well.

Can anybody explain what is going on here?

I am using MS SQL 2000 and MSDE

Thanks in advance,

Eugene.

Another thing is that if I set the format file to specify row delimiter for that nvarchar field, it will also work.

Code Snippet

8.0
2
1 SQLCHAR 0 4 "" 1 ID HEBREW_CI_AS
2 SQLCHAR 0 16 "\r\n" 2 NAME HEBREW_CI_AS

But then in the real system i can't have multiple fields within the file...

|||

On SQL2005 the problem does not exist! Then it seems like a bug in SQL2000!

sql

Wednesday, March 28, 2012

problem with BCP

Dear all,
I created a BCP file from SQL Server2000 with .BCP Extension.
Now i am trying to load data in the SQL Server2005 Database table.
First was getting the error of remote connection which i solved .
Now i am getting this below error
SQLState = HY000, NativeError = 0
Error = [Microsoft][SQL Native Client]Unable to open BCP error-file
NULL
I am executing this code
exec master..xp_cmdshell ' BCP c:\Sp_who_Perocess.bcp in
epinav.dbo.Sp_who_Perocess -n -"EPI-IT-SUFIAN\SQL_DATA" -U -P'
Pls help
from
Dollerhi
there is an error in your syntex, it's complaining about your error file
u have -n -"EPI-IT-SUFIAN\SQL_DATA"
is this the location for your error / log ilfe -"EPI-IT-SUFIAN\SQL_DATA"
if so then you have to add the -e switch and add a file name as well
and u are specifying login and password with blank values '
-U -P
"doller" wrote:
> Dear all,
> I created a BCP file from SQL Server2000 with .BCP Extension.
> Now i am trying to load data in the SQL Server2005 Database table.
> First was getting the error of remote connection which i solved .
> Now i am getting this below error
> SQLState = HY000, NativeError = 0
> Error = [Microsoft][SQL Native Client]Unable to open BCP error-file
> NULL
> I am executing this code
> exec master..xp_cmdshell ' BCP c:\Sp_who_Perocess.bcp in
> epinav.dbo.Sp_who_Perocess -n -"EPI-IT-SUFIAN\SQL_DATA" -U -P'
> Pls help
> from
> Doller
>|||Hi
Assuming epinav.dbo.Sp_who_Perocess is a table or view, you should get the
command working from a command prompt and then fit that into the xp_cmdshell
call.
Try the following adding the correct loginid and password:
exec master..xp_cmdshell ' BCP "epinav.dbo.Sp_who_Perocess" in
"c:\Sp_who_Perocess.bcp" -n -S "EPI-IT-SUFIAN\SQL_DATA" -U {loginid} -P
{password}'
John
"doller" wrote:
> Dear all,
> I created a BCP file from SQL Server2000 with .BCP Extension.
> Now i am trying to load data in the SQL Server2005 Database table.
> First was getting the error of remote connection which i solved .
> Now i am getting this below error
> SQLState = HY000, NativeError = 0
> Error = [Microsoft][SQL Native Client]Unable to open BCP error-file
> NULL
> I am executing this code
> exec master..xp_cmdshell ' BCP c:\Sp_who_Perocess.bcp in
> epinav.dbo.Sp_who_Perocess -n -"EPI-IT-SUFIAN\SQL_DATA" -U -P'
> Pls help
> from
> Doller
>|||Hi
This assumed that EPI-IT-SUFIAN\SQL_DATA was the database server if not
please let us know what it is supposed to be!
You can check the format and parameters of the BCP utility in books online.
John
"John Bell" wrote:
> Hi
> Assuming epinav.dbo.Sp_who_Perocess is a table or view, you should get the
> command working from a command prompt and then fit that into the xp_cmdshell
> call.
> Try the following adding the correct loginid and password:
> exec master..xp_cmdshell ' BCP "epinav.dbo.Sp_who_Perocess" in
> "c:\Sp_who_Perocess.bcp" -n -S "EPI-IT-SUFIAN\SQL_DATA" -U {loginid} -P
> {password}'
> John
>
> "doller" wrote:
> > Dear all,
> >
> > I created a BCP file from SQL Server2000 with .BCP Extension.
> > Now i am trying to load data in the SQL Server2005 Database table.
> > First was getting the error of remote connection which i solved .
> > Now i am getting this below error
> >
> > SQLState = HY000, NativeError = 0
> > Error = [Microsoft][SQL Native Client]Unable to open BCP error-file
> > NULL
> >
> > I am executing this code
> > exec master..xp_cmdshell ' BCP c:\Sp_who_Perocess.bcp in
> > epinav.dbo.Sp_who_Perocess -n -"EPI-IT-SUFIAN\SQL_DATA" -U -P'
> >
> > Pls help
> >
> > from
> > Doller
> >
> >|||Hi all,
EPI-IT-SUFIAN is my server name and SQL_DATA is my instance name.
i resolved the connection issue but now i am getting diffrent type of
error
SQLState = HY000, NativeError = 0
Error = [Microsoft][SQL Native Client]Unable to open BCP error-file
NULL
pls help
from
doller
John Bell wrote:
> Hi
> This assumed that EPI-IT-SUFIAN\SQL_DATA was the database server if not
> please let us know what it is supposed to be!
> You can check the format and parameters of the BCP utility in books online.
> John
> "John Bell" wrote:
> > Hi
> >
> > Assuming epinav.dbo.Sp_who_Perocess is a table or view, you should get the
> > command working from a command prompt and then fit that into the xp_cmdshell
> > call.
> >
> > Try the following adding the correct loginid and password:
> >
> > exec master..xp_cmdshell ' BCP "epinav.dbo.Sp_who_Perocess" in
> > "c:\Sp_who_Perocess.bcp" -n -S "EPI-IT-SUFIAN\SQL_DATA" -U {loginid} -P
> > {password}'
> >
> > John
> >
> >
> > "doller" wrote:
> >
> > > Dear all,
> > >
> > > I created a BCP file from SQL Server2000 with .BCP Extension.
> > > Now i am trying to load data in the SQL Server2005 Database table.
> > > First was getting the error of remote connection which i solved .
> > > Now i am getting this below error
> > >
> > > SQLState = HY000, NativeError = 0
> > > Error = [Microsoft][SQL Native Client]Unable to open BCP error-file
> > > NULL
> > >
> > > I am executing this code
> > > exec master..xp_cmdshell ' BCP c:\Sp_who_Perocess.bcp in
> > > epinav.dbo.Sp_who_Perocess -n -"EPI-IT-SUFIAN\SQL_DATA" -U -P'
> > >
> > > Pls help
> > >
> > > from
> > > Doller
> > >
> > >|||hi doller,
the following line might be enough (it's been tested from DOS session)
bcp <db>.<table> in <path>.<file> -n -S<server> -U<login> -P<password>
--
current location: alicante (es)
"doller" wrote:
> Hi all,
> EPI-IT-SUFIAN is my server name and SQL_DATA is my instance name.
> i resolved the connection issue but now i am getting diffrent type of
> error
> SQLState = HY000, NativeError = 0
> Error = [Microsoft][SQL Native Client]Unable to open BCP error-file
> NULL
> pls help
> from
> doller
>
> John Bell wrote:
> > Hi
> >
> > This assumed that EPI-IT-SUFIAN\SQL_DATA was the database server if not
> > please let us know what it is supposed to be!
> >
> > You can check the format and parameters of the BCP utility in books online.
> >
> > John
> >
> > "John Bell" wrote:
> >
> > > Hi
> > >
> > > Assuming epinav.dbo.Sp_who_Perocess is a table or view, you should get the
> > > command working from a command prompt and then fit that into the xp_cmdshell
> > > call.
> > >
> > > Try the following adding the correct loginid and password:
> > >
> > > exec master..xp_cmdshell ' BCP "epinav.dbo.Sp_who_Perocess" in
> > > "c:\Sp_who_Perocess.bcp" -n -S "EPI-IT-SUFIAN\SQL_DATA" -U {loginid} -P
> > > {password}'
> > >
> > > John
> > >
> > >
> > > "doller" wrote:
> > >
> > > > Dear all,
> > > >
> > > > I created a BCP file from SQL Server2000 with .BCP Extension.
> > > > Now i am trying to load data in the SQL Server2005 Database table.
> > > > First was getting the error of remote connection which i solved .
> > > > Now i am getting this below error
> > > >
> > > > SQLState = HY000, NativeError = 0
> > > > Error = [Microsoft][SQL Native Client]Unable to open BCP error-file
> > > > NULL
> > > >
> > > > I am executing this code
> > > > exec master..xp_cmdshell ' BCP c:\Sp_who_Perocess.bcp in
> > > > epinav.dbo.Sp_who_Perocess -n -"EPI-IT-SUFIAN\SQL_DATA" -U -P'
> > > >
> > > > Pls help
> > > >
> > > > from
> > > > Doller
> > > >
> > > >
>|||Hi ,
Thanks for all ur help.
I was getting the error unable to open the BCP file because i was using
-U -P as i was working on the server means with trustedconnection so i
have to use -T in place of -U and -P
from
Doller
Enric wrote:
> hi doller,
> the following line might be enough (it's been tested from DOS session)
> bcp <db>.<table> in <path>.<file> -n -S<server> -U<login> -P<password>
> --
> current location: alicante (es)
>
> "doller" wrote:
> > Hi all,
> >
> > EPI-IT-SUFIAN is my server name and SQL_DATA is my instance name.
> >
> > i resolved the connection issue but now i am getting diffrent type of
> > error
> > SQLState = HY000, NativeError = 0
> > Error = [Microsoft][SQL Native Client]Unable to open BCP error-file
> > NULL
> >
> > pls help
> >
> > from
> > doller
> >
> >
> >
> > John Bell wrote:
> > > Hi
> > >
> > > This assumed that EPI-IT-SUFIAN\SQL_DATA was the database server if not
> > > please let us know what it is supposed to be!
> > >
> > > You can check the format and parameters of the BCP utility in books online.
> > >
> > > John
> > >
> > > "John Bell" wrote:
> > >
> > > > Hi
> > > >
> > > > Assuming epinav.dbo.Sp_who_Perocess is a table or view, you should get the
> > > > command working from a command prompt and then fit that into the xp_cmdshell
> > > > call.
> > > >
> > > > Try the following adding the correct loginid and password:
> > > >
> > > > exec master..xp_cmdshell ' BCP "epinav.dbo.Sp_who_Perocess" in
> > > > "c:\Sp_who_Perocess.bcp" -n -S "EPI-IT-SUFIAN\SQL_DATA" -U {loginid} -P
> > > > {password}'
> > > >
> > > > John
> > > >
> > > >
> > > > "doller" wrote:
> > > >
> > > > > Dear all,
> > > > >
> > > > > I created a BCP file from SQL Server2000 with .BCP Extension.
> > > > > Now i am trying to load data in the SQL Server2005 Database table.
> > > > > First was getting the error of remote connection which i solved .
> > > > > Now i am getting this below error
> > > > >
> > > > > SQLState = HY000, NativeError = 0
> > > > > Error = [Microsoft][SQL Native Client]Unable to open BCP error-file
> > > > > NULL
> > > > >
> > > > > I am executing this code
> > > > > exec master..xp_cmdshell ' BCP c:\Sp_who_Perocess.bcp in
> > > > > epinav.dbo.Sp_who_Perocess -n -"EPI-IT-SUFIAN\SQL_DATA" -U -P'
> > > > >
> > > > > Pls help
> > > > >
> > > > > from
> > > > > Doller
> > > > >
> > > > >
> >
> >

problem with BCP

Dear all,
I created a BCP file from SQL Server2000 with .BCP Extension.
Now i am trying to load data in the SQL Server2005 Database table.
First was getting the error of remote connection which i solved .
Now i am getting this below error
SQLState = HY000, NativeError = 0
Error = [Microsoft][SQL Native Client]Unable to open BCP error-file
NULL
I am executing this code
exec master..xp_cmdshell ' BCP c:\Sp_who_Perocess.bcp in
epinav.dbo.Sp_who_Perocess -n -"EPI-IT-SUFIAN\SQL_DATA" -U -P'
Pls help
from
Dollerhi
there is an error in your syntex, it's complaining about your error file
u have -n -"EPI-IT-SUFIAN\SQL_DATA"
is this the location for your error / log ilfe -"EPI-IT-SUFIAN\SQL_DATA"
if so then you have to add the -e switch and add a file name as well
and u are specifying login and password with blank values '
-U -P
"doller" wrote:

> Dear all,
> I created a BCP file from SQL Server2000 with .BCP Extension.
> Now i am trying to load data in the SQL Server2005 Database table.
> First was getting the error of remote connection which i solved .
> Now i am getting this below error
> SQLState = HY000, NativeError = 0
> Error = [Microsoft][SQL Native Client]Unable to open BCP error-fil
e
> NULL
> I am executing this code
> exec master..xp_cmdshell ' BCP c:\Sp_who_Perocess.bcp in
> epinav.dbo.Sp_who_Perocess -n -"EPI-IT-SUFIAN\SQL_DATA" -U -P'
> Pls help
> from
> Doller
>|||Hi
Assuming epinav.dbo.Sp_who_Perocess is a table or view, you should get the
command working from a command prompt and then fit that into the xp_cmdshell
call.
Try the following adding the correct loginid and password:
exec master..xp_cmdshell ' BCP "epinav.dbo.Sp_who_Perocess" in
"c:\Sp_who_Perocess.bcp" -n -S "EPI-IT-SUFIAN\SQL_DATA" -U {loginid} -P
{password}'
John
"doller" wrote:

> Dear all,
> I created a BCP file from SQL Server2000 with .BCP Extension.
> Now i am trying to load data in the SQL Server2005 Database table.
> First was getting the error of remote connection which i solved .
> Now i am getting this below error
> SQLState = HY000, NativeError = 0
> Error = [Microsoft][SQL Native Client]Unable to open BCP error-fil
e
> NULL
> I am executing this code
> exec master..xp_cmdshell ' BCP c:\Sp_who_Perocess.bcp in
> epinav.dbo.Sp_who_Perocess -n -"EPI-IT-SUFIAN\SQL_DATA" -U -P'
> Pls help
> from
> Doller
>|||Hi
This assumed that EPI-IT-SUFIAN\SQL_DATA was the database server if not
please let us know what it is supposed to be!
You can check the format and parameters of the BCP utility in books online.
John
"John Bell" wrote:
[vbcol=seagreen]
> Hi
> Assuming epinav.dbo.Sp_who_Perocess is a table or view, you should get th
e
> command working from a command prompt and then fit that into the xp_cmdshe
ll
> call.
> Try the following adding the correct loginid and password:
> exec master..xp_cmdshell ' BCP "epinav.dbo.Sp_who_Perocess" in
> "c:\Sp_who_Perocess.bcp" -n -S "EPI-IT-SUFIAN\SQL_DATA" -U {loginid}
-P
> {password}'
> John
>
> "doller" wrote:
>|||Hi all,
EPI-IT-SUFIAN is my server name and SQL_DATA is my instance name.
i resolved the connection issue but now i am getting diffrent type of
error
SQLState = HY000, NativeError = 0
Error = [Microsoft][SQL Native Client]Unable to open BCP error-file
NULL
pls help
from
doller
John Bell wrote:[vbcol=seagreen]
> Hi
> This assumed that EPI-IT-SUFIAN\SQL_DATA was the database server if not
> please let us know what it is supposed to be!
> You can check the format and parameters of the BCP utility in books online
.
> John
> "John Bell" wrote:
>|||hi doller,
the following line might be enough (it's been tested from DOS session)
bcp <db>.<table> in <path>.<file> -n -S<server> -U<login> -P<password>
--
current location: alicante (es)
"doller" wrote:

> Hi all,
> EPI-IT-SUFIAN is my server name and SQL_DATA is my instance name.
> i resolved the connection issue but now i am getting diffrent type of
> error
> SQLState = HY000, NativeError = 0
> Error = [Microsoft][SQL Native Client]Unable to open BCP error-fil
e
> NULL
> pls help
> from
> doller
>
> John Bell wrote:
>|||Hi ,
Thanks for all ur help.
I was getting the error unable to open the BCP file because i was using
-U -P as i was working on the server means with trustedconnection so i
have to use -T in place of -U and -P
from
Doller
Enric wrote:[vbcol=seagreen]
> hi doller,
> the following line might be enough (it's been tested from DOS session)
> bcp <db>.<table> in <path>.<file> -n -S<server> -U<login> -P<password>
> --
> current location: alicante (es)
>
> "doller" wrote:
>

problem with BCP

Dear all,
I created a BCP file from SQL Server2000 with .BCP Extension.
Now i am trying to load data in the SQL Server2005 Database table.
First was getting the error of remote connection which i solved .
Now i am getting this below error
SQLState = HY000, NativeError = 0
Error = [Microsoft][SQL Native Client]Unable to open BCP error-file
NULL
I am executing this code
exec master..xp_cmdshell ' BCP c:\Sp_who_Perocess.bcp in
epinav.dbo.Sp_who_Perocess -n -"EPI-IT-SUFIAN\SQL_DATA" -U -P'
Pls help
from
Doller
hi
there is an error in your syntex, it's complaining about your error file
u have -n -"EPI-IT-SUFIAN\SQL_DATA"
is this the location for your error / log ilfe -"EPI-IT-SUFIAN\SQL_DATA"
if so then you have to add the -e switch and add a file name as well
and u are specifying login and password with blank values ?
-U -P
"doller" wrote:

> Dear all,
> I created a BCP file from SQL Server2000 with .BCP Extension.
> Now i am trying to load data in the SQL Server2005 Database table.
> First was getting the error of remote connection which i solved .
> Now i am getting this below error
> SQLState = HY000, NativeError = 0
> Error = [Microsoft][SQL Native Client]Unable to open BCP error-file
> NULL
> I am executing this code
> exec master..xp_cmdshell ' BCP c:\Sp_who_Perocess.bcp in
> epinav.dbo.Sp_who_Perocess -n -"EPI-IT-SUFIAN\SQL_DATA" -U -P'
> Pls help
> from
> Doller
>
|||Hi
Assuming epinav.dbo.Sp_who_Perocess is a table or view, you should get the
command working from a command prompt and then fit that into the xp_cmdshell
call.
Try the following adding the correct loginid and password:
exec master..xp_cmdshell ' BCP "epinav.dbo.Sp_who_Perocess" in
"c:\Sp_who_Perocess.bcp" -n -S "EPI-IT-SUFIAN\SQL_DATA" -U {loginid} -P
{password}'
John
"doller" wrote:

> Dear all,
> I created a BCP file from SQL Server2000 with .BCP Extension.
> Now i am trying to load data in the SQL Server2005 Database table.
> First was getting the error of remote connection which i solved .
> Now i am getting this below error
> SQLState = HY000, NativeError = 0
> Error = [Microsoft][SQL Native Client]Unable to open BCP error-file
> NULL
> I am executing this code
> exec master..xp_cmdshell ' BCP c:\Sp_who_Perocess.bcp in
> epinav.dbo.Sp_who_Perocess -n -"EPI-IT-SUFIAN\SQL_DATA" -U -P'
> Pls help
> from
> Doller
>
|||Hi
This assumed that EPI-IT-SUFIAN\SQL_DATA was the database server if not
please let us know what it is supposed to be!
You can check the format and parameters of the BCP utility in books online.
John
"John Bell" wrote:
[vbcol=seagreen]
> Hi
> Assuming epinav.dbo.Sp_who_Perocess is a table or view, you should get the
> command working from a command prompt and then fit that into the xp_cmdshell
> call.
> Try the following adding the correct loginid and password:
> exec master..xp_cmdshell ' BCP "epinav.dbo.Sp_who_Perocess" in
> "c:\Sp_who_Perocess.bcp" -n -S "EPI-IT-SUFIAN\SQL_DATA" -U {loginid} -P
> {password}'
> John
>
> "doller" wrote:
|||Hi all,
EPI-IT-SUFIAN is my server name and SQL_DATA is my instance name.
i resolved the connection issue but now i am getting diffrent type of
error
SQLState = HY000, NativeError = 0
Error = [Microsoft][SQL Native Client]Unable to open BCP error-file
NULL
pls help
from
doller
John Bell wrote:[vbcol=seagreen]
> Hi
> This assumed that EPI-IT-SUFIAN\SQL_DATA was the database server if not
> please let us know what it is supposed to be!
> You can check the format and parameters of the BCP utility in books online.
> John
> "John Bell" wrote:
|||hi doller,
the following line might be enough (it's been tested from DOS session)
bcp <db>.<table> in <path>.<file> -n -S<server> -U<login> -P<password>
current location: alicante (es)
"doller" wrote:

> Hi all,
> EPI-IT-SUFIAN is my server name and SQL_DATA is my instance name.
> i resolved the connection issue but now i am getting diffrent type of
> error
> SQLState = HY000, NativeError = 0
> Error = [Microsoft][SQL Native Client]Unable to open BCP error-file
> NULL
> pls help
> from
> doller
>
> John Bell wrote:
>
|||Hi ,
Thanks for all ur help.
I was getting the error unable to open the BCP file because i was using
-U -P as i was working on the server means with trustedconnection so i
have to use -T in place of -U and -P
from
Doller
Enric wrote:[vbcol=seagreen]
> hi doller,
> the following line might be enough (it's been tested from DOS session)
> bcp <db>.<table> in <path>.<file> -n -S<server> -U<login> -P<password>
> --
> current location: alicante (es)
>
> "doller" wrote:

Problem with Batch files!

Hi,
I am trying to write a batch file which does the following:
1. Move all the files created on weekdays to be sorted to their respective days folder Example: Files created on Tuesday should be moved to a folder named "Tuesday"(When the batch file is run on Wednesday).
2. Only that particular day's created files should be present in the main directory and the other files should be moved to their respective days(created days) folder!!!!!
Could you please help me out!!!!!
Thanks.
AUse xp_cmdshall with regular dos dir, copy, etc. You can save list of files in folder to temporary or permanent table like this:

create table #tmp(res varchar(700))
insert #tmp
master..xp_cmdshell 'dir myfolder'

Monday, March 26, 2012

Problem with AS data source

I've successfully created a data source and reports against an Analysis
Services database.
The AS database is on the same machine as RS (let's call this Server
1).
I tried this against a second AS database (on Server 2), and it works
fine from Visual Studio, but when I deploy it to RS (on Server 1) and
try to run it, I get the error:
"...Cannot create a connection to data source 'DevServer'.
(rsErrorOpeningConnection)
A connection cannot be made. Ensure that the server is running.
Unable to read from the transport connection: An existing connection
was forcibly closed by the remote host."
I'm not doing anything complicated. It's just that the AS database is
on a different machine from the RS server. Shouldn't this work?
Ideas?
TIA,
JimHi Jim.
Could 'devserver' have firewall on for its network connection?
<jhcorey@.yahoo.com> wrote in message
news:1150819548.395205.74950@.r2g2000cwb.googlegroups.com...
> I've successfully created a data source and reports against an Analysis
> Services database.
> The AS database is on the same machine as RS (let's call this Server
> 1).
> I tried this against a second AS database (on Server 2), and it works
> fine from Visual Studio, but when I deploy it to RS (on Server 1) and
> try to run it, I get the error:
> "...Cannot create a connection to data source 'DevServer'.
> (rsErrorOpeningConnection)
> A connection cannot be made. Ensure that the server is running.
> Unable to read from the transport connection: An existing connection
> was forcibly closed by the remote host."
> I'm not doing anything complicated. It's just that the AS database is
> on a different machine from the RS server. Shouldn't this work?
> Ideas?
> TIA,
> Jim
>|||I just tried deploying everything to Server 2, and it works fine.
So my conclusion is that for a report that goes against an AS cube, RS
must be on the same machine as AS. But it would be great if I was
wrong.
Jim
Tim Dot NoSpam wrote:
> Hi Jim.
> Could 'devserver' have firewall on for its network connection?
> <jhcorey@.yahoo.com> wrote in message
> news:1150819548.395205.74950@.r2g2000cwb.googlegroups.com...
> > I've successfully created a data source and reports against an Analysis
> > Services database.
> > The AS database is on the same machine as RS (let's call this Server
> > 1).
> >
> > I tried this against a second AS database (on Server 2), and it works
> > fine from Visual Studio, but when I deploy it to RS (on Server 1) and
> > try to run it, I get the error:
> >
> > "...Cannot create a connection to data source 'DevServer'.
> > (rsErrorOpeningConnection)
> > A connection cannot be made. Ensure that the server is running.
> > Unable to read from the transport connection: An existing connection
> > was forcibly closed by the remote host."
> >
> > I'm not doing anything complicated. It's just that the AS database is
> > on a different machine from the RS server. Shouldn't this work?
> > Ideas?
> >
> > TIA,
> > Jim
> >|||It is great! <g>
I'm not a configuration wiz, but here are some things you could do until you
figure out how to get reporting services to correctly pass the user's
credentials to AS:
1) change the datasource in report manager for the OLAP conection to use a
domain user that has the necessary privileges on AS (preferrably a domain
account that's not an admin in AS).
Ideally, RS will pass the credentials of the user to AS during the
connection.
A good enterprise configuration for a smaller group could be to split sql
server, analysis services and reporting services across 3 boxes, preferrably
64bit.
<jhcorey@.yahoo.com> wrote in message
news:1150824174.761885.143160@.h76g2000cwa.googlegroups.com...
>I just tried deploying everything to Server 2, and it works fine.
> So my conclusion is that for a report that goes against an AS cube, RS
> must be on the same machine as AS. But it would be great if I was
> wrong.
> Jim
> Tim Dot NoSpam wrote:
>> Hi Jim.
>> Could 'devserver' have firewall on for its network connection?
>> <jhcorey@.yahoo.com> wrote in message
>> news:1150819548.395205.74950@.r2g2000cwb.googlegroups.com...
>> > I've successfully created a data source and reports against an Analysis
>> > Services database.
>> > The AS database is on the same machine as RS (let's call this Server
>> > 1).
>> >
>> > I tried this against a second AS database (on Server 2), and it works
>> > fine from Visual Studio, but when I deploy it to RS (on Server 1) and
>> > try to run it, I get the error:
>> >
>> > "...Cannot create a connection to data source 'DevServer'.
>> > (rsErrorOpeningConnection)
>> > A connection cannot be made. Ensure that the server is running.
>> > Unable to read from the transport connection: An existing connection
>> > was forcibly closed by the remote host."
>> >
>> > I'm not doing anything complicated. It's just that the AS database is
>> > on a different machine from the RS server. Shouldn't this work?
>> > Ideas?
>> >
>> > TIA,
>> > Jim
>> >
>

Friday, March 23, 2012

Problem with AddNew on SQL server in c++ 2003

Hello,
I created a very simple database with only one table (Records) and on
that table only one column (Category datatype nvarchar).
I am trying to use the AddNew ado example found on msnd but it always
inserts a null value instead of the value I am trying to insert.
All my HRESULTs say S_OK but the CategoryStatus is alway 3 (which is
null).
I am using UNICODE.
I can insert records just fine if I use the INSERT INTO command but I
am not having any luck with the AddNew API.
Can anyone help?
Here is my code:
class CJournalRecord :public CADORecordBinding
{
BEGIN_ADO_BINDING(CJournalRecord)
ADO_VARIABLE_LENGTH_ENTRY2(1, adVarChar, Category, sizeof(Category),
CategoryStatus, TRUE)
END_ADO_BINDING()
public:
CString Category;
ULONG CategoryStatus;
};
HRESULT hr = S_OK;
_RecordsetPtr pRstEvents = NULL;
IADORecordBinding *picRs = NULL;
hr = pRstEvents.CreateInstance(__uuidof(Recordset));
if (hr != S_OK)
{
}
else
{
//the connection is already open
CJournalRecord newEvent;
hr = pRstEvents->Open(_T("Records"),_variant_t((IDispatch *)
connection, true),adOpenKeyset,adLockOptimistic,adCm
dTable);
//Open an IADORecordBinding interface pointer which we'll use for
Binding Recordset to a class
hr =
pRstEvents-> QueryInterface(__uuidof(IADORecordBindin
g),(LPVOID*)&picRs);
hr = picRs->BindToRecordset(&newEvent);
newEvent.Category = _T("SeeYou");
newEvent.CategoryStatus = adFldNull;
if(hr!=S_OK)
{
}
else
{
hr = picRs->AddNew(&newEvent);
int status = (int)newEvent.CategoryStatus;
//hr = pRstEvents->Update();
}
}Try creating a stored procedure and executing that. Using AddNew from the
middle tier is kinda hokey.
<roberta.coffman@.emersonprocess.com> wrote in message
news:1134768159.533377.64050@.g43g2000cwa.googlegroups.com...
> Hello,
> I created a very simple database with only one table (Records) and on
> that table only one column (Category datatype nvarchar).
> I am trying to use the AddNew ado example found on msnd but it always
> inserts a null value instead of the value I am trying to insert.
> All my HRESULTs say S_OK but the CategoryStatus is alway 3 (which is
> null).
> I am using UNICODE.
> I can insert records just fine if I use the INSERT INTO command but I
> am not having any luck with the AddNew API.
> Can anyone help?
> Here is my code:
> class CJournalRecord :public CADORecordBinding
> {
> BEGIN_ADO_BINDING(CJournalRecord)
> ADO_VARIABLE_LENGTH_ENTRY2(1, adVarChar, Category, sizeof(Category),
> CategoryStatus, TRUE)
> END_ADO_BINDING()
> public:
> CString Category;
> ULONG CategoryStatus;
> };
> HRESULT hr = S_OK;
> _RecordsetPtr pRstEvents = NULL;
> IADORecordBinding *picRs = NULL;
> hr = pRstEvents.CreateInstance(__uuidof(Recordset));
> if (hr != S_OK)
> {
> }
> else
> {
> //the connection is already open
> CJournalRecord newEvent;
> hr = pRstEvents->Open(_T("Records"),_variant_t((IDispatch *)
> connection, true),adOpenKeyset,adLockOptimistic,adCm
dTable);
> //Open an IADORecordBinding interface pointer which we'll use for
> Binding Recordset to a class
> hr =
> pRstEvents-> QueryInterface(__uuidof(IADORecordBindin
g),(LPVOID*)&picRs);
> hr = picRs->BindToRecordset(&newEvent);
> newEvent.Category = _T("SeeYou");
> newEvent.CategoryStatus = adFldNull;
> if(hr!=S_OK)
> {
> }
> else
> {
> hr = picRs->AddNew(&newEvent);
> int status = (int)newEvent.CategoryStatus;
> //hr = pRstEvents->Update();
> }
> }
>|||I'm not sure binding to the CString Category works here, also
sizeof(Category) is pretty meaningless. Suggest you change
CString to a fixed sized array to mirror the size of the column
in your table, i.e. change
CString Category;
to
CHAR Category[80];

Problem with Accessing Unix Share Drive When a SSIS Job Runs

Hi I am trying to schedule a job to copy an MDB data file from Unix server to Windows 2003 server (Accfp1_data2_server). I have created a file copy SSIS package and tested it in the SSIS Visual Studio environment where it runs ok. The package was created while logged in as a domain administrator.

I then created a job to run this package (which is stored on a folder) using the credential of the same domain administrator who has full access privilege to both of these servers. However, the job fails whenever it is run manually or scheduled? The error message displayed is given below

Message
Executed as user: FORTIES\ABCITYG.
Microsoft (R) SQL Server Execute Package Utility Version 9.00.3042.00 for 32-bit Copyright (C) Microsoft Corp 1984-2005.
All rights reserved. Started: 14:26:07 Error: 2007-09-13 14:26:12.56 Code: 0xC001401E
Source: CommunityContact - Copy MS Access Database Connection manager "CONTACT.mdb On Accfp1_data2_server"
Description: The file name "\\Accfp1_data2_server\DATA2\Arts&rec\Apps\Contacts\CONTACT.mdb" specified in the connection was not valid.
End Error Error: 2007-09-13 14:26:12.56 Code: 0xC001401D Source: CommunityContact - Copy MS Access Database Description: Connection "CONTACT.mdb On Accfp1_data2_server" failed validation. End Error DTExec: The package execution returned DTSER_FAILURE (1). Started: 14:26:07 Finished: 14:26:12 Elapsed: 5.297 seconds. The package execution failed. The step failed.

Please note that the job runs without problem when I change the source file to a Windows 2000 server share . How bizzare? Hope this is not a Microsoft's Trick?

Can anyone help?

Just to check, the FORTIES\ABCITYG account is the domain administrator that has access to this share?

|||

Thanks for pointing to this. Apology for my dyslexic reading of the error message. This account does not have access. I will ask our team to look into this.

I overlooked that the job was running under FORTIES\ABCITYG (local) account. It is weird because when I created the credential I had entered a different domain admin account but I noticed that the identiry has been automatically reverted to FORTIES\ABCITYG account. In fact I recreated the credential with domainserver\abcityg but the identity for this account is automatically refreshed with FORTIES\ABCITYG again and again. Any guess?

|||

Just to emphasise the fact that I am unable to create a new credential that uses other domain user. (I used the option menu Security/Credential) . And this appears to be the root of the problem.

I can select a user who is not a user in the current server (forties) but is a domain admin (<domainserver>\admin) from "select User or Group" window. But when I click on OK button the Identity field displays 'forties\admin'. How bizzare? I would have expected it to be '<domainserver>\admin'. In fact whenever I use any other <user>from the domain user list the Identity field is replaced by forties\<user>.

If this is not a bug then how on earth could you create a Domain Level Credential?

Any suggestion?|||

That is weird. I can't repro this problem.

Do you have permissions (BOL says "Requires ALTER ANY CREDENTIAL permission to create or modify a credential. Requires ALTER ANY LOGIN permission to map a login to a credential.")

Anyway, I'm not an expert on Agent Proxy account, please try this question in Tools forum:

http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=84&SiteID=1

|||

Yes, I do have full permission. As suggested by (Michael) I have added a new thread at http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2160775&SiteID=1 , but it is not going anywhere.

By the way, the sql server and agent are running under LocalSystem account. Will this be the problem? Will reinstalling the SQL Server using a window domain user resolve the issue? Come on Microsoft, Please advise.

Problem with Accessing Unix Share Drive When a SSIS Job Runs

Hi I am trying to schedule a job to copy an MDB data file from Unix server to Windows 2003 server (Accfp1_data2_server). I have created a file copy SSIS package and tested it in the SSIS Visual Studio environment where it runs ok. The package was created while logged in as a domain administrator.

I then created a job to run this package (which is stored on a folder) using the credential of the same domain administrator who has full access privilege to both of these servers. However, the job fails whenever it is run manually or scheduled? The error message displayed is given below

Message
Executed as user: FORTIES\ABCITYG.
Microsoft (R) SQL Server Execute Package Utility Version 9.00.3042.00 for 32-bit Copyright (C) Microsoft Corp 1984-2005.
All rights reserved. Started: 14:26:07 Error: 2007-09-13 14:26:12.56 Code: 0xC001401E
Source: CommunityContact - Copy MS Access Database Connection manager "CONTACT.mdb On Accfp1_data2_server"
Description: The file name "\\Accfp1_data2_server\DATA2\Arts&rec\Apps\Contacts\CONTACT.mdb" specified in the connection was not valid.
End Error Error: 2007-09-13 14:26:12.56 Code: 0xC001401D Source: CommunityContact - Copy MS Access Database Description: Connection "CONTACT.mdb On Accfp1_data2_server" failed validation. End Error DTExec: The package execution returned DTSER_FAILURE (1). Started: 14:26:07 Finished: 14:26:12 Elapsed: 5.297 seconds. The package execution failed. The step failed.

Please note that the job runs without problem when I change the source file to a Windows 2000 server share . How bizzare? Hope this is not a Microsoft's Trick?

Can anyone help?

Just to check, the FORTIES\ABCITYG account is the domain administrator that has access to this share?

|||

Thanks for pointing to this. Apology for my dyslexic reading of the error message. This account does not have access. I will ask our team to look into this.

I overlooked that the job was running under FORTIES\ABCITYG (local) account. It is weird because when I created the credential I had entered a different domain admin account but I noticed that the identiry has been automatically reverted to FORTIES\ABCITYG account. In fact I recreated the credential with domainserver\abcityg but the identity for this account is automatically refreshed with FORTIES\ABCITYG again and again. Any guess?

|||

Just to emphasise the fact that I am unable to create a new credential that uses other domain user. (I used the option menu Security/Credential) . And this appears to be the root of the problem.

I can select a user who is not a user in the current server (forties) but is a domain admin (<domainserver>\admin) from "select User or Group" window. But when I click on OK button the Identity field displays 'forties\admin'. How bizzare? I would have expected it to be '<domainserver>\admin'. In fact whenever I use any other <user>from the domain user list the Identity field is replaced by forties\<user>.

If this is not a bug then how on earth could you create a Domain Level Credential?

Any suggestion?|||

That is weird. I can't repro this problem.

Do you have permissions (BOL says "Requires ALTER ANY CREDENTIAL permission to create or modify a credential. Requires ALTER ANY LOGIN permission to map a login to a credential.")

Anyway, I'm not an expert on Agent Proxy account, please try this question in Tools forum:

http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=84&SiteID=1

|||

Yes, I do have full permission. As suggested by (Michael) I have added a new thread at http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2160775&SiteID=1 , but it is not going anywhere.

By the way, the sql server and agent are running under LocalSystem account. Will this be the problem? Will reinstalling the SQL Server using a window domain user resolve the issue? Come on Microsoft, Please advise.

Problem with Accessing Unix Share Drive When a SSIS Job Runs

Hi I am trying to schedule a job to copy an MDB data file from Unix server to Windows 2003 server (Accfp1_data2_server). I have created a file copy SSIS package and tested it in the SSIS Visual Studio environment where it runs ok. The package was created while logged in as a domain administrator.

I then created a job to run this package (which is stored on a folder) using the credential of the same domain administrator who has full access privilege to both of these servers. However, the job fails whenever it is run manually or scheduled? The error message displayed is given below

Message
Executed as user: FORTIES\ABCITYG.
Microsoft (R) SQL Server Execute Package Utility Version 9.00.3042.00 for 32-bit Copyright (C) Microsoft Corp 1984-2005.
All rights reserved. Started: 14:26:07 Error: 2007-09-13 14:26:12.56 Code: 0xC001401E
Source: CommunityContact - Copy MS Access Database Connection manager "CONTACT.mdb On Accfp1_data2_server"
Description: The file name "\\Accfp1_data2_server\DATA2\Arts&rec\Apps\Contacts\CONTACT.mdb" specified in the connection was not valid.
End Error Error: 2007-09-13 14:26:12.56 Code: 0xC001401D Source: CommunityContact - Copy MS Access Database Description: Connection "CONTACT.mdb On Accfp1_data2_server" failed validation. End Error DTExec: The package execution returned DTSER_FAILURE (1). Started: 14:26:07 Finished: 14:26:12 Elapsed: 5.297 seconds. The package execution failed. The step failed.

Please note that the job runs without problem when I change the source file to a Windows 2000 server share . How bizzare? Hope this is not a Microsoft's Trick?

Can anyone help?

Just to check, the FORTIES\ABCITYG account is the domain administrator that has access to this share?

|||

Thanks for pointing to this. Apology for my dyslexic reading of the error message. This account does not have access. I will ask our team to look into this.

I overlooked that the job was running under FORTIES\ABCITYG (local) account. It is weird because when I created the credential I had entered a different domain admin account but I noticed that the identiry has been automatically reverted to FORTIES\ABCITYG account. In fact I recreated the credential with domainserver\abcityg but the identity for this account is automatically refreshed with FORTIES\ABCITYG again and again. Any guess?

|||

Just to emphasise the fact that I am unable to create a new credential that uses other domain user. (I used the option menu Security/Credential) . And this appears to be the root of the problem.

I can select a user who is not a user in the current server (forties) but is a domain admin (<domainserver>\admin) from "select User or Group" window. But when I click on OK button the Identity field displays 'forties\admin'. How bizzare? I would have expected it to be '<domainserver>\admin'. In fact whenever I use any other <user>from the domain user list the Identity field is replaced by forties\<user>.

If this is not a bug then how on earth could you create a Domain Level Credential?

Any suggestion?|||

That is weird. I can't repro this problem.

Do you have permissions (BOL says "Requires ALTER ANY CREDENTIAL permission to create or modify a credential. Requires ALTER ANY LOGIN permission to map a login to a credential.")

Anyway, I'm not an expert on Agent Proxy account, please try this question in Tools forum:

http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=84&SiteID=1

|||

Yes, I do have full permission. As suggested by (Michael) I have added a new thread at http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2160775&SiteID=1 , but it is not going anywhere.

By the way, the sql server and agent are running under LocalSystem account. Will this be the problem? Will reinstalling the SQL Server using a window domain user resolve the issue? Come on Microsoft, Please advise.

sql

Problem with accessing stored procedure in the report

Hi,

I am new to Sql Server 2005 Reporitng Services. I created a report in BI and used stored procedure as a dataset. When I run the report in preview mode it works fine and when I run it in report server/report manager, I am getting the following error:

  • An error has occurred during report processing. (rsProcessingAborted)
  • Query execution failed for data set 'dsetBranch'. (rsErrorExecutingCommand)
  • Could not find stored procedure 'stpBranch'.

    But I have this procedure in the db and it runs fine in the query analyzer and the query builder window in report project. When I refresh the page in Report manager, I am getting this error.

    Input string was not in a correct format.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.FormatException: Input string was not in a correct format.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


    Stack Trace:

    [FormatException: Input string was not in a correct format.] System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +2753715 System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) +102 Microsoft.Reporting.WebForms.ReportAreaPageOperation.PerformOperation(NameValueCollection urlQuery, HttpResponse response) +149 Microsoft.Reporting.WebForms.HttpHandler.ProcessRequest(HttpContext context) +75 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +154 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64

    I have changed the dataset from procedure to a sql string and the report is working fine everywhere. But I have a business requirement that I need to use a stored procedure.

    I am not sure why I am getting this error and I greatly appreciate any help.

    Thanks

    ngk,

    I have seen this before. Are you using any schema namespaces in your stored procedure name.

    Such as HumanResources.GetAllEmployees instead of the old default of dbo.GetAllEmployees.

    If so are you also running your stored procedures in Query Analyser as the "SAME" user that your Report Datasource uses.
    Pay close attention to these details...

    I have seen where 1 sql user has the default schema set to HumanResources and the stored procedure call is made such as exec GetAllEmployees instead of
    exec HumanResources.GetAllEmployees.

    In this situation any user that makes the first call (exec GetAllEmployees ) and has the default schema of HumanResources will succeed.
    Any user that does not have this default will return an error because it is looking for dbo.GetAllEmployees and this may not exist.

    Hope this helps.. if not please provide more details on what users you are using and the exact call you are making for the stored procedure.

    |||

    Hi Bret,

    Thanks for the info. I am not using any schema namespaces in my stored procedures. I actually got this error when I tried to connect to a remote sql server. Now I have installed developer editon on my local machine and I have reporting services also on my local machine. I have been able to connect to the strored procedures and deploy the reports to the local report server and view the reports without any problems. I am not sure whether I may have to face the same issue when the reports are deployed to the remote SQL DB and Reporting Services production servers.

    Thanks

  • Problem with accessing stored procedure in the report

    Hi,

    I am new to Sql Server 2005 Reporitng Services. I created a report in BI and used stored procedure as a dataset. When I run the report in preview mode it works fine and when I run it in report server/report manager, I am getting the following error:

  • An error has occurred during report processing. (rsProcessingAborted)
  • Query execution failed for data set 'dsetBranch'. (rsErrorExecutingCommand)
  • Could not find stored procedure 'stpBranch'.

    But I have this procedure in the db and it runs fine in the query analyzer and the query builder window in report project. When I refresh the page in Report manager, I am getting this error.

    Input string was not in a correct format.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.FormatException: Input string was not in a correct format.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


    Stack Trace:

    [FormatException: Input string was not in a correct format.] System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +2753715 System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) +102 Microsoft.Reporting.WebForms.ReportAreaPageOperation.PerformOperation(NameValueCollection urlQuery, HttpResponse response) +149 Microsoft.Reporting.WebForms.HttpHandler.ProcessRequest(HttpContext context) +75 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +154 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64

    I have changed the dataset from procedure to a sql string and the report is working fine everywhere. But I have a business requirement that I need to use a stored procedure.

    I am not sure why I am getting this error and I greatly appreciate any help.

    Thanks

    ngk,

    I have seen this before. Are you using any schema namespaces in your stored procedure name.

    Such as HumanResources.GetAllEmployees instead of the old default of dbo.GetAllEmployees.

    If so are you also running your stored procedures in Query Analyser as the "SAME" user that your Report Datasource uses.
    Pay close attention to these details...

    I have seen where 1 sql user has the default schema set to HumanResources and the stored procedure call is made such as exec GetAllEmployees instead of
    exec HumanResources.GetAllEmployees.

    In this situation any user that makes the first call (exec GetAllEmployees ) and has the default schema of HumanResources will succeed.
    Any user that does not have this default will return an error because it is looking for dbo.GetAllEmployees and this may not exist.

    Hope this helps.. if not please provide more details on what users you are using and the exact call you are making for the stored procedure.

    |||

    Hi Bret,

    Thanks for the info. I am not using any schema namespaces in my stored procedures. I actually got this error when I tried to connect to a remote sql server. Now I have installed developer editon on my local machine and I have reporting services also on my local machine. I have been able to connect to the strored procedures and deploy the reports to the local report server and view the reports without any problems. I am not sure whether I may have to face the same issue when the reports are deployed to the remote SQL DB and Reporting Services production servers.

    Thanks

  • Problem with accessing stored procedure in the report

    Hi,

    I am new to Sql Server 2005 Reporitng Services. I created a report in BI and used stored procedure as a dataset. When I run the report in preview mode it works fine and when I run it in report server/report manager, I am getting the following error:

  • An error has occurred during report processing. (rsProcessingAborted)

  • Query execution failed for data set 'dsetBranch'. (rsErrorExecutingCommand)

  • Could not find stored procedure 'stpBranch'.

    But I have this procedure in the db and it runs fine in the query analyzer and the query builder window in report project. When I refresh the page in Report manager, I am getting this error.

    Input string was not in a correct format.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.FormatException: Input string was not in a correct format.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


    Stack Trace:

    [FormatException: Input string was not in a correct format.]

    System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +2753715

    System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) +102

    Microsoft.Reporting.WebForms.ReportAreaPageOperation.PerformOperation(NameValueCollection urlQuery, HttpResponse response) +149

    Microsoft.Reporting.WebForms.HttpHandler.ProcessRequest(HttpContext context) +75

    System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +154

    System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64

    I have changed the dataset from procedure to a sql string and the report is working fine everywhere. But I have a business requirement that I need to use a stored procedure.

    I am not sure why I am getting this error and I greatly appreciate any help.

    Thanks

    ngk,

    I have seen this before. Are you using any schema namespaces in your stored procedure name.

    Such as HumanResources.GetAllEmployees instead of the old default of dbo.GetAllEmployees.

    If so are you also running your stored procedures in Query Analyser as the "SAME" user that your Report Datasource uses.
    Pay close attention to these details...

    I have seen where 1 sql user has the default schema set to HumanResources and the stored procedure call is made such as exec GetAllEmployees instead of
    exec HumanResources.GetAllEmployees.

    In this situation any user that makes the first call (exec GetAllEmployees ) and has the default schema of HumanResources will succeed.
    Any user that does not have this default will return an error because it is looking for dbo.GetAllEmployees and this may not exist.

    Hope this helps.. if not please provide more details on what users you are using and the exact call you are making for the stored procedure.

    |||

    Hi Bret,

    Thanks for the info. I am not using any schema namespaces in my stored procedures. I actually got this error when I tried to connect to a remote sql server. Now I have installed developer editon on my local machine and I have reporting services also on my local machine. I have been able to connect to the strored procedures and deploy the reports to the local report server and view the reports without any problems. I am not sure whether I may have to face the same issue when the reports are deployed to the remote SQL DB and Reporting Services production servers.

    Thanks

  • problem with access to analysis services: repository structure cannot be created

    Hello,

    I have a problem with Analysis Services. We use this product because it's needed for NetIQ Analysis Center, our OLAP reporting tool.

    When I try to open the Analysis Manager, I can see the server but when I try to access it, the following error message is displayed: "repository structure cannot be created on the target server: the specified object cannot be found. For more information, see the section 'service pack installation' in the service pack readme file."

    I checked this service pack readme file, but couldn't find anything relevant to this problem.
    The files for both the sample foodmart and the NetiQ Analysis Center databases are still on this server, so I suppose something happened with the configuration information of this server, not with the databases themselves.

    Event entries in the system and application log files do not reveal anything, nothing points to a problem with OLAP/Analysis Services.

    The connection string to this server seems to be ok as well.

    Unregistering and reregistering this server does not resolve the problem: as soon as I try to register, the same error message is displayed.

    SQl, sqlsrvagent, MSDTC and Olap services are all running.

    Did anyone see this behaviour before? Or does anyone know how to resolve or how to at least troubleshoot this particular problem?

    Help will be much appreciated!

    Timur

    This sounds like a corruption issue with your repository although possibly it's as simple as a permissions problem with the relational database the repostitory is stored in.

    First check your access to the relational database (SQL or Jet) that the repository is stored in. If this is okay, you can restore the default msmdrep.mdb by resetting the repository connection strings. (provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Program Files\Microsoft Analysis services\Bin\msmdrep.mdb) Then you can migrate this to SQL if you wish. It is strongly recommended that you use the native format and not the Meta Data Services (previously named Microsoft Repository) format and the latest services packs will even enforce this during migration)

    sql

    Wednesday, March 21, 2012

    Problem with 1 Server in 3 Server Peer-To-Peer

    Boss created a new table in a database in which most, but not all, of
    the tables are part articles in a peer-to-peer publication. He claims,
    and I have no reason to doubt, that he did not add his new table to the
    list of articles in the publication. Nevertheless, the replication on
    the one server that he worked on is now failing with the message:
    "Invalid object name dbo.hisTable"
    The other two servers in the topology show no errors. The boss's table
    is not among the articles listed for the publication. And, I can't fix
    it! I deleted the table (it did not exist on the other two replicas). I
    included it in the list of articles, let replication run for a couple
    of minutes (still getting the same error), then de-listed the table.
    All to no effect.
    I'd appreciate any help anybody can offer.
    Can you enable logging and post the results back here?
    http://support.microsoft.com/default...312292&sd=tech
    Hilary Cotter
    Director of Text Mining and Database Strategy
    RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
    This posting is my own and doesn't necessarily represent RelevantNoise's
    positions, strategies or opinions.
    Looking for a SQL Server replication book?
    http://www.nwsu.com/0974973602.html
    Looking for a FAQ on Indexing Services/SQL FTS
    http://www.indexserverfaq.com
    "EoRaptor013" <rchrismon@.gmail.com> wrote in message
    news:1159914788.967187.170290@.m7g2000cwm.googlegro ups.com...
    > Boss created a new table in a database in which most, but not all, of
    > the tables are part articles in a peer-to-peer publication. He claims,
    > and I have no reason to doubt, that he did not add his new table to the
    > list of articles in the publication. Nevertheless, the replication on
    > the one server that he worked on is now failing with the message:
    > "Invalid object name dbo.hisTable"
    > The other two servers in the topology show no errors. The boss's table
    > is not among the articles listed for the publication. And, I can't fix
    > it! I deleted the table (it did not exist on the other two replicas). I
    > included it in the list of articles, let replication run for a couple
    > of minutes (still getting the same error), then de-listed the table.
    > All to no effect.
    > I'd appreciate any help anybody can offer.
    >
    |||Hilary Cotter wrote:
    > Can you enable logging and post the results back here?
    >
    Oh boy, now my ignorance goes on display. I don't see replication
    logging anywhere in the documentation. Are you talking about the SQL
    log?
    Thanks.
    Randy
    |||Hilary,
    I found a link to the MSDN documentation on replication logging in a
    reply you made to someone else recently. I'll follow up and let you
    know.
    Thanks so much for the help.
    |||Well, this is interesting! There's a bug either the documentation or in
    the output logging implementation for replication agents. The
    documentation clearly states that -Output should be the path and file
    name of the text file for logging output:
    ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/repref9/html/7b4fd480-9eaf-40dd-9a07-77301e44e2ac.htm
    However, trying to enter any text yields an error that the -Output
    parameter (NOT the -OutputVerboseLevel) must be an integer! Needless to
    say, an integer doesn't help specify a file path and name.
    I did enable verbose history but it doesn't seem to add any more
    information. Here's what I get.
    Date10/04/2006 10:52:19
    LogJob History (ESICH1DV1-Endurance-EnduranceDEV20060821-ESINY1DV1-3)
    Step ID2
    ServerESICH1DV1
    Job NameESICH1DV1-Endurance-EnduranceDEV20060821-ESINY1DV1-3
    Step NameRun agent.
    Duration00:41:20
    Sql Severity0
    Sql Message ID0
    Operator Emailed
    Operator Net sent
    Operator Paged
    Retries Attempted0
    Message
    2006-10-04 16:33:27.943 Startup Delay: 9508 (msecs)
    2006-10-04 16:33:37.442 Connecting to Distributor 'ESICH1DV1'
    2006-10-04 16:33:37.567 Initializing
    2006-10-04 16:33:37.567 Parameter values obtained from agent profile:
    -bcpbatchsize 2147473647
    -commitbatchsize 100
    -commitbatchthreshold 1000
    -historyverboselevel 2
    -keepalivemessageinterval 300
    -logintimeout 15
    -maxbcpthreads 1
    -maxdeliveredtransactions 0
    -pollinginterval 5000
    -querytimeout 1800
    -skiperrors
    -transactionsperhistory 100
    2006-10-04 16:33:37.567 Connecting to Subscriber 'ESINY1DV1'
    2006-10-04 16:33:39.645 Agent message code 208. Invalid object name
    'dbo.genius_ClaimsLossQualificationDate'.
    2006-10-04 16:33:39.661 Category:COMMAND
    Source: Failed Command
    Number:
    Message: if @.@.trancount > 0 rollback tran
    2006-10-04 16:33:39.661 Category:NULL
    Source: Microsoft SQL Native Client
    Number: 208
    Message: Invalid object name 'dbo.genius_ClaimsLossQualificationDate'.
    Thanks.
    sql

    problem with ##xp_cmdshell_proxy_account##

    Hi,
    I was trying to debug a situation where we need to use xp_cmdshell in
    SQL2005 SP2 build 3175. I had created the ##xp_cmdshell_proxy_account##
    proxy credential and wanted to delete it to see that I was getting a message
    about the credential missing. After running the sp_xp_cmdshell_proxy_account
    stored proc with NULL I ran it again to re-create the proxy credential but
    this time I got message: -
    Msg 15137, Level 16, State 1, Procedure sp_xp_cmdshell_proxy_account, Line 1
    An error occurred during the execution of sp_xp_cmdshell_proxy_account.
    Possible reasons: the provided account was invalid or the
    '##xp_cmdshell_proxy_account##' credential could not be created. Error code:
    '997'.
    This is on a clustered server so do I need to flip the cluster for the
    credential to be completed deleted before trying to add it again?
    Thanks
    ChrisI am having the same issue. I am simply trying to assign xp_cmdshell a proxy
    account and its not allowing me to. I know that the username/password is a
    valid one.
    Any help would be appreciated. Thanks Amir
    "Chris Wood" wrote:
    > Hi,
    > I was trying to debug a situation where we need to use xp_cmdshell in
    > SQL2005 SP2 build 3175. I had created the ##xp_cmdshell_proxy_account##
    > proxy credential and wanted to delete it to see that I was getting a message
    > about the credential missing. After running the sp_xp_cmdshell_proxy_account
    > stored proc with NULL I ran it again to re-create the proxy credential but
    > this time I got message: -
    > Msg 15137, Level 16, State 1, Procedure sp_xp_cmdshell_proxy_account, Line 1
    > An error occurred during the execution of sp_xp_cmdshell_proxy_account.
    > Possible reasons: the provided account was invalid or the
    > '##xp_cmdshell_proxy_account##' credential could not be created. Error code:
    > '997'.
    > This is on a clustered server so do I need to flip the cluster for the
    > credential to be completed deleted before trying to add it again?
    > Thanks
    > Chris
    >
    >
    >
    >|||Amir,
    Rather than run the stored proc I just created the proxy credential by using
    the create credential T-SQL statement.
    Chris
    "Amir" <Amir@.discussions.microsoft.com> wrote in message
    news:61B89673-4894-419A-9D82-6D99C7559878@.microsoft.com...
    >I am having the same issue. I am simply trying to assign xp_cmdshell a
    >proxy
    > account and its not allowing me to. I know that the username/password is a
    > valid one.
    > Any help would be appreciated. Thanks Amir
    > "Chris Wood" wrote:
    >> Hi,
    >> I was trying to debug a situation where we need to use xp_cmdshell in
    >> SQL2005 SP2 build 3175. I had created the ##xp_cmdshell_proxy_account##
    >> proxy credential and wanted to delete it to see that I was getting a
    >> message
    >> about the credential missing. After running the
    >> sp_xp_cmdshell_proxy_account
    >> stored proc with NULL I ran it again to re-create the proxy credential
    >> but
    >> this time I got message: -
    >> Msg 15137, Level 16, State 1, Procedure sp_xp_cmdshell_proxy_account,
    >> Line 1
    >> An error occurred during the execution of sp_xp_cmdshell_proxy_account.
    >> Possible reasons: the provided account was invalid or the
    >> '##xp_cmdshell_proxy_account##' credential could not be created. Error
    >> code:
    >> '997'.
    >> This is on a clustered server so do I need to flip the cluster for the
    >> credential to be completed deleted before trying to add it again?
    >> Thanks
    >> Chris
    >>
    >>
    >>

    Monday, March 12, 2012

    Problem while fetching data from Oracle linked server

    Hi,

    I created a linked server as follows:

    EXEC sp_addlinkedserver 'OracleLinkedServer', 'Oracle', 'MSDAORA', 'fcstage'

    EXEC sp_addlinkedsrvlogin 'OracleLinkedServer', false, 'SA', 'fc_stage', 'password'

    Now I try firing a simple select statement

    SELECT FINANCIAL_TRX_INFO_ID FROM

    [OracleLinkedServer]..[FC_STAGE].[WFS_FINANCIAL_TRX_INFO]

    WHERE SFS_BUSINESS_SEGMENT IS NOT NULL

    But I get the following error:

    OLE DB provider "MSDAORA" for linked server "OracleLinkedServer" returned message "ORA-01426: numeric overflow

    ".

    Msg 7330, Level 16, State 2, Line 1

    Cannot fetch a row from OLE DB provider "MSDAORA" for linked server "OracleLinkedServer".

    This seems to be a generic error statement. Can anyone tell me where am I going wrong.

    Thanks.

    Solved using OpenQuery

    SELECT * FROM OPENQUERY([OracleLinkedServer], 'SELECT FINANCIAL_TRX_INFO_ID FROM WFS_FINANCIAL_TRX_INFO') AS Query

    Problem while export report to Excel

    When i export a report to Excel, there are created some coluns and line
    that not appear in the report.
    These lines and coluns are smaller than the normal ones, but if i need to
    work with this file, a must have to delete each one.
    And athis operation is not easy.
    Thanks by your help.
    Pedro Julião
    Belo Horizonte - Brasil
    --
    Message posted via http://www.sqlmonster.comI have run into the same problem. I am just building Excel Macros to delete
    the columns.
    "Pedro Julião Moura Machado Coelho via S" wrote:
    > When i export a report to Excel, there are created some coluns and line
    > that not appear in the report.
    > These lines and coluns are smaller than the normal ones, but if i need to
    > work with this file, a must have to delete each one.
    > And athis operation is not easy.
    > Thanks by your help.
    > Pedro Julião
    > Belo Horizonte - Brasil
    > --
    > Message posted via http://www.sqlmonster.com
    >|||Dear Eden,
    Thanks by your help.
    Can you send me some examples of this macros?
    Best regards,
    Pedro Julião
    --
    Message posted via http://www.sqlmonster.com

    problem while creating index for temporary table...

    Hi,

    i have created index for a temporary table and this script should used by multiusers.So when second user connecting to it is giving index i mean object already exists.

    So what i need is when the second user connected the script should create one more index on temporary table.Will sql server provide any random way of creating indexes if the index exists already with that name?

    Thank You,

    Seeing the actual script will be helpful.

    What advantage do you think you get from creating multiple (identical) indices on the same table?

    |||

    Nope..

    SQL Server is cleaver enough to handel this situation.

    When you create a index or constraint on the Temp Table, eventhough the index name is duplicate it will allow.

    But it only possible on temp tables (prefixed with single #).

    To Test this,

    Open Two window,

    Execute the below window on the opened 2 window..

    create table #test

    (

    id int

    );

    Insert Into #test values(1);

    Insert Into #test values(2);

    Create clustered index testindex on #test(id)

    Now you wont get any error on any of the window. Rite?

    To fetch the created index details, execute the below code on any one of the window..

    select * from sysindexes where name like '%test%'

    Now you can see the 2 rows with same indexname but refereing with different table. Yes. all the temp tables (#) will be suffixed with unique number to avoid the object already found error while multiple users connects.

    Friday, March 9, 2012

    Problem when editing existing report

    Hi,
    I have created Report1.rdl, using a simple select such as
    SELECT * FROM Table1 .
    Now I want to filter the result, so I go to the Data view, and add a filter
    into the GroupCode field.
    But when I run again the report, it doesn´t show any data, only the header.
    Isn´t it possible to edit a report once you have created it? I suppose it is
    possible so, what am I doing wrong?
    Thanks in advance,
    Ibai PeñaI have found why it happens. I compare the filter field with a blank value,
    and no record is found.
    Now my question is: Is it possible to create a filter, and make be able to
    use it or not, depending on what the user wants?
    I have succed filtering data, but once filtered, I´m not able to see all
    data again.
    Thanks in advance,
    Ibai Peña
    "Ibai Peña" wrote:
    > Hi,
    > I have created Report1.rdl, using a simple select such as
    > SELECT * FROM Table1 .
    > Now I want to filter the result, so I go to the Data view, and add a filter
    > into the GroupCode field.
    > But when I run again the report, it doesn´t show any data, only the header.
    > Isn´t it possible to edit a report once you have created it? I suppose it is
    > possible so, what am I doing wrong?
    > Thanks in advance,
    > Ibai Peña|||My guess is that the filter applied does not return any data and so it is
    blank.
    --
    Bruce Loehle-Conger
    MVP SQL Server Reporting Services
    "Ibai Peña" <IbaiPea@.discussions.microsoft.com> wrote in message
    news:A71B86D7-560C-4C3F-90C2-11D0947EFBF5@.microsoft.com...
    > Hi,
    > I have created Report1.rdl, using a simple select such as
    > SELECT * FROM Table1 .
    > Now I want to filter the result, so I go to the Data view, and add a
    filter
    > into the GroupCode field.
    > But when I run again the report, it doesn´t show any data, only the
    header.
    > Isn´t it possible to edit a report once you have created it? I suppose it
    is
    > possible so, what am I doing wrong?
    > Thanks in advance,
    > Ibai Peña