Showing posts with label store. Show all posts
Showing posts with label store. Show all posts

Wednesday, March 21, 2012

Problems with Oracle character setting

Hi there,

I am using an ADO Oracle Connector to store Oracle data to an SQL Server.
When I map the input data to the OLEDB destination I get the Error msg that
unicode (DT_WSTR) cannot be mapped to 1292 character code (DT_STR).

To solve this I put a Data Conversion Transformation between Source and Destination.
That would mean a lot of work if I couldn't map the data directly from Source to Destination
for all the tables of my project.

I checked the NLS-Settings from the Oracle db:
select * from sys.v_$nls_parameters
NLS_CHARACTERSET -> WE8ISO8859P1

It's really a mystery to me why the DataReader converts Latin-1 to unicode which has to be
converted to Latin-1 again.
Could someone please help me out?

Fridtjof
The problem here is with managed code. The CLR doesn't have a ANSI type string so all strings are converted to Unicode. So in actuality, it is not the datareader that does the conversion but Oracle's ADO.NET connector. Obviously, knowing this doesn't really help you out all that much though. Is there any way you can make the SQL Server table be unicode instead of ANSI. If not then data conversion is the only solution other than to get an OLEDB driver for Oracle, since OLEDB does support ANSI directly.

HTH,
Matt|||Matt,

you're right. I've tried to download Oracle data via OLEDB which nags that it cannot read Oracle's character setting and assumes it to be 1292 (or was it 1252?). But it downloads the data correctly.

Unfortunately I cannot set the password property in a Package configuration. See this post:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=161564&SiteID=1

This way I'm not getting much further. One have to ponder between the different restrictions :(
Thanks anyway
Fridtjof

Wednesday, March 7, 2012

Problems With Create Table #nametable

