Showing posts with label script. Show all posts
Showing posts with label script. Show all posts

Wednesday, March 7, 2012

Can't Process cube created with ASCMD - XMLA script -

Hi,

I have an XMLA-script that I use for creating my cube. Creating the cube with the tool - ascmd - is not an issue but when I try to process the cube, I get the following message:
OLE DB error: OLE DB or ODBC error: Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.; 28000.

Strange because when I open the management studio -> look at my data source, all the correct information is there (server, user name, etc.), except for the password field in impersonation account editor, which is blanco.

The only way to process my AS DB is to open the data source editor and retype my password in the impersonation account editor. Once I've done that, I can process.

But as I want to automate the cube processing, I have a problem...

Anyone?

greets,
-Tom

Here's the solution:

<ImpersonationInfo>
<ImpersonationMode>ImpersonateAccount</ImpersonationMode>
<Account>mUserName</Account>
<Password>mPassword</Password>
</ImpersonationInfo>

I just had to add the password tag in my xmla-script...

This seems to be a bug, because while I was creating the cube in VS, I've set the option 'Remove passwords' in project properties to false.

Now the only thing that really bothers me is the fact that I have to put passwords in a script file (available to anyone). Anyone has an idea?

-Tom

Saturday, February 25, 2012

Can''t precompile script

Hi,

with a script task I get an error "This task is configured to pre-compile the script but the binary code is not found. Please visit the IDE in Script Task editor by clicking Desing Script button to cause binary code to be generated".

Well, if I do so the error doesn't disappear. The only chance I have is to switch of precopilation, which is quite a performance issue...

I have no idea where this error is comming from... The script is quite easy, just some string and file operations (find out file change date using system.io)...

Any idea?

I can only think that there is an error in compilation because this should of course work!

-Jamie

|||...any idea where to look? If I switch of precompile everything works, so there shouldn't be any error in the script...|||

Hmmm...bizarre.

Sorry Thomas, can't help you there!

|||This is an old one, but I just had the same problem and just noticed that my script had a syntax error. Once I fixed the syntax error, the problem was resolved.|||im facing the same problem....for the first time....simply cant keep precompile option to true as binary code is not getting generated....the issue is my env may change to 64 bit....evn keepin the option precompile false wont help then( which is workin fine now)
...just as im writin this....was this a issue bfr SP1... i havent checked if i have run it in new installation...
will check n post back if success....
ne suggestions welcome in the meanwhile...|||This is just wrong - when I set property precompile = false for the Script Task everything works fine.

SSIS works in odd ways sometimes (or perhaps it is just me)

Actually I now noticed that whatever package's script i open up - they dont compile anymore - I wonder what causes all of a sudden all the scripts on my workstation not to compile?|||as i guessed...SP1 solves this problem...worked for me... i had a new local server installation n missed out on the service packs....so install SP1 and 2 and ur done.....but ya ull have to then change all precompilei otions to true and open n close the script once to get the binary code........

sorry for the delay in reply!!

Can''t precompile script

Hi,

with a script task I get an error "This task is configured to pre-compile the script but the binary code is not found. Please visit the IDE in Script Task editor by clicking Desing Script button to cause binary code to be generated".

Well, if I do so the error doesn't disappear. The only chance I have is to switch of precopilation, which is quite a performance issue...

I have no idea where this error is comming from... The script is quite easy, just some string and file operations (find out file change date using system.io)...

Any idea?

I can only think that there is an error in compilation because this should of course work!

-Jamie

|||...any idea where to look? If I switch of precompile everything works, so there shouldn't be any error in the script...|||

Hmmm...bizarre.

Sorry Thomas, can't help you there!

|||This is an old one, but I just had the same problem and just noticed that my script had a syntax error. Once I fixed the syntax error, the problem was resolved.|||im facing the same problem....for the first time....simply cant keep precompile option to true as binary code is not getting generated....the issue is my env may change to 64 bit....evn keepin the option precompile false wont help then( which is workin fine now)
...just as im writin this....was this a issue bfr SP1... i havent checked if i have run it in new installation...
will check n post back if success....
ne suggestions welcome in the meanwhile...|||This is just wrong - when I set property precompile = false for the Script Task everything works fine.

SSIS works in odd ways sometimes (or perhaps it is just me)

Actually I now noticed that whatever package's script i open up - they dont compile anymore - I wonder what causes all of a sudden all the scripts on my workstation not to compile?|||as i guessed...SP1 solves this problem...worked for me... i had a new local server installation n missed out on the service packs....so install SP1 and 2 and ur done.....but ya ull have to then change all precompilei otions to true and open n close the script once to get the binary code........

sorry for the delay in reply!!

Can't precompile script

Hi,

with a script task I get an error "This task is configured to pre-compile the script but the binary code is not found. Please visit the IDE in Script Task editor by clicking Desing Script button to cause binary code to be generated".

Well, if I do so the error doesn't disappear. The only chance I have is to switch of precopilation, which is quite a performance issue...

I have no idea where this error is comming from... The script is quite easy, just some string and file operations (find out file change date using system.io)...

Any idea?

I can only think that there is an error in compilation because this should of course work!

-Jamie

|||...any idea where to look? If I switch of precompile everything works, so there shouldn't be any error in the script...|||

Hmmm...bizarre.

Sorry Thomas, can't help you there!

