Monday, March 19, 2012
details on Linked server?
Any one know about Linked server setup in sql server.
I want to know more detail on setting up a sqlserver to connect it directly
to an oracle server. So that I can directly access data's from Oracle using
Stored procedure.
Regards,
Sasikumar Balasubramanian
Hi
See reply to later post..
John
"sasikumar" wrote:
> Hi,
> Any one know about Linked server setup in sql server.
> I want to know more detail on setting up a sqlserver to connect it directly
> to an oracle server. So that I can directly access data's from Oracle using
> Stored procedure.
>
> Regards,
> Sasikumar Balasubramanian
>
>
details on Linked server?
Any one know about Linked server setup in sql server.
I want to know more detail on setting up a sqlserver to connect it directly
to an oracle server. So that I can directly access data's from Oracle using
Stored procedure.
Regards,
Sasikumar BalasubramanianHi
See reply to later post..
John
"sasikumar" wrote:
> Hi,
> Any one know about Linked server setup in sql server.
> I want to know more detail on setting up a sqlserver to connect it directly
> to an oracle server. So that I can directly access data's from Oracle using
> Stored procedure.
>
> Regards,
> Sasikumar Balasubramanian
>
>
details on Linked server?
Any one know about Linked server setup in sql server.
I want to know more detail on setting up a sqlserver to connect it directly
to an oracle server. So that I can directly access data's from Oracle using
Stored procedure.
Regards,
Sasikumar BalasubramanianHi
See reply to later post..
John
"sasikumar" wrote:
> Hi,
> Any one know about Linked server setup in sql server.
> I want to know more detail on setting up a sqlserver to connect it directl
y
> to an oracle server. So that I can directly access data's from Oracle usin
g
> Stored procedure.
>
> Regards,
> Sasikumar Balasubramanian
>
>
details on Linked server setup
Any one know about Linked server setup in sql server.
I want to know more detail on setting up a sqlserver to connect it directly
to an oracle server. So that I can directly access data's from Oracle using
Stored procedure.
Regards,
Sasikumar Balasubramanian
Hi
There is an example using the Microsoft Driver in sp_addlinked server
http://msdn.microsoft.com/library/de...adda_8gqa.asp.
Depending on the driver you are using you may also need to install SQL*NET
etc..
This article gives the steps required:
http://support.microsoft.com/default...b;en-us;280106
Oracle OLEDB drivers can be found at
http://www.oracle.com/technology/sof..._db/index.html
John
"sasikumar" wrote:
> Hi,
> Any one know about Linked server setup in sql server.
> I want to know more detail on setting up a sqlserver to connect it directly
> to an oracle server. So that I can directly access data's from Oracle using
> Stored procedure.
>
> Regards,
> Sasikumar Balasubramanian
>
>
details on Linked server setup
Any one know about Linked server setup in sql server.
I want to know more detail on setting up a sqlserver to connect it directly
to an oracle server. So that I can directly access data's from Oracle using
Stored procedure.
Regards,
Sasikumar BalasubramanianHi
There is an example using the Microsoft Driver in sp_addlinked server
a_8gqa.asp." target="_blank">http://msdn.microsoft.com/library/d.../>
a_8gqa.asp.
Depending on the driver you are using you may also need to install SQL*NET
etc..
This article gives the steps required:
http://support.microsoft.com/defaul...kb;en-us;280106
Oracle OLEDB drivers can be found at
http://www.oracle.com/technology/so...e_db/index.html
John
"sasikumar" wrote:
> Hi,
> Any one know about Linked server setup in sql server.
> I want to know more detail on setting up a sqlserver to connect it directl
y
> to an oracle server. So that I can directly access data's from Oracle usin
g
> Stored procedure.
>
> Regards,
> Sasikumar Balasubramanian
>
>
details on Linked server setup
Any one know about Linked server setup in sql server.
I want to know more detail on setting up a sqlserver to connect it directly
to an oracle server. So that I can directly access data's from Oracle using
Stored procedure.
Regards,
Sasikumar BalasubramanianHi
There is an example using the Microsoft Driver in sp_addlinked server
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_sp_adda_8gqa.asp.
Depending on the driver you are using you may also need to install SQL*NET
etc..
This article gives the steps required:
http://support.microsoft.com/default.aspx?scid=kb;en-us;280106
Oracle OLEDB drivers can be found at
http://www.oracle.com/technology/software/tech/windows/ole_db/index.html
John
"sasikumar" wrote:
> Hi,
> Any one know about Linked server setup in sql server.
> I want to know more detail on setting up a sqlserver to connect it directly
> to an oracle server. So that I can directly access data's from Oracle using
> Stored procedure.
>
> Regards,
> Sasikumar Balasubramanian
>
>
Details on Linked server
Any one know about Linked server setup in sql server.
I want to know more detail on setting up a sqlserver to connect it directly
to an oracle server. So that I can directly access data's from Oracle using
Stored procedure.
Regards,
Sasikumar Balasubramanianhttp://msdn.microsoft.com/library/d... />
a_8gqa.asp
There's an example there on how to create a link to an Oracle server.
ML
http://milambda.blogspot.com/
Details Grouping
Can a table have more then one detail group? I need 4 detail groups show from a parent group. They all come from the same query dataset. Or is the a better way to do this?
Thanks
You can't have multiple detail groups in a table. However, you can add more rows for the parent group. Then in each of the rows, add a nested table/list to show the details.Detailed error reporting. How to?
The best I can get out of my detail log is this which is no help. How do I find out what really happened. My windows app log is no help either
Date 5/24/2006 9:51:41 PM
Log Job History (DTS_xx)
Step ID 1
Server xx
Job Name DTS_xx
Step Name DTS_xx
Duration 00:00:01
Sql Severity 0
Sql Message ID 0
Operator Emailed
Operator Net sent
Operator Paged
Retries Attempted 0
Message
Executed as user: xx\administrator. The package execution failed. The step failed.
http://support.microsoft.com/kb/918760|||
Michael - I'm glad your online right now. All that I'm trying to do is run stored procs on my database. My ssis package uses the correct login but I keep getting the error I posted. This was running fine on my 2000 box.
So I tried a few other things. I recreated the package on my production server and it works. Seems to be the problem is when I move it from my dev box to production its loosing something.
detail view
Details" is there a way to make it open in summary instead of detail?
Thanks!
GlenOnce you have clicked on Hide Details you should not see details the next
time you login. Is that not happening for you?
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Glen Tosco" <glen@.delnat.com> wrote in message
news:eo1RFJXYFHA.3220@.TK2MSFTNGP14.phx.gbl...
> When opening an RS folder in IE 6 I get a Detail View and must click "Hide
> Details" is there a way to make it open in summary instead of detail?
>
> Thanks!
> Glen
>|||No, it always opens on detail.
"Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
news:%23OhhUaXYFHA.3184@.TK2MSFTNGP15.phx.gbl...
> Once you have clicked on Hide Details you should not see details the next
> time you login. Is that not happening for you?
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Glen Tosco" <glen@.delnat.com> wrote in message
> news:eo1RFJXYFHA.3220@.TK2MSFTNGP14.phx.gbl...
>> When opening an RS folder in IE 6 I get a Detail View and must click
>> "Hide Details" is there a way to make it open in summary instead of
>> detail?
>>
>> Thanks!
>> Glen
>|||Is your site setup of anonymous access?
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Glen Tosco" <glen@.delnat.com> wrote in message
news:%23CT$RngZFHA.3984@.TK2MSFTNGP10.phx.gbl...
> No, it always opens on detail.
>
> "Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
> news:%23OhhUaXYFHA.3184@.TK2MSFTNGP15.phx.gbl...
>> Once you have clicked on Hide Details you should not see details the next
>> time you login. Is that not happening for you?
>>
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>> "Glen Tosco" <glen@.delnat.com> wrote in message
>> news:eo1RFJXYFHA.3220@.TK2MSFTNGP14.phx.gbl...
>> When opening an RS folder in IE 6 I get a Detail View and must click
>> "Hide Details" is there a way to make it open in summary instead of
>> detail?
>>
>> Thanks!
>> Glen
>>
>|||No...
"Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
news:uxB4U2hZFHA.2128@.TK2MSFTNGP14.phx.gbl...
> Is your site setup of anonymous access?
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Glen Tosco" <glen@.delnat.com> wrote in message
> news:%23CT$RngZFHA.3984@.TK2MSFTNGP10.phx.gbl...
>> No, it always opens on detail.
>>
>> "Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
>> news:%23OhhUaXYFHA.3184@.TK2MSFTNGP15.phx.gbl...
>> Once you have clicked on Hide Details you should not see details the
>> next time you login. Is that not happening for you?
>>
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>> "Glen Tosco" <glen@.delnat.com> wrote in message
>> news:eo1RFJXYFHA.3220@.TK2MSFTNGP14.phx.gbl...
>> When opening an RS folder in IE 6 I get a Detail View and must click
>> "Hide Details" is there a way to make it open in summary instead of
>> detail?
>>
>> Thanks!
>> Glen
>>
>>
>|||I don't have any suggestions. This is very odd. I have never seen anyone
post with this problem before.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Glen Tosco" <glen@.delnat.com> wrote in message
news:uxob8tkZFHA.1152@.tk2msftngp13.phx.gbl...
> No...
> "Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
> news:uxB4U2hZFHA.2128@.TK2MSFTNGP14.phx.gbl...
>> Is your site setup of anonymous access?
>>
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>> "Glen Tosco" <glen@.delnat.com> wrote in message
>> news:%23CT$RngZFHA.3984@.TK2MSFTNGP10.phx.gbl...
>> No, it always opens on detail.
>>
>> "Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
>> news:%23OhhUaXYFHA.3184@.TK2MSFTNGP15.phx.gbl...
>> Once you have clicked on Hide Details you should not see details the
>> next time you login. Is that not happening for you?
>>
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>> "Glen Tosco" <glen@.delnat.com> wrote in message
>> news:eo1RFJXYFHA.3220@.TK2MSFTNGP14.phx.gbl...
>> When opening an RS folder in IE 6 I get a Detail View and must click
>> "Hide Details" is there a way to make it open in summary instead of
>> detail?
>>
>> Thanks!
>> Glen
>>
>>
>>
>|||Hi Glen,
Is it possible for you to generate a sample rdl file and send it to me? The
sample rdl file is recommanded using defalut database (such as Northwind or
Foodmart?) I understand the information may be sensitive to you, my direct
email address is v-mingqc@.online.microsoft.com (note that "online" is only
for SPAM, remove it before you click SEND), you may send the file to me
directly and I will keep secure.
Sincerely yours,
Michael Cheng
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=====================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Detail Section printing 18 times
Apologies if its a stupid question but this is my very 1st report - a sales invoice.
I have a detail section - limited by parameter to sales invoice number. When it prints the detail section is repeated 18 times. Ive checked the database there is only 1 record with this invoice number.
Any idea where I should start looking? As this is my 1st report there really isn't anything fancy going on.
Thanks for any help
Beckicheck if u have created any groups|||Also check the relationships between the tables used in the report.|||Thanks for your help.
I turned out that the link I had inserted wasn't completely unique and attracted too many records.
Regards
Becki
Detail Section Limit Records
I have limited my detail section output to print 20 records per page, but if have total of 108 records ,First 100 records are printing 5 pages and the 6 thpage prints 8 records .
I want that the 6 th page to print 8 records , plus 12 lines filled with dashes (---).Making the page to appear having 20 lines .
Can anybody help
thanks
ShaliniI had resolved something like that by modifying the data source, I mean, generating the extra lines when writing the output file
Detail row doesn't repeat!
I created another report with same exact query and it shows all 25.
Thanks,
TrintPlease provide more details than this for us to be able to help you.
--
Cheers,
'(' Jeff A. Stucker
\
Business Intelligence
www.criadvantage.com
---
"trint" <trinity.smith@.gmail.com> wrote in message
news:1105127010.082333.226250@.z14g2000cwz.googlegroups.com...
> How do I set the detail row to show all similar records?
> I created another report with same exact query and it shows all 25.
> Thanks,
> Trint
>|||header --> stufff
details--> one row and should be 25.|||header --> stufff
details--> one row and should be 25.|||Sounds like a developer error to me.
You're obviously not eager to work at explaining your problem. Why should
we work to help you solve it?
--
Cheers,
'(' Jeff A. Stucker
\
Business Intelligence
www.criadvantage.com
---
"trint" <trinity.smith@.gmail.com> wrote in message
news:1105129238.972872.279370@.c13g2000cwb.googlegroups.com...
> header --> stufff
> details--> one row and should be 25.
>|||Ok,
What is required of a 'detail' row to display multiple instances of
records with, let's say '123' as the first similar column...is that a
setting in the layout?
Thanks,
Trint|||The hide duplicates property.
"trint" wrote:
> Ok,
> What is required of a 'detail' row to display multiple instances of
> records with, let's say '123' as the first similar column...is that a
> setting in the layout?
> Thanks,
> Trint
>
detail record header
Hi,
I'm new to SSRS. I was just wondering how do I make the header for a detail record appear once per grouping rather than once per detail record?
Thanks.
Yeah, I'd just not got my grouping setup correctly. Sorted now.Detail needed about varchar
1) Does a varchar(1000) take more storage in the actual database file than a
varchar(500)? (assume each contains a 300 byte string). If not, why wouldn't
I always use varchar(8000)?
2) Does a varchar(10) take more space than a char(10)? (is there overhead
specifying the actual length in varchar?)
3) Are there any performance penalties (and specifically, what are they)
when using varchar instead of char?1. No, no more space. Lazy? Use only the space you need and use the
appropriate column data types and sizes.
2. Yes, every varchar in a table uses an additional 2 bytes to describe the
actual length of the data stored.
3. If you have 10 rows per page with a row size of 500 bytes. And you update
a row where the varchar that used to contain 10 bytes is now 500 bytes, the
whole page has to be re-arranged for this data to fit in. This may even
cause the page to be split and incur a lot of extra IO. SQL always has to
guess how much of the variable space will be used up when it does page
allocations. When a able is created, all the fixed length data types are
stored on the left and all the variable length data types are stored after
that.
Do yourself a favor and create a table with 1'000'000 rows in it, and then
create an index on a varchar column and check the database growth.
Do the same with a properly sized char column and compare the space
requirements of the table. Create clustered and non-clustered indexes.
If you ever want to know how well a system is written, it is easy, look at
the DB. If it is clean and very well though out with appropriate data types,
you generally know the developer knew hat he was doing and took pride in his
work.
Get yourself Kalen Delaney's book "Inside SQL 2000" (MS Press). Once you
read that, you will change your mind how you do DB design.
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Lig Reffej" <Lig Reffej@.discussions.microsoft.com> wrote in message
news:1C986552-89FF-4C3B-912D-9C58C3F6466F@.microsoft.com...
> I'm trying to understand past the basics of varchar...
> 1) Does a varchar(1000) take more storage in the actual database file than
a
> varchar(500)? (assume each contains a 300 byte string). If not, why
wouldn't
> I always use varchar(8000)?
> 2) Does a varchar(10) take more space than a char(10)? (is there overhead
> specifying the actual length in varchar?)
> 3) Are there any performance penalties (and specifically, what are they)
> when using varchar instead of char?
>|||"Mike Epprecht (SQL MVP)" <mike@.epprecht.net> wrote in message
news:%23TvjU4DyEHA.2600@.TK2MSFTNGP09.phx.gbl...
> "Lig Reffej" <Lig Reffej@.discussions.microsoft.com> wrote in message
> news:1C986552-89FF-4C3B-912D-9C58C3F6466F@.microsoft.com...
> > I'm trying to understand past the basics of varchar...
> >
> > 1) Does a varchar(1000) take more storage in the actual database file
than
> a
> > varchar(500)? (assume each contains a 300 byte string). If not, why
> wouldn't
> > I always use varchar(8000)?
> 1. No, no more space. Lazy? Use only the space you need and use the
> appropriate column data types and sizes.
The question is whether varchar(8000) -is- actually the most appropriate. :)
Specifying the length of a character column is in many cases a matter of
predicting the future. E.g. what is the maximum last name that will needed
to be held by this system?
I think Lig's point might be, why try to predict it?|||Mark Wilden wrote:
> "Mike Epprecht (SQL MVP)" <mike@.epprecht.net> wrote in message
> news:%23TvjU4DyEHA.2600@.TK2MSFTNGP09.phx.gbl...
>> "Lig Reffej" <Lig Reffej@.discussions.microsoft.com> wrote in message
>> news:1C986552-89FF-4C3B-912D-9C58C3F6466F@.microsoft.com...
>> I'm trying to understand past the basics of varchar...
>> 1) Does a varchar(1000) take more storage in the actual database
>> file than a varchar(500)? (assume each contains a 300 byte string).
>> If not, why wouldn't I always use varchar(8000)?
>> 1. No, no more space. Lazy? Use only the space you need and use the
>> appropriate column data types and sizes.
> The question is whether varchar(8000) -is- actually the most
> appropriate. :)
> Specifying the length of a character column is in many cases a matter
> of predicting the future. E.g. what is the maximum last name that
> will needed to be held by this system?
> I think Lig's point might be, why try to predict it?
If only because row density is important. If only because you can only
fit 8060 bytes in a row and using a single varchar(8000) leaves 60 bytes
for other data should the column be filled.
If you can't predict the length of a character column with any accuracy,
use text/ntext.
David Gugick
Imceda Software
www.imceda.com|||"Mike Epprecht \(SQL MVP\)" <mike@.epprecht.net> wrote in
news:#TvjU4DyEHA.2600@.TK2MSFTNGP09.phx.gbl:
> 1. No, no more space. Lazy? Use only the space you need and use the
> appropriate column data types and sizes.
> 2. Yes, every varchar in a table uses an additional 2 bytes to
> describe the actual length of the data stored.
Is the additional 2 bytes per row, page, table or what?
> 3. If you have 10 rows per page with a row size of 500 bytes. And you
> update a row where the varchar that used to contain 10 bytes is now
> 500 bytes, the whole page has to be re-arranged for this data to fit
> in. This may even cause the page to be split and incur a lot of extra
> IO. SQL always has to guess how much of the variable space will be
> used up when it does page allocations. When a able is created, all the
> fixed length data types are stored on the left and all the variable
> length data types are stored after that.
> Do yourself a favor and create a table with 1'000'000 rows in it, and
> then create an index on a varchar column and check the database
> growth. Do the same with a properly sized char column and compare the
> space requirements of the table. Create clustered and non-clustered
> indexes.
> If you ever want to know how well a system is written, it is easy,
> look at the DB. If it is clean and very well though out with
> appropriate data types, you generally know the developer knew hat he
> was doing and took pride in his work.
> Get yourself Kalen Delaney's book "Inside SQL 2000" (MS Press). Once
> you read that, you will change your mind how you do DB design.
> Regards
> --
> Mike Epprecht, Microsoft SQL Server MVP
> Zurich, Switzerland|||JTC ^..^ wrote:
> "Mike Epprecht \(SQL MVP\)" <mike@.epprecht.net> wrote in
> news:#TvjU4DyEHA.2600@.TK2MSFTNGP09.phx.gbl:
>> 1. No, no more space. Lazy? Use only the space you need and use the
>> appropriate column data types and sizes.
>> 2. Yes, every varchar in a table uses an additional 2 bytes to
>> describe the actual length of the data stored.
>
> Is the additional 2 bytes per row, page, table or what?
>
Additional 2 for each varchar
--
David Gugick
Imceda Software
www.imceda.com|||Just to be crystal clear on this, a varchar(10) with 10 characters stored
will take 2 more bytes than a char(10). Because the varchar is variable
length, we need to store its length in the record, hence the overhead is per
column.
If the varchar(10) only stores 1 char, then its total size will be 3 bytes,
less than the 10 bytes consumed by the fixed size char(10) - as fixed size
chars are padded up to their declared size always.
Regards.
--
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"David Gugick" <davidg-nospam@.imceda.com> wrote in message
news:OSajStMyEHA.2260@.TK2MSFTNGP15.phx.gbl...
> JTC ^..^ wrote:
> > "Mike Epprecht \(SQL MVP\)" <mike@.epprecht.net> wrote in
> > news:#TvjU4DyEHA.2600@.TK2MSFTNGP09.phx.gbl:
> >
> >> 1. No, no more space. Lazy? Use only the space you need and use the
> >> appropriate column data types and sizes.
> >>
> >> 2. Yes, every varchar in a table uses an additional 2 bytes to
> >> describe the actual length of the data stored.
> >
> >
> >
> > Is the additional 2 bytes per row, page, table or what?
> >
> >
>
> Additional 2 for each varchar
> --
> David Gugick
> Imceda Software
> www.imceda.com|||Paul S Randal [MS] wrote:
> Just to be crystal clear on this, a varchar(10) with 10 characters
> stored will take 2 more bytes than a char(10). Because the varchar is
> variable length, we need to store its length in the record, hence the
> overhead is per column.
> If the varchar(10) only stores 1 char, then its total size will be 3
> bytes, less than the 10 bytes consumed by the fixed size char(10) -
> as fixed size chars are padded up to their declared size always.
> Regards.
I may have mispoken. Since I don't have time right now to dig into the
technical books, I'll leave to another user to post the correct results.
--
David Gugick
Imceda Software
www.imceda.com
Detail needed about varchar
1) Does a varchar(1000) take more storage in the actual database file than a
varchar(500)? (assume each contains a 300 byte string). If not, why wouldn't
I always use varchar(8000)?
2) Does a varchar(10) take more space than a char(10)? (is there overhead
specifying the actual length in varchar?)
3) Are there any performance penalties (and specifically, what are they)
when using varchar instead of char?
1. No, no more space. Lazy? Use only the space you need and use the
appropriate column data types and sizes.
2. Yes, every varchar in a table uses an additional 2 bytes to describe the
actual length of the data stored.
3. If you have 10 rows per page with a row size of 500 bytes. And you update
a row where the varchar that used to contain 10 bytes is now 500 bytes, the
whole page has to be re-arranged for this data to fit in. This may even
cause the page to be split and incur a lot of extra IO. SQL always has to
guess how much of the variable space will be used up when it does page
allocations. When a able is created, all the fixed length data types are
stored on the left and all the variable length data types are stored after
that.
Do yourself a favor and create a table with 1'000'000 rows in it, and then
create an index on a varchar column and check the database growth.
Do the same with a properly sized char column and compare the space
requirements of the table. Create clustered and non-clustered indexes.
If you ever want to know how well a system is written, it is easy, look at
the DB. If it is clean and very well though out with appropriate data types,
you generally know the developer knew hat he was doing and took pride in his
work.
Get yourself Kalen Delaney's book "Inside SQL 2000" (MS Press). Once you
read that, you will change your mind how you do DB design.
Regards
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Lig Reffej" <Lig Reffej@.discussions.microsoft.com> wrote in message
news:1C986552-89FF-4C3B-912D-9C58C3F6466F@.microsoft.com...
> I'm trying to understand past the basics of varchar...
> 1) Does a varchar(1000) take more storage in the actual database file than
a
> varchar(500)? (assume each contains a 300 byte string). If not, why
wouldn't
> I always use varchar(8000)?
> 2) Does a varchar(10) take more space than a char(10)? (is there overhead
> specifying the actual length in varchar?)
> 3) Are there any performance penalties (and specifically, what are they)
> when using varchar instead of char?
>
|||"Mike Epprecht (SQL MVP)" <mike@.epprecht.net> wrote in message
news:%23TvjU4DyEHA.2600@.TK2MSFTNGP09.phx.gbl...
[vbcol=seagreen]
> "Lig Reffej" <Lig Reffej@.discussions.microsoft.com> wrote in message
> news:1C986552-89FF-4C3B-912D-9C58C3F6466F@.microsoft.com...
than[vbcol=seagreen]
> a
> wouldn't
> 1. No, no more space. Lazy? Use only the space you need and use the
> appropriate column data types and sizes.
The question is whether varchar(8000) -is- actually the most appropriate.
Specifying the length of a character column is in many cases a matter of
predicting the future. E.g. what is the maximum last name that will needed
to be held by this system?
I think Lig's point might be, why try to predict it?
|||Mark Wilden wrote:
> "Mike Epprecht (SQL MVP)" <mike@.epprecht.net> wrote in message
> news:%23TvjU4DyEHA.2600@.TK2MSFTNGP09.phx.gbl...
>
> The question is whether varchar(8000) -is- actually the most
> appropriate.
> Specifying the length of a character column is in many cases a matter
> of predicting the future. E.g. what is the maximum last name that
> will needed to be held by this system?
> I think Lig's point might be, why try to predict it?
If only because row density is important. If only because you can only
fit 8060 bytes in a row and using a single varchar(8000) leaves 60 bytes
for other data should the column be filled.
If you can't predict the length of a character column with any accuracy,
use text/ntext.
David Gugick
Imceda Software
www.imceda.com
|||"Mike Epprecht \(SQL MVP\)" <mike@.epprecht.net> wrote in
news:#TvjU4DyEHA.2600@.TK2MSFTNGP09.phx.gbl:
> 1. No, no more space. Lazy? Use only the space you need and use the
> appropriate column data types and sizes.
> 2. Yes, every varchar in a table uses an additional 2 bytes to
> describe the actual length of the data stored.
Is the additional 2 bytes per row, page, table or what?
> 3. If you have 10 rows per page with a row size of 500 bytes. And you
> update a row where the varchar that used to contain 10 bytes is now
> 500 bytes, the whole page has to be re-arranged for this data to fit
> in. This may even cause the page to be split and incur a lot of extra
> IO. SQL always has to guess how much of the variable space will be
> used up when it does page allocations. When a able is created, all the
> fixed length data types are stored on the left and all the variable
> length data types are stored after that.
> Do yourself a favor and create a table with 1'000'000 rows in it, and
> then create an index on a varchar column and check the database
> growth. Do the same with a properly sized char column and compare the
> space requirements of the table. Create clustered and non-clustered
> indexes.
> If you ever want to know how well a system is written, it is easy,
> look at the DB. If it is clean and very well though out with
> appropriate data types, you generally know the developer knew hat he
> was doing and took pride in his work.
> Get yourself Kalen Delaney's book "Inside SQL 2000" (MS Press). Once
> you read that, you will change your mind how you do DB design.
> Regards
> --
> Mike Epprecht, Microsoft SQL Server MVP
> Zurich, Switzerland
|||JTC ^..^ wrote:
> "Mike Epprecht \(SQL MVP\)" <mike@.epprecht.net> wrote in
> news:#TvjU4DyEHA.2600@.TK2MSFTNGP09.phx.gbl:
>
>
> Is the additional 2 bytes per row, page, table or what?
>
Additional 2 for each varchar
David Gugick
Imceda Software
www.imceda.com
|||Just to be crystal clear on this, a varchar(10) with 10 characters stored
will take 2 more bytes than a char(10). Because the varchar is variable
length, we need to store its length in the record, hence the overhead is per
column.
If the varchar(10) only stores 1 char, then its total size will be 3 bytes,
less than the 10 bytes consumed by the fixed size char(10) - as fixed size
chars are padded up to their declared size always.
Regards.
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"David Gugick" <davidg-nospam@.imceda.com> wrote in message
news:OSajStMyEHA.2260@.TK2MSFTNGP15.phx.gbl...
> JTC ^..^ wrote:
>
> Additional 2 for each varchar
> --
> David Gugick
> Imceda Software
> www.imceda.com
|||Paul S Randal [MS] wrote:
> Just to be crystal clear on this, a varchar(10) with 10 characters
> stored will take 2 more bytes than a char(10). Because the varchar is
> variable length, we need to store its length in the record, hence the
> overhead is per column.
> If the varchar(10) only stores 1 char, then its total size will be 3
> bytes, less than the 10 bytes consumed by the fixed size char(10) -
> as fixed size chars are padded up to their declared size always.
> Regards.
I may have mispoken. Since I don't have time right now to dig into the
technical books, I'll leave to another user to post the correct results.
David Gugick
Imceda Software
www.imceda.com
Detail needed about varchar
1) Does a varchar(1000) take more storage in the actual database file than a
varchar(500)? (assume each contains a 300 byte string). If not, why wouldn'
t
I always use varchar(8000)?
2) Does a varchar(10) take more space than a char(10)? (is there overhead
specifying the actual length in varchar?)
3) Are there any performance penalties (and specifically, what are they)
when using varchar instead of char?1. No, no more space. Lazy? Use only the space you need and use the
appropriate column data types and sizes.
2. Yes, every varchar in a table uses an additional 2 bytes to describe the
actual length of the data stored.
3. If you have 10 rows per page with a row size of 500 bytes. And you update
a row where the varchar that used to contain 10 bytes is now 500 bytes, the
whole page has to be re-arranged for this data to fit in. This may even
cause the page to be split and incur a lot of extra IO. SQL always has to
guess how much of the variable space will be used up when it does page
allocations. When a able is created, all the fixed length data types are
stored on the left and all the variable length data types are stored after
that.
Do yourself a favor and create a table with 1'000'000 rows in it, and then
create an index on a varchar column and check the database growth.
Do the same with a properly sized char column and compare the space
requirements of the table. Create clustered and non-clustered indexes.
If you ever want to know how well a system is written, it is easy, look at
the DB. If it is clean and very well though out with appropriate data types,
you generally know the developer knew hat he was doing and took pride in his
work.
Get yourself Kalen Delaney's book "Inside SQL 2000" (MS Press). Once you
read that, you will change your mind how you do DB design.
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Lig Reffej" <Lig Reffej@.discussions.microsoft.com> wrote in message
news:1C986552-89FF-4C3B-912D-9C58C3F6466F@.microsoft.com...
> I'm trying to understand past the basics of varchar...
> 1) Does a varchar(1000) take more storage in the actual database file than
a
> varchar(500)? (assume each contains a 300 byte string). If not, why
wouldn't
> I always use varchar(8000)?
> 2) Does a varchar(10) take more space than a char(10)? (is there overhead
> specifying the actual length in varchar?)
> 3) Are there any performance penalties (and specifically, what are they)
> when using varchar instead of char?
>|||"Mike Epprecht (SQL MVP)" <mike@.epprecht.net> wrote in message
news:%23TvjU4DyEHA.2600@.TK2MSFTNGP09.phx.gbl...
> "Lig Reffej" <Lig Reffej@.discussions.microsoft.com> wrote in message
> news:1C986552-89FF-4C3B-912D-9C58C3F6466F@.microsoft.com...
than[vbcol=seagreen]
> a
> wouldn't
[vbcol=seagreen]
> 1. No, no more space. Lazy? Use only the space you need and use the
> appropriate column data types and sizes.
The question is whether varchar(8000) -is- actually the most appropriate.
Specifying the length of a character column is in many cases a matter of
predicting the future. E.g. what is the maximum last name that will needed
to be held by this system?
I think Lig's point might be, why try to predict it?|||Mark Wilden wrote:
> "Mike Epprecht (SQL MVP)" <mike@.epprecht.net> wrote in message
> news:%23TvjU4DyEHA.2600@.TK2MSFTNGP09.phx.gbl...
>
>
> The question is whether varchar(8000) -is- actually the most
> appropriate.
> Specifying the length of a character column is in many cases a matter
> of predicting the future. E.g. what is the maximum last name that
> will needed to be held by this system?
> I think Lig's point might be, why try to predict it?
If only because row density is important. If only because you can only
fit 8060 bytes in a row and using a single varchar(8000) leaves 60 bytes
for other data should the column be filled.
If you can't predict the length of a character column with any accuracy,
use text/ntext.
David Gugick
Imceda Software
www.imceda.com|||"Mike Epprecht \(SQL MVP\)" <mike@.epprecht.net> wrote in
news:#TvjU4DyEHA.2600@.TK2MSFTNGP09.phx.gbl:
> 1. No, no more space. Lazy? Use only the space you need and use the
> appropriate column data types and sizes.
> 2. Yes, every varchar in a table uses an additional 2 bytes to
> describe the actual length of the data stored.
Is the additional 2 bytes per row, page, table or what?
> 3. If you have 10 rows per page with a row size of 500 bytes. And you
> update a row where the varchar that used to contain 10 bytes is now
> 500 bytes, the whole page has to be re-arranged for this data to fit
> in. This may even cause the page to be split and incur a lot of extra
> IO. SQL always has to guess how much of the variable space will be
> used up when it does page allocations. When a able is created, all the
> fixed length data types are stored on the left and all the variable
> length data types are stored after that.
> Do yourself a favor and create a table with 1'000'000 rows in it, and
> then create an index on a varchar column and check the database
> growth. Do the same with a properly sized char column and compare the
> space requirements of the table. Create clustered and non-clustered
> indexes.
> If you ever want to know how well a system is written, it is easy,
> look at the DB. If it is clean and very well though out with
> appropriate data types, you generally know the developer knew hat he
> was doing and took pride in his work.
> Get yourself Kalen Delaney's book "Inside SQL 2000" (MS Press). Once
> you read that, you will change your mind how you do DB design.
> Regards
> --
> Mike Epprecht, Microsoft SQL Server MVP
> Zurich, Switzerland|||JTC ^..^ wrote:
> "Mike Epprecht \(SQL MVP\)" <mike@.epprecht.net> wrote in
> news:#TvjU4DyEHA.2600@.TK2MSFTNGP09.phx.gbl:
>
>
> Is the additional 2 bytes per row, page, table or what?
>
Additional 2 for each varchar
David Gugick
Imceda Software
www.imceda.com|||Just to be crystal clear on this, a varchar(10) with 10 characters stored
will take 2 more bytes than a char(10). Because the varchar is variable
length, we need to store its length in the record, hence the overhead is per
column.
If the varchar(10) only stores 1 char, then its total size will be 3 bytes,
less than the 10 bytes consumed by the fixed size char(10) - as fixed size
chars are padded up to their declared size always.
Regards.
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"David Gugick" <davidg-nospam@.imceda.com> wrote in message
news:OSajStMyEHA.2260@.TK2MSFTNGP15.phx.gbl...
> JTC ^..^ wrote:
>
> Additional 2 for each varchar
> --
> David Gugick
> Imceda Software
> www.imceda.com|||Paul S Randal [MS] wrote:
> Just to be crystal clear on this, a varchar(10) with 10 characters
> stored will take 2 more bytes than a char(10). Because the varchar is
> variable length, we need to store its length in the record, hence the
> overhead is per column.
> If the varchar(10) only stores 1 char, then its total size will be 3
> bytes, less than the 10 bytes consumed by the fixed size char(10) -
> as fixed size chars are padded up to their declared size always.
> Regards.
I may have mispoken. Since I don't have time right now to dig into the
technical books, I'll leave to another user to post the correct results.
David Gugick
Imceda Software
www.imceda.com
Detail information within other detail (different table)
report contains a list object slightly smaller than the body size (8X10.5)
and a rectangle object slightly smaller than the list object. The rectangle
object contains 130 plus textboxes for labels and actual fields to be
printed. This is a profile type report used to print all information for a
member (name, address, city, state, and several other fields) and requires
the whole page. There can be further detail linked to this member. In this
case, committees that the member serves on. I can't figure out how to get the
top 5 committees to print with all of the other detail. Does anyone know a
"best method" to accomplish this?
Thanks,
JohnNevermind. Finally used a subreport which solved the problem very nicely.
John
"John Joslin" wrote:
> I have a one page report that prints information from several tables. The
> report contains a list object slightly smaller than the body size (8X10.5)
> and a rectangle object slightly smaller than the list object. The rectangle
> object contains 130 plus textboxes for labels and actual fields to be
> printed. This is a profile type report used to print all information for a
> member (name, address, city, state, and several other fields) and requires
> the whole page. There can be further detail linked to this member. In this
> case, committees that the member serves on. I can't figure out how to get the
> top 5 committees to print with all of the other detail. Does anyone know a
> "best method" to accomplish this?
> Thanks,
> John
Detail in Table shifts report
I work for a paryroll company and we are using rs to print checks from. The
fields on the report need to be fixed so the micr does not move. When the
detail gets filled in on the tables though it shifts everything down and up
(Like the micr at the bottom of a check) depending on how many detail lines
are in the table.
Is there any way to make this stop from happening?One thing you might do is to
1. Determine the max number of details that can be printed in the space
prior to the micr-code.
2. then ensure in your sql select that you only select fewer than the max
detail rows per master..
You might also try some sort of trick with the filter or hidden properties
ie
rowcount(detailgroup) >5 Either to filter out the rows, or hide the
details..
Hope this helps.
--
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"sangred" <sangred@.discussions.microsoft.com> wrote in message
news:AB1A28F3-518D-4A8A-B7E6-AEF040F06F30@.microsoft.com...
> Hi,
> I work for a paryroll company and we are using rs to print checks from.
> The
> fields on the report need to be fixed so the micr does not move. When the
> detail gets filled in on the tables though it shifts everything down and
> up
> (Like the micr at the bottom of a check) depending on how many detail
> lines
> are in the table.
> Is there any way to make this stop from happening?|||Another solution is to enclose the dynamically sizing tables within a
rectangle. The rectangle will act as a "frame" and the table will only size
within the rectangle (and not shift anything outside of the rectangle).
"sangred" wrote:
> Hi,
> I work for a paryroll company and we are using rs to print checks from. The
> fields on the report need to be fixed so the micr does not move. When the
> detail gets filled in on the tables though it shifts everything down and up
> (Like the micr at the bottom of a check) depending on how many detail lines
> are in the table.
> Is there any way to make this stop from happening?