Hello
I' ve problems with the instruction Create Table #TableName, because days
ago I was run store procedures with this instruction and i don't problems.
the result is ok!.
I don' t know now why i can't run this stores...
Not exists alteration in nothing with respect to Data Base.. no new fields,
nothing.
Thanks and regards
PD: When I use Declare @.tableName Table, all is ok. WHY?, I need use
#TableName because I use "Execute('Senteces')" and "Sentences" is a string
concatenate . I like know why?
Can you define "problems"? Can you show the code, and what happens (e.g.
the error message)?
http://www.aspfaq.com/
(Reverse address to reply.)
"Table, Declare Table, Create table, SP" <Table, Declare Table, Create
table, SP@.discussions.microsoft.com> wrote in message
news:0C7AB68F-3102-4EB9-B74A-D9626B2FE45F@.microsoft.com...
> Hello
> I' ve problems with the instruction Create Table #TableName, because days
> ago I was run store procedures with this instruction and i don't problems.
> the result is ok!.
> I don' t know now why i can't run this stores...
> Not exists alteration in nothing with respect to Data Base.. no new
fields,
> nothing.
> Thanks and regards
> PD: When I use Declare @.tableName Table, all is ok. WHY?, I need use
> #TableName because I use "Execute('Senteces')" and "Sentences" is a
string
> concatenate . I like know why?
|||Before :
Create table #tmp_Articulos_Vencidos
(cod_Articulovarchar(20)COLLATE Modern_Spanish_CI_AS,
Saldo_Lote decimal(15,5)
)
insert into #tmp_Articulos_Vencidos
SelectArt.Cod_Articulo_Auxas cod_Articulo,
cast(sum(isnull(TEAL.num_stock_saldo_lote,0)) as decimal(15,5)) as Saldo_Lote
Fromtab_existencias_almacenas teawith (nolock)
Jointab_Articuloas Artwith (nolock)
OnArt.Cod_Catalogo= Tea.Cod_Catalogo
AndArt.Cod_Articulo= Tea.Cod_Articulo
AndArt.fla_reg_lote= 'S'
Left
jointab_existencias_almacen_loteas TEALwith (nolock)
OnTEAL.Cod_Pais= Tea.Cod_Pais
AndTEAL.Cod_Almacen= Tea.Cod_Almacen
AndTEAL.Cod_Articulo= Tea.Cod_Articulo
AndTEAL.Cod_Catalogo= Tea.Cod_Catalogo
Where
Tea.Cod_pais= @.Cod_pais
andAlm.Cod_Terra= @.Cod_Terra
Group by
Art.Cod_Articulo_Aux,
teal.fec_vencimiento
-- -*-*-*-*-*-*-*-*-*-*-*
-- Show results
-- -*-*-*-*-*-*-*-*-*-*-*
Execute('Select cod_Articuloas [Código], ' +
'Saldo_loteas [Stock] ' +
'From#tmp_Articulos_Vencidos ' +
'Where (1=1) ' +
'Order by 2 ' )
drop table #tmp_Articulos_Vencidos
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
After :
SelectArt.Cod_Articulo_Auxas cod_Articulo,
cast(sum(isnull(TEAL.num_stock_saldo_lote,0)) as decimal(15,5)) as Saldo_Lote
INTO #tmp_Articulos_Vencidos
Fromtab_existencias_almacenas teawith (nolock)
Jointab_Articuloas Artwith (nolock)
OnArt.Cod_Catalogo= Tea.Cod_Catalogo
AndArt.Cod_Articulo= Tea.Cod_Articulo
AndArt.fla_reg_lote= 'S'
Left
jointab_existencias_almacen_loteas TEALwith (nolock)
OnTEAL.Cod_Pais= Tea.Cod_Pais
AndTEAL.Cod_Almacen= Tea.Cod_Almacen
AndTEAL.Cod_Articulo= Tea.Cod_Articulo
AndTEAL.Cod_Catalogo= Tea.Cod_Catalogo
Where
Tea.Cod_pais= @.Cod_pais
andAlm.Cod_Terra= @.Cod_Terra
Group by
Art.Cod_Articulo_Aux,
teal.fec_vencimiento
-- -*-*-*-*-*-*-*-*-*-*-*
-- Show results
-- -*-*-*-*-*-*-*-*-*-*-*
Execute('Select cod_Articuloas [Código], ' +
'Saldo_loteas [Stock] ' +
'From#tmp_Articulos_Vencidos ' +
'Where (1=1) ' +
'Order by 2 ' )
drop table #tmp_Articulos_Vencidos
QUESTION : ????
Why ?, before it success ok. and now NOT...
thanks
"Aaron [SQL Server MVP]" wrote:

> Can you define "problems"? Can you show the code, and what happens (e.g.
> the error message)?
> --
> http://www.aspfaq.com/
> (Reverse address to reply.)
>
>
> "Table, Declare Table, Create table, SP" <Table, Declare Table, Create
> table, SP@.discussions.microsoft.com> wrote in message
> news:0C7AB68F-3102-4EB9-B74A-D9626B2FE45F@.microsoft.com...
> fields,
> string
>
>
|||> Why ?, before it success ok. and now NOT...
What does this mean? Do you get an error message? If so, what is it? If
not, what does "success NOT" mean?

Problems With Create Table #nametable