|||This is an old one, but I just had the same problem and just noticed that my script had a syntax error. Once I fixed the syntax error, the problem was resolved.|||im facing the same problem....for the first time....simply cant keep precompile option to true as binary code is not getting generated....the issue is my env may change to 64 bit....evn keepin the option precompile false wont help then( which is workin fine now)
...just as im writin this....was this a issue bfr SP1... i havent checked if i have run it in new installation...
will check n post back if success....
ne suggestions welcome in the meanwhile...|||This is just wrong - when I set property precompile = false for the Script Task everything works fine.

SSIS works in odd ways sometimes (or perhaps it is just me)

Actually I now noticed that whatever package's script i open up - they dont compile anymore - I wonder what causes all of a sudden all the scripts on my workstation not to compile?|||as i guessed...SP1 solves this problem...worked for me... i had a new local server installation n missed out on the service packs....so install SP1 and 2 and ur done.....but ya ull have to then change all precompilei otions to true and open n close the script once to get the binary code........

sorry for the delay in reply!!

Can't precompile script

Hi,

with a script task I get an error "This task is configured to pre-compile the script but the binary code is not found. Please visit the IDE in Script Task editor by clicking Desing Script button to cause binary code to be generated".

Well, if I do so the error doesn't disappear. The only chance I have is to switch of precopilation, which is quite a performance issue...

I have no idea where this error is comming from... The script is quite easy, just some string and file operations (find out file change date using system.io)...

Any idea?

I can only think that there is an error in compilation because this should of course work!

-Jamie

|||...any idea where to look? If I switch of precompile everything works, so there shouldn't be any error in the script...|||

Hmmm...bizarre.

Sorry Thomas, can't help you there!

|||This is an old one, but I just had the same problem and just noticed that my script had a syntax error. Once I fixed the syntax error, the problem was resolved.|||im facing the same problem....for the first time....simply cant keep precompile option to true as binary code is not getting generated....the issue is my env may change to 64 bit....evn keepin the option precompile false wont help then( which is workin fine now)
...just as im writin this....was this a issue bfr SP1... i havent checked if i have run it in new installation...
will check n post back if success....
ne suggestions welcome in the meanwhile...|||This is just wrong - when I set property precompile = false for the Script Task everything works fine.

SSIS works in odd ways sometimes (or perhaps it is just me)

Actually I now noticed that whatever package's script i open up - they dont compile anymore - I wonder what causes all of a sudden all the scripts on my workstation not to compile?|||as i guessed...SP1 solves this problem...worked for me... i had a new local server installation n missed out on the service packs....so install SP1 and 2 and ur done.....but ya ull have to then change all precompilei otions to true and open n close the script once to get the binary code........

sorry for the delay in reply!!

Sunday, February 12, 2012

Can't import image when size is more then 8K using "microsoft.xmlhttp"

I'm using following script to import image into SQL Server from web and it does not work for image 2 (http://dbalinks.com/images/mol2.jpg) but it work for image 1 (http://dbalinks.com/images/mol1.jpg):

declare @.local int
declare @.retcode int
declare @.status int
declare @.url varchar(2000)

create table #httpresult(pic image)

--set @.url = 'http://dbalinks.com/images/mol1.jpg'
set @.url = 'http://dbalinks.com/images/mol2.jpg'

exec @.retcode = sp_oacreate 'microsoft.xmlhttp', @.local out
exec @.retcode = sp_oamethod @.local, 'open', null, 'get',@.url , 'false'
exec @.retcode = sp_oamethod @.local, 'send', null, @.status
exec @.retcode = sp_oagetproperty @.local, 'status', @.status out
insert #httpresult (pic)
exec @.retcode = sp_oagetproperty @.local, 'responsebody'

select * from #httpresult

drop table #httpresult

exec sp_oadestroy @.local


Is it possible to import image larger then 8K into SQL Server from the web using T-SQL and stored procedure?

Is there any chance that admin can do something about this?

Maybe using stream:

exec sp_oacreate 'adodb.stream',@.o OUT
exec sp_oasetproperty @.o,'Type',adTypeBinary

or something like that.

Can't import image when size is more then 8K using "microsoft.xmlhttp"

I'm using following script to import image into SQL Server from web and it does not work for image 2 (http://dbalinks.com/images/mol2.jpg) but it work for image 1 (http://dbalinks.com/images/mol1.jpg):

declare @.local int
declare @.retcode int
declare @.status int
declare @.url varchar(2000)

create table #httpresult(pic image)

--set @.url = 'http://dbalinks.com/images/mol1.jpg'
set @.url = 'http://dbalinks.com/images/mol2.jpg'

exec @.retcode = sp_oacreate 'microsoft.xmlhttp', @.local out
exec @.retcode = sp_oamethod @.local, 'open', null, 'get',@.url , 'false'
exec @.retcode = sp_oamethod @.local, 'send', null, @.status
exec @.retcode = sp_oagetproperty @.local, 'status', @.status out
insert #httpresult (pic)
exec @.retcode = sp_oagetproperty @.local, 'responsebody'

select * from #httpresult

drop table #httpresult

exec sp_oadestroy @.local


Is it possible to import image larger then 8K into SQL Server from the web using T-SQL and stored procedure?

Is there any chance that admin can do something about this?

Maybe using stream:

exec sp_oacreate 'adodb.stream',@.o OUT
exec sp_oasetproperty @.o,'Type',adTypeBinary

or something like that.