Friday, March 30, 2012
'Instances' of SQL Server 2000?
ave multiple databases, which the app clients use. Has something to do with
the name of the SQL Server instance; each instance needs to be named differe
ntly.
How does this work? Do I install SQL Server multiple times in different loca
tions, or is it simply a defined thing in SQL Server? Is there a 'per instan
ce' licensing issue, or will my one SQL Server license cover the multiple in
stances of SQL Server on on
e server system?
Thanks,
JohnI believe Standard edition is licensed per instance but Enterprise Edition
can be installed with multiple instances on a server. It's best to check
the EULA to be totally certain though. But having to buy one new copy of SE
could be worth looking at why this very odd requirement was "assumed" in the
application's design IMO.
hth
Eric
John wrote:
> Our application requires multiple instances of SQL Server 2000 in
> order to have multiple databases, which the app clients use. Has
> something to do with the name of the SQL Server instance; each
> instance needs to be named differently.
> How does this work? Do I install SQL Server multiple times in
> different locations, or is it simply a defined thing in SQL Server?
> Is there a 'per instance' licensing issue, or will my one SQL Server
> license cover the multiple instances of SQL Server on one server
> system?
> Thanks,
> John|||> Our application requires multiple instances of SQL Server 2000 in order to
have multiple databases
That's the part I don't get. Why can't the application use multiple
databases in a single instance?
> How does this work? Do I install SQL Server multiple times in different
locations
For multiple instances, yes.
> Is there a 'per instance' licensing issue
Depending on the edition of SQL Server, the licensing model you're using,
the OS, etc. You really should verify licensing compliance with a local
Microsoft rep. They can give you the legal answer as opposed to collating a
variety of opinions here.
http://www.aspfaq.com/
(Reverse address to reply.)|||It is poor design IMO, but I have to live with it. On the matter of the mult
iple instances, what is meant by 'instance'? multiple installations? multipl
e 'spawnings' of SQL Server under a parent 'SQL Server manager-like' server
process? does it end up loo
king like multiple servers systems each running a SQL Server, each with diff
erent names, data paths, etc, but actually all running on the same server sy
stem?
John
"Eric Sabine" wrote:
> I believe Standard edition is licensed per instance but Enterprise Edition
> can be installed with multiple instances on a server. It's best to check
> the EULA to be totally certain though. But having to buy one new copy of
SE
> could be worth looking at why this very odd requirement was "assumed" in t
he
> application's design IMO.
> hth
> Eric
> John wrote:
>
>|||Think of an instance of how many times you ran setup.exe through completion
of the wizard. Every instance after the default (if the default is taken
at first install) has the name of the server _and_ instance name as the name
of the sql server itself.
John wrote:[vbcol=seagreen]
> It is poor design IMO, but I have to live with it. On the matter of
> the multiple instances, what is meant by 'instance'? multiple
> installations? multiple 'spawnings' of SQL Server under a parent 'SQL
> Server manager-like' server process? does it end up looking like
> multiple servers systems each running a SQL Server, each with
> different names, data paths, etc, but actually all running on the
> same server system?
> John
> "Eric Sabine" wrote:
>
'Instances' of SQL Server 2000?
How does this work? Do I install SQL Server multiple times in different locations, or is it simply a defined thing in SQL Server? Is there a 'per instance' licensing issue, or will my one SQL Server license cover the multiple instances of SQL Server on on
e server system?
Thanks,
John
I believe Standard edition is licensed per instance but Enterprise Edition
can be installed with multiple instances on a server. It's best to check
the EULA to be totally certain though. But having to buy one new copy of SE
could be worth looking at why this very odd requirement was "assumed" in the
application's design IMO.
hth
Eric
John wrote:
> Our application requires multiple instances of SQL Server 2000 in
> order to have multiple databases, which the app clients use. Has
> something to do with the name of the SQL Server instance; each
> instance needs to be named differently.
> How does this work? Do I install SQL Server multiple times in
> different locations, or is it simply a defined thing in SQL Server?
> Is there a 'per instance' licensing issue, or will my one SQL Server
> license cover the multiple instances of SQL Server on one server
> system?
> Thanks,
> John
|||> Our application requires multiple instances of SQL Server 2000 in order to
have multiple databases
That's the part I don't get. Why can't the application use multiple
databases in a single instance?
> How does this work? Do I install SQL Server multiple times in different
locations
For multiple instances, yes.
> Is there a 'per instance' licensing issue
Depending on the edition of SQL Server, the licensing model you're using,
the OS, etc. You really should verify licensing compliance with a local
Microsoft rep. They can give you the legal answer as opposed to collating a
variety of opinions here.
http://www.aspfaq.com/
(Reverse address to reply.)
|||It is poor design IMO, but I have to live with it. On the matter of the multiple instances, what is meant by 'instance'? multiple installations? multiple 'spawnings' of SQL Server under a parent 'SQL Server manager-like' server process? does it end up loo
king like multiple servers systems each running a SQL Server, each with different names, data paths, etc, but actually all running on the same server system?
John
"Eric Sabine" wrote:
> I believe Standard edition is licensed per instance but Enterprise Edition
> can be installed with multiple instances on a server. It's best to check
> the EULA to be totally certain though. But having to buy one new copy of SE
> could be worth looking at why this very odd requirement was "assumed" in the
> application's design IMO.
> hth
> Eric
> John wrote:
>
>
|||Think of an instance of how many times you ran setup.exe through completion
of the wizard. Every instance after the default (if the default is taken
at first install) has the name of the server _and_ instance name as the name
of the sql server itself.
John wrote:[vbcol=seagreen]
> It is poor design IMO, but I have to live with it. On the matter of
> the multiple instances, what is meant by 'instance'? multiple
> installations? multiple 'spawnings' of SQL Server under a parent 'SQL
> Server manager-like' server process? does it end up looking like
> multiple servers systems each running a SQL Server, each with
> different names, data paths, etc, but actually all running on the
> same server system?
> John
> "Eric Sabine" wrote:
sql
Instance caching without default parameter values
must have default values in order to configure instance caching. Is there
any truth to this? I don't see anything of this kind in BOL.
We actually get rsProcessAborted errors if they don't have defaults (even
though reports only execute when all parameters are provided.)
--
Paul Turley, MCSD, MCDBA, MSF, MCT
nospam at scout-master.comThis might help someone figure it out. It looks like a Reporting Services
issue to me...I'm the DBA ;)
----
--
Start snippet from Report_Server.log
----
--
aspnet_wp!processing!eec!4/26/2005-16:51:08:: e ERROR: An exception has
occurred in data source 'AGG'. Details: System.IndexOutOfRangeException:
Index was outside the bounds of the array.
at
Microsoft.ReportingServices.Library.IndexedStreamHeader.get_LastUncompressed
Offset()
at
Microsoft.ReportingServices.Library.BufferedCompressedReadStream.get_Interna
lUncompressedLength()
at
Microsoft.ReportingServices.Library.BufferedCompressedReadStream.FillBuffer(
)
at
Microsoft.ReportingServices.Library.BufferedCompressedReadStream..ctor(Strea
m store)
at
Microsoft.ReportingServices.Library.SnapshotChunkStreamFactory.CreateReadStr
eam(Guid snapshotDataID, Boolean isPermanentSnapshot, String chunkName,
Int32 chunkType, String& mimeType)
at
Microsoft.ReportingServices.Library.ReportSnapshot.GetReportChunk(String
name, ReportChunkTypes type, String& mimeType)
at Microsoft.ReportingServices.ReportProcessing.b..ctor(DataSet A_0,
Int32 A_1, UInt32 A_2, GetReportChunk A_3)
at Microsoft.ReportingServices.ReportProcessing.g..ctor(DataSet A_0,
Int32 A_1, UInt32 A_2, GetReportChunk A_3)
at Microsoft.ReportingServices.ReportProcessing.aw.c()
at Microsoft.ReportingServices.ReportProcessing.a0.a(Boolean& A_0)
at Microsoft.ReportingServices.ReportProcessing.aw.b()
at Microsoft.ReportingServices.ReportProcessing.a0.a(Object A_0)
aspnet_wp!processing!d20!4/26/2005-16:51:08:: e ERROR: An exception has
occurred in data source 'AGG2'. Details: System.IndexOutOfRangeException:
Index was outside the bounds of the array.
at
Microsoft.ReportingServices.Library.IndexedStreamHeader.get_LastUncompressed
Offset()
at
Microsoft.ReportingServices.Library.BufferedCompressedReadStream.get_Interna
lUncompressedLength()
at
Microsoft.ReportingServices.Library.BufferedCompressedReadStream.FillBuffer(
)
at
Microsoft.ReportingServices.Library.BufferedCompressedReadStream..ctor(Strea
m store)
at
Microsoft.ReportingServices.Library.SnapshotChunkStreamFactory.CreateReadStr
eam(Guid snapshotDataID, Boolean isPermanentSnapshot, String chunkName,
Int32 chunkType, String& mimeType)
at
Microsoft.ReportingServices.Library.ReportSnapshot.GetReportChunk(String
name, ReportChunkTypes type, String& mimeType)
at Microsoft.ReportingServices.ReportProcessing.b..ctor(DataSet A_0,
Int32 A_1, UInt32 A_2, GetReportChunk A_3)
at Microsoft.ReportingServices.ReportProcessing.g..ctor(DataSet A_0,
Int32 A_1, UInt32 A_2, GetReportChunk A_3)
at Microsoft.ReportingServices.ReportProcessing.aw.c()
at Microsoft.ReportingServices.ReportProcessing.a0.a(Boolean& A_0)
at Microsoft.ReportingServices.ReportProcessing.aw.b()
at Microsoft.ReportingServices.ReportProcessing.a0.a(Object A_0)
aspnet_wp!processing!eec!4/26/2005-16:51:08:: e ERROR: An exception has
occurred. Trying to abort processing. Details:
System.IndexOutOfRangeException: Index was outside the bounds of the array.
at
Microsoft.ReportingServices.Library.IndexedStreamHeader.get_LastUncompressed
Offset()
at
Microsoft.ReportingServices.Library.BufferedCompressedReadStream.get_Interna
lUncompressedLength()
at
Microsoft.ReportingServices.Library.BufferedCompressedReadStream.FillBuffer(
)
at
Microsoft.ReportingServices.Library.BufferedCompressedReadStream..ctor(Strea
m store)
at
Microsoft.ReportingServices.Library.SnapshotChunkStreamFactory.CreateReadStr
eam(Guid snapshotDataID, Boolean isPermanentSnapshot, String chunkName,
Int32 chunkType, String& mimeType)
at
Microsoft.ReportingServices.Library.ReportSnapshot.GetReportChunk(String
name, ReportChunkTypes type, String& mimeType)
at Microsoft.ReportingServices.ReportProcessing.b..ctor(DataSet A_0,
Int32 A_1, UInt32 A_2, GetReportChunk A_3)
at Microsoft.ReportingServices.ReportProcessing.g..ctor(DataSet A_0,
Int32 A_1, UInt32 A_2, GetReportChunk A_3)
at Microsoft.ReportingServices.ReportProcessing.aw.c()
at Microsoft.ReportingServices.ReportProcessing.a0.a(Boolean& A_0)
at Microsoft.ReportingServices.ReportProcessing.aw.b()
at Microsoft.ReportingServices.ReportProcessing.a0.a(Object A_0)
aspnet_wp!processing!d20!4/26/2005-16:51:08:: e ERROR: An exception has
occurred. Trying to abort processing. Details:
System.IndexOutOfRangeException: Index was outside the bounds of the array.
at
Microsoft.ReportingServices.Library.IndexedStreamHeader.get_LastUncompressed
Offset()
at
Microsoft.ReportingServices.Library.BufferedCompressedReadStream.get_Interna
lUncompressedLength()
at
Microsoft.ReportingServices.Library.BufferedCompressedReadStream.FillBuffer(
)
at
Microsoft.ReportingServices.Library.BufferedCompressedReadStream..ctor(Strea
m store)
at
Microsoft.ReportingServices.Library.SnapshotChunkStreamFactory.CreateReadStr
eam(Guid snapshotDataID, Boolean isPermanentSnapshot, String chunkName,
Int32 chunkType, String& mimeType)
at
Microsoft.ReportingServices.Library.ReportSnapshot.GetReportChunk(String
name, ReportChunkTypes type, String& mimeType)
at Microsoft.ReportingServices.ReportProcessing.b..ctor(DataSet A_0,
Int32 A_1, UInt32 A_2, GetReportChunk A_3)
at Microsoft.ReportingServices.ReportProcessing.g..ctor(DataSet A_0,
Int32 A_1, UInt32 A_2, GetReportChunk A_3)
at Microsoft.ReportingServices.ReportProcessing.aw.c()
at Microsoft.ReportingServices.ReportProcessing.a0.a(Boolean& A_0)
at Microsoft.ReportingServices.ReportProcessing.aw.b()
at Microsoft.ReportingServices.ReportProcessing.a0.a(Object A_0)
aspnet_wp!processing!eec!4/26/2005-16:51:08:: i INFO: Merge abort handler
called. Aborting data sources ...
aspnet_wp!processing!eec!4/26/2005-16:51:08:: i INFO: Data source
'Staging_xxxxxx_Reader': Abort handler called. CanAbort = True.
aspnet_wp!processing!d20!4/26/2005-16:51:08:: i INFO: Some other thread is
aborting processing.
aspnet_wp!processing!eec!4/26/2005-16:51:08:: i INFO: Abort callback
successful.
aspnet_wp!processing!d20!4/26/2005-16:51:08:: e ERROR: Throwing
Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: An
error has occurred during report processing., ;
Info:
Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: An
error has occurred during report processing. -->
System.IndexOutOfRangeException: Index was outside the bounds of the array.
at
Microsoft.ReportingServices.Library.IndexedStreamHeader.get_LastUncompressed
Offset()
at
Microsoft.ReportingServices.Library.BufferedCompressedReadStream.get_Interna
lUncompressedLength()
at
Microsoft.ReportingServices.Library.BufferedCompressedReadStream.FillBuffer(
)
at
Microsoft.ReportingServices.Library.BufferedCompressedReadStream..ctor(Strea
m store)
at
Microsoft.ReportingServices.Library.SnapshotChunkStreamFactory.CreateReadStr
eam(Guid snapshotDataID, Boolean isPermanentSnapshot, String chunkName,
Int32 chunkType, String& mimeType)
at
Microsoft.ReportingServices.Library.ReportSnapshot.GetReportChunk(String
name, ReportChunkTypes type, String& mimeType)
at Microsoft.ReportingServices.ReportProcessing.b..ctor(DataSet A_0,
Int32 A_1, UInt32 A_2, GetReportChunk A_3)
at Microsoft.ReportingServices.ReportProcessing.g..ctor(DataSet A_0,
Int32 A_1, UInt32 A_2, GetReportChunk A_3)
at Microsoft.ReportingServices.ReportProcessing.aw.c()
at Microsoft.ReportingServices.ReportProcessing.a0.a(Boolean& A_0)
at Microsoft.ReportingServices.ReportProcessing.aw.b()
at Microsoft.ReportingServices.ReportProcessing.a0.a(Object A_0)
-- End of inner exception stack trace --
aspnet_wp!processing!d20!4/26/2005-16:51:08:: e ERROR: Data source
'Staging_xxxxxx_Reader': An error has occurred. Details:
Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: An
error has occurred during report processing. -->
System.IndexOutOfRangeException: Index was outside the bounds of the array.
aspnet_wp!processing!d20!4/26/2005-16:51:08:: w WARN: Data source
'Staging_xxxxxx_Reader': Report processing has been aborted.
aspnet_wp!processing!d20!4/26/2005-16:51:08:: e ERROR: Throwing
Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: An
error has occurred during report processing., ;
Info:
Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: An
error has occurred during report processing. -->
System.IndexOutOfRangeException: Index was outside the bounds of the array.
at
Microsoft.ReportingServices.Library.IndexedStreamHeader.get_LastUncompressed
Offset()
at
Microsoft.ReportingServices.Library.BufferedCompressedReadStream.get_Interna
lUncompressedLength()
at
Microsoft.ReportingServices.Library.BufferedCompressedReadStream.FillBuffer(
)
at
Microsoft.ReportingServices.Library.BufferedCompressedReadStream..ctor(Strea
m store)
at
Microsoft.ReportingServices.Library.SnapshotChunkStreamFactory.CreateReadStr
eam(Guid snapshotDataID, Boolean isPermanentSnapshot, String chunkName,
Int32 chunkType, String& mimeType)
at
Microsoft.ReportingServices.Library.ReportSnapshot.GetReportChunk(String
name, ReportChunkTypes type, String& mimeType)
at Microsoft.ReportingServices.ReportProcessing.b..ctor(DataSet A_0,
Int32 A_1, UInt32 A_2, GetReportChunk A_3)
at Microsoft.ReportingServices.ReportProcessing.g..ctor(DataSet A_0,
Int32 A_1, UInt32 A_2, GetReportChunk A_3)
at Microsoft.ReportingServices.ReportProcessing.aw.c()
at Microsoft.ReportingServices.ReportProcessing.a0.a(Boolean& A_0)
at Microsoft.ReportingServices.ReportProcessing.aw.b()
at Microsoft.ReportingServices.ReportProcessing.a0.a(Object A_0)
-- End of inner exception stack trace --
aspnet_wp!library!d20!04/26/2005-16:51:08:: i INFO: Initializing
EnableExecutionLogging to 'True' as specified in Server system properties.
aspnet_wp!webserver!d20!04/26/2005-16:51:08:: e ERROR: Reporting Services
error Microsoft.ReportingServices.Diagnostics.Utilities.RSException: An
error has occurred during report processing. -->
Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: An
error has occurred during report processing. -->
System.IndexOutOfRangeException: Index was outside the bounds of the array.
----
--
End snippet from Report_Server.log
----
--
-- HTH
Regards,
Don R. Watters
Walt Disney Internet Group
"Paul Turley" <nospam@.turleyfamily_dot_org> wrote in message
news:ONjOkApSFHA.3184@.TK2MSFTNGP14.phx.gbl...
> I am working with a well-studied DBA who claims that all report parameters
> must have default values in order to configure instance caching. Is there
> any truth to this? I don't see anything of this kind in BOL.
> We actually get rsProcessAborted errors if they don't have defaults (even
> though reports only execute when all parameters are provided.)
> --
> Paul Turley, MCSD, MCDBA, MSF, MCT
> nospam at scout-master.com
>|||As for the first part, no, the cache is based on a combination of report,
credentials, and parameter values. As for the second one, I don't know what
specific error you are getting.
--
Brian Welcker
Group Program Manager
Microsoft SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Paul Turley" <nospam@.turleyfamily_dot_org> wrote in message
news:ONjOkApSFHA.3184@.TK2MSFTNGP14.phx.gbl...
>I am working with a well-studied DBA who claims that all report parameters
>must have default values in order to configure instance caching. Is there
>any truth to this? I don't see anything of this kind in BOL.
> We actually get rsProcessAborted errors if they don't have defaults (even
> though reports only execute when all parameters are provided.)
> --
> Paul Turley, MCSD, MCDBA, MSF, MCT
> nospam at scout-master.com
>|||The specific error is in my other post, on Paul's main thread.
-- Don
"Brian Welcker [MSFT]" <bwelcker@.online.microsoft.com> wrote in message
news:%235mdZw6SFHA.616@.TK2MSFTNGP12.phx.gbl...
> As for the first part, no, the cache is based on a combination of report,
> credentials, and parameter values. As for the second one, I don't know
what
> specific error you are getting.
> --
> Brian Welcker
> Group Program Manager
> Microsoft SQL Server Reporting Services
> This posting is provided "AS IS" with no warranties, and confers no
rights.
> "Paul Turley" <nospam@.turleyfamily_dot_org> wrote in message
> news:ONjOkApSFHA.3184@.TK2MSFTNGP14.phx.gbl...
> >I am working with a well-studied DBA who claims that all report
parameters
> >must have default values in order to configure instance caching. Is
there
> >any truth to this? I don't see anything of this kind in BOL.
> >
> > We actually get rsProcessAborted errors if they don't have defaults
(even
> > though reports only execute when all parameters are provided.)
> >
> > --
> > Paul Turley, MCSD, MCDBA, MSF, MCT
> > nospam at scout-master.com
> >
>|||Try refreshing your dataset and deleting and readding the dataset to your
table.
"Paul Turley" wrote:
> I am working with a well-studied DBA who claims that all report parameters
> must have default values in order to configure instance caching. Is there
> any truth to this? I don't see anything of this kind in BOL.
> We actually get rsProcessAborted errors if they don't have defaults (even
> though reports only execute when all parameters are provided.)
> --
> Paul Turley, MCSD, MCDBA, MSF, MCT
> nospam at scout-master.com
>
>
Monday, March 12, 2012
Integrated security
If one connects to sql server (2005) with integrated security, does sql server connects to ADS in order to verify credentials or does windows handle the authentification mechanism ?
Thanks.
I found the answer: windows is responsible for dealing with authentication in this case
integer variable usage in sqlStatement expression
I have an integer variable which i had to cast as a string in order for it to show as an integer in the sql expression which is a string in order for it to INSERT as an integer? Read that 5 times fast!!!
"INSERT INTO Table( SourceFileName, ProcessStartTime, ProcessEndTime, Processed, RowCountFlatFile, RowCountCleanInsert, RowCountDataConversionErrors, RowCountPKViolation, RowCountDuplicateInvoiceIDInSourceFile, RowCountISNULLCase1, RowCountISNULLCase2, RowCountConditionalSplit)
VALUES( '"+ @.[User:aymentFileName] +"',
'"+ (DT_STR, 20, 1252)@.[System:tartTime]+ "',
'"+ (DT_STR, 20, 1252)@.[System:tartTime]+ "',
1,
"+(DT_STR, 4, 1252)@.[User::rcSourceFile]+",
"+(DT_STR, 4, 1252)@.[User::rcCleanInserts]+",
"+(DT_STR, 4, 1252)@.[User::rcDataConversionErrors]+",
"+(DT_STR, 4, 1252)@.[User::rcPKViolation]+",
"+(DT_STR, 4, 1252)@.[User::rcExistingInvoiceID]+",
"+(DT_STR, 4, 1252)@.[User::rcISNULLCase1] +",
"+(DT_STR, 4, 1252)@.[User::rcISNULLCase2] +",
"+(DT_STR, 4, 1252)@.[User::rcConditionalSplitErrors]+"
)"
all the variable beginning with rc are Int32 variables being loaded using the Row Count task. they are being inserted into an integer field in the table. Is this whack or what?
I was trying to cast is using DT_I4 but couldn't find any samples nor could I get it to work. The above is successful!!!
jpsR1 wrote:
I have an integer variable which i had to cast as a string in order for it to show as an integer in the sql expression which is a string in order for it to INSERT as an integer? Read that 5 times fast!!!
"INSERT INTO Table( SourceFileName, ProcessStartTime, ProcessEndTime, Processed, RowCountFlatFile, RowCountCleanInsert, RowCountDataConversionErrors, RowCountPKViolation, RowCountDuplicateInvoiceIDInSourceFile, RowCountISNULLCase1, RowCountISNULLCase2, RowCountConditionalSplit)
VALUES( '"+ @.[User:aymentFileName] +"',
'"+ (DT_STR, 20, 1252)@.[System:tartTime]+ "',
'"+ (DT_STR, 20, 1252)@.[System:tartTime]+ "',
1,
"+(DT_STR, 4, 1252)@.[User::rcSourceFile]+",
"+(DT_STR, 4, 1252)@.[User::rcCleanInserts]+",
"+(DT_STR, 4, 1252)@.[User::rcDataConversionErrors]+",
"+(DT_STR, 4, 1252)@.[User::rcPKViolation]+",
"+(DT_STR, 4, 1252)@.[User::rcExistingInvoiceID]+",
"+(DT_STR, 4, 1252)@.[User::rcISNULLCase1] +",
"+(DT_STR, 4, 1252)@.[User::rcISNULLCase2] +",
"+(DT_STR, 4, 1252)@.[User::rcConditionalSplitErrors]+"
)"all the variable beginning with rc are Int32 variables being loaded using the Row Count task. they are being inserted into an integer field in the table. Is this whack or what?
I was trying to cast is using DT_I4 but couldn't find any samples nor could I get it to work. The above is successful!!!
So, what is your problem?
The expression looks right and makes sense. The expression is treated as an string; so yes, you have to cast all non-string variables to string in order to be used in the expression.
|||Right, well, you can't concatenate (a string operator) a string with an integer data type. So what you've done is correct.|||You can save some keystrokes by casting to (DT_WSTR,length) instead, though.|||It's a little confusing i have an Integer stored in a Package Variable set as an Int32 that I have to type cast as a string in order to show as an integer? Is it only me that sees this as whacky?|||This would be more intuitive:
"INSERT INTO Table( SourceFileName, ProcessStartTime, ProcessEndTime, Processed, RowCountFlatFile, RowCountCleanInsert, RowCountDataConversionErrors, RowCountPKViolation, RowCountDuplicateInvoiceIDInSourceFile, RowCountISNULLCase1, RowCountISNULLCase2, RowCountConditionalSplit)
VALUES( '"+ @.[User:aymentFileName] +"',
'"+ (DT_STR, 20, 1252)@.[System:tartTime]+ "',
'"+ (DT_STR, 20, 1252)@.[System:tartTime]+ "',
1,
"+@.[User::rcSourceFile]+",
"+@.[User::rcCleanInserts]+",
"+@.[User::rcDataConversionErrors]+",
"+@.[User::rcPKViolation]+",
"+@.[User::rcExistingInvoiceID]+",
"+@.[User::rcISNULLCase1] +",
"+@.[User::rcISNULLCase2] +",
"+@.[User::rcConditionalSplitErrors]+"
)"
jpsR1 wrote:
It's a little confusing i have an Integer stored in a Package Variable set as an Int32 that I have to type cast as a string in order to show as an integer? Is it only me that sees this as whacky?
But you can't concatenate an integer to a string. It has nothing to do with SSIS. It's an integer. You're trying to concatenate. Integers can't be concatenated. End result: you have to cast your integers to strings.|||
Why do you think I'm trying to concatenate an integer?
I have stored a row count (an integer) in a package variable(an integer) and am trying to INSERT this integer value into an integer column in a table.
|||
jpsR1 wrote:
Why do you think I'm trying to concatenate an integer?
I have stored a row count (an integer) in a package variable(an integer) and am trying to INSERT this integer value into an integer column in a table.
What do you think the "+" symbol means when you are assembling your SQL statement?|||
jpsR1 wrote:
Why do you think I'm trying to concatenate an integer?
I have stored a row count (an integer) in a package variable(an integer) and am trying to INSERT this integer value into an integer column in a table.
You are right; the column in the table and the variable are integer; BUT the expression property of an SSIS object expects an string value; hence everything on it has to be an string.
|||
jpsR1 wrote:
Why do you think I'm trying to concatenate an integer?
I have stored a row count (an integer) in a package variable(an integer) and am trying to INSERT this integer value into an integer column in a table.
Maybe this will help explain it:
You are assembling a string (the INSERT statement). If you go into SSMS, open a query editor, and type
Code Snippet
SELECT 'INSERT INTO TestTable VALUES(' + 1 +')'
you will get an error back because SQL Server can't add an integer to a string. The "+" has two functions. For numbers it is used for addition. For strings, it is used for concatenation. If you include a number and a string in the same expression, SSIS (and SQL Server, and most other programming tools) throws an error because you are doing something ambiguous. Do you want to concatenate, or do you want to add? The tools could guess (like VB 1 - 6) and implicitly convert the numbers to string values, but this is generally accepted as a bad practice, as it leads to bugs and unclear code. Instead, most newer development tools don't do implicit conversions (or at least have it disabled by default).