Hello
I' ve problems with the instruction Create Table #TableName, because days
ago I was run store procedures with this instruction and i don't problems.
the result is ok!.
I don' t know now why i can't run this stores...
Not exists alteration in nothing with respect to Data Base.. no new fields,
nothing.
Thanks and regards
PD: When I use Declare @.tableName Table, all is ok. WHY?, I need use
#TableName because I use "Execute('Senteces')" and "Sentences" is a string
concatenate . I like know why?Can you define "problems"? Can you show the code, and what happens (e.g.
the error message)?
http://www.aspfaq.com/
(Reverse address to reply.)
"Table, Declare Table, Create table, SP" <Table, Declare Table, Create
table, SP@.discussions.microsoft.com> wrote in message
news:0C7AB68F-3102-4EB9-B74A-D9626B2FE45F@.microsoft.com...
> Hello
> I' ve problems with the instruction Create Table #TableName, because days
> ago I was run store procedures with this instruction and i don't problems.
> the result is ok!.
> I don' t know now why i can't run this stores...
> Not exists alteration in nothing with respect to Data Base.. no new
fields,
> nothing.
> Thanks and regards
> PD: When I use Declare @.tableName Table, all is ok. WHY?, I need use
> #TableName because I use "Execute('Senteces')" and "Sentences" is a
string
> concatenate . I like know why?|||Before :
Create table #tmp_Articulos_Vencidos
(cod_Articulo varchar(20) COLLATE Modern_Spanish_CI_AS,
Saldo_Lote decimal(15,5)
)
insert into #tmp_Articulos_Vencidos
Select Art.Cod_Articulo_Aux as cod_Articulo,
cast(sum(isnull(TEAL.num_stock_saldo_lote,0)) as decimal(15,5)) as Saldo_Lot
e
From tab_existencias_almacen as tea with (nolock)
Join tab_Articulo as Art with (nolock)
On Art.Cod_Catalogo = Tea.Cod_Catalogo
And Art.Cod_Articulo = Tea.Cod_Articulo
And Art.fla_reg_lote = 'S'
Left
join tab_existencias_almacen_lote as TEAL with (nolock)
On TEAL.Cod_Pais = Tea.Cod_Pais
And TEAL.Cod_Almacen = Tea.Cod_Almacen
And TEAL.Cod_Articulo = Tea.Cod_Articulo
And TEAL.Cod_Catalogo = Tea.Cod_Catalogo
Where
Tea.Cod_pais = @.Cod_pais
and Alm.Cod_Terra = @.Cod_Terra
Group by
Art.Cod_Articulo_Aux,
teal.fec_vencimiento
-- -*-*-*-*-*-*-*-*-*-*-*
-- Show results
-- -*-*-*-*-*-*-*-*-*-*-*
Execute ('Select cod_Articulo as [Código], ' +
' Saldo_lote as [Stock] ' +
'From #tmp_Articulos_Vencidos ' +
'Where (1=1) ' +
'Order by 2 ' )
drop table #tmp_Articulos_Vencidos
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
After :
Select Art.Cod_Articulo_Aux as cod_Articulo,
cast(sum(isnull(TEAL.num_stock_saldo_lote,0)) as decimal(15,5)) as Saldo_Lot
e
INTO #tmp_Articulos_Vencidos
From tab_existencias_almacen as tea with (nolock)
Join tab_Articulo as Art with (nolock)
On Art.Cod_Catalogo = Tea.Cod_Catalogo
And Art.Cod_Articulo = Tea.Cod_Articulo
And Art.fla_reg_lote = 'S'
Left
join tab_existencias_almacen_lote as TEAL with (nolock)
On TEAL.Cod_Pais = Tea.Cod_Pais
And TEAL.Cod_Almacen = Tea.Cod_Almacen
And TEAL.Cod_Articulo = Tea.Cod_Articulo
And TEAL.Cod_Catalogo = Tea.Cod_Catalogo
Where
Tea.Cod_pais = @.Cod_pais
and Alm.Cod_Terra = @.Cod_Terra
Group by
Art.Cod_Articulo_Aux,
teal.fec_vencimiento
-- -*-*-*-*-*-*-*-*-*-*-*
-- Show results
-- -*-*-*-*-*-*-*-*-*-*-*
Execute ('Select cod_Articulo as [Código], ' +
' Saldo_lote as [Stock] ' +
'From #tmp_Articulos_Vencidos ' +
'Where (1=1) ' +
'Order by 2 ' )
drop table #tmp_Articulos_Vencidos
QUESTION : ????
Why ?, before it success ok. and now NOT...
thanks
"Aaron [SQL Server MVP]" wrote:

> Can you define "problems"? Can you show the code, and what happens (e.g.
> the error message)?
> --
> http://www.aspfaq.com/
> (Reverse address to reply.)
>
>
> "Table, Declare Table, Create table, SP" <Table, Declare Table, Create
> table, SP@.discussions.microsoft.com> wrote in message
> news:0C7AB68F-3102-4EB9-B74A-D9626B2FE45F@.microsoft.com...
> fields,
> string
>
>|||> Why ?, before it success ok. and now NOT...
What does this mean? Do you get an error message? If so, what is it? If
not, what does "success NOT" mean?

Problems With Create Table #nametable

Hello
I' ve problems with the instruction Create Table #TableName, because days
ago I was run store procedures with this instruction and i don't problems.
the result is ok!.
I don' t know now why i can't run this stores...
Not exists alteration in nothing with respect to Data Base.. no new fields,
nothing.
Thanks and regards
PD: When I use Declare @.tableName Table, all is ok. WHY?, I need use
#TableName because I use "Execute('Senteces')" and "Sentences" is a string
concatenate . I like know why?Can you define "problems"? Can you show the code, and what happens (e.g.
the error message)?
--
http://www.aspfaq.com/
(Reverse address to reply.)
"Table, Declare Table, Create table, SP" <Table, Declare Table, Create
table, SP@.discussions.microsoft.com> wrote in message
news:0C7AB68F-3102-4EB9-B74A-D9626B2FE45F@.microsoft.com...
> Hello
> I' ve problems with the instruction Create Table #TableName, because days
> ago I was run store procedures with this instruction and i don't problems.
> the result is ok!.
> I don' t know now why i can't run this stores...
> Not exists alteration in nothing with respect to Data Base.. no new
fields,
> nothing.
> Thanks and regards
> PD: When I use Declare @.tableName Table, all is ok. WHY?, I need use
> #TableName because I use "Execute('Senteces')" and "Sentences" is a
string
> concatenate . I like know why?|||Before :
Create table #tmp_Articulos_Vencidos
(cod_Articulo varchar(20) COLLATE Modern_Spanish_CI_AS,
Saldo_Lote decimal(15,5)
)
insert into #tmp_Articulos_Vencidos
Select Art.Cod_Articulo_Aux as cod_Articulo,
cast(sum(isnull(TEAL.num_stock_saldo_lote,0)) as decimal(15,5)) as Saldo_Lote
From tab_existencias_almacen as tea with (nolock)
Join tab_Articulo as Art with (nolock)
On Art.Cod_Catalogo = Tea.Cod_Catalogo
And Art.Cod_Articulo = Tea.Cod_Articulo
And Art.fla_reg_lote = 'S'
Left
join tab_existencias_almacen_lote as TEAL with (nolock)
On TEAL.Cod_Pais = Tea.Cod_Pais
And TEAL.Cod_Almacen = Tea.Cod_Almacen
And TEAL.Cod_Articulo = Tea.Cod_Articulo
And TEAL.Cod_Catalogo = Tea.Cod_Catalogo
Where
Tea.Cod_pais = @.Cod_pais
and Alm.Cod_Terra = @.Cod_Terra
Group by
Art.Cod_Articulo_Aux,
teal.fec_vencimiento
-- -*-*-*-*-*-*-*-*-*-*-*
-- Show results
-- -*-*-*-*-*-*-*-*-*-*-*
Execute ('Select cod_Articulo as [Código], ' +
' Saldo_lote as [Stock] ' +
'From #tmp_Articulos_Vencidos ' +
'Where (1=1) ' +
'Order by 2 ' )
drop table #tmp_Articulos_Vencidos
--
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
After :
Select Art.Cod_Articulo_Aux as cod_Articulo,
cast(sum(isnull(TEAL.num_stock_saldo_lote,0)) as decimal(15,5)) as Saldo_Lote
INTO #tmp_Articulos_Vencidos
From tab_existencias_almacen as tea with (nolock)
Join tab_Articulo as Art with (nolock)
On Art.Cod_Catalogo = Tea.Cod_Catalogo
And Art.Cod_Articulo = Tea.Cod_Articulo
And Art.fla_reg_lote = 'S'
Left
join tab_existencias_almacen_lote as TEAL with (nolock)
On TEAL.Cod_Pais = Tea.Cod_Pais
And TEAL.Cod_Almacen = Tea.Cod_Almacen
And TEAL.Cod_Articulo = Tea.Cod_Articulo
And TEAL.Cod_Catalogo = Tea.Cod_Catalogo
Where
Tea.Cod_pais = @.Cod_pais
and Alm.Cod_Terra = @.Cod_Terra
Group by
Art.Cod_Articulo_Aux,
teal.fec_vencimiento
-- -*-*-*-*-*-*-*-*-*-*-*
-- Show results
-- -*-*-*-*-*-*-*-*-*-*-*
Execute ('Select cod_Articulo as [Código], ' +
' Saldo_lote as [Stock] ' +
'From #tmp_Articulos_Vencidos ' +
'Where (1=1) ' +
'Order by 2 ' )
drop table #tmp_Articulos_Vencidos
QUESTION : ¿¿¿?
Why ?, before it success ok. and now NOT...
thanks
"Aaron [SQL Server MVP]" wrote:
> Can you define "problems"? Can you show the code, and what happens (e.g.
> the error message)?
> --
> http://www.aspfaq.com/
> (Reverse address to reply.)
>
>
> "Table, Declare Table, Create table, SP" <Table, Declare Table, Create
> table, SP@.discussions.microsoft.com> wrote in message
> news:0C7AB68F-3102-4EB9-B74A-D9626B2FE45F@.microsoft.com...
> > Hello
> >
> > I' ve problems with the instruction Create Table #TableName, because days
> > ago I was run store procedures with this instruction and i don't problems.
> > the result is ok!.
> >
> > I don' t know now why i can't run this stores...
> >
> > Not exists alteration in nothing with respect to Data Base.. no new
> fields,
> > nothing.
> >
> > Thanks and regards
> >
> > PD: When I use Declare @.tableName Table, all is ok. WHY?, I need use
> > #TableName because I use "Execute('Senteces')" and "Sentences" is a
> string
> > concatenate . I like know why?
>
>|||> Why ?, before it success ok. and now NOT...
What does this mean? Do you get an error message? If so, what is it? If
not, what does "success NOT" mean?

Saturday, February 25, 2012

Problems with ~large~ table

Hello everyone,
I have a little problem with a Table im using to store notes on articles:
Design:
id - int - identity (auto)
Title - varchar(50)

currently the table is containing ~12000 datasets (not much if you ask me).

Problem:
If I try to edit/add recordsets, I get a timeout.
In Access:
'ODBC Error adding recordset'

In SQL
- None - Timeout (I Quit after 2.5 minutes of INSERT query)

does anybody know a solution to this problem?

Thanks for helpin'!In Addition to the upper text:

Strangely it works sometimes - I know that this should be that slow, the textfield is indexed - w/o duplicates - but i have used the same structure for other tables (with over 5 times as much data) and there it works..

Is it possible that indexing w/o duplicates causes this problems?|||Have you tried inserting via Enterprise Mgr to see if you get the same error?

Have you seen what's happening through, for instance, SQL Profiler?|||I've tried trough Access, Acced direct table edit, SQL Query Analyzer - all have the same problem (except that QA doesn't have a set timeout)...|||Which type of index are you using ? In your previous instances where you had no problems, did you have the index using the "without duplicates" option ?|||Originally posted by rnealejr
Which type of index are you using ? In your previous instances where you had no problems, did you have the index using the "without duplicates" option ?

In the troubled table i'm using index: w/o duplicates - in the not troubled table the row is indexed but with duplicates...
another problem is - I currently cannot change this, because I dont have enough space for the transaction log to save 15000-50000 rows (indexes) :mad: