Sunday, March 25, 2012
Adding a line to a chart
Does anyone know how to manually add a line to a chart in whatever location
I want without using any sort of dataset? Or is this even possible?
ThanksIt depends.
(1) If you do NOT have any dynamic series groupings in the chart, it is
easy. Just add another item in the "Values" section of the chart properties
dialog / data tab. For the value you can use a constant expression like
=10000 to get a line at y-axis value 10000.
(2) If you have a series grouping (e.g. group by year), then you would have
one "Value" (i.e. static series) for the actual value to be shown and you
would add a second "Value" for the line. Since you would want this line to
only show up once even though there are several series groups at runtime,
you have use an expression to show a constant value only for one particular
grouping value and Nothing for all other grouping values of the series
grouping.
You will find an example at the bottom of this posting based on Northwind
data. The example will need some careful study to see how to make the
constant line appear only once in the chart. Note: the additional legend
entries cannot be removed. The only alternative here is to not draw any
legend on the chart and use an expression to show certain datapoint labels
inside the chart e.g. only on the first datapoint of every series.
--
Robert M. Bruckner
Microsoft SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
All code samples are provided "AS IS" without warranty of any kind, either
express or implied, including but not limited to the implied warranties of
merchantability and/or fitness for a particular purpose.
"Spencer23" <Spencer23@.discussions.microsoft.com> wrote in message
news:30C566FB-2146-484B-8AD2-6D48D4E0BF9D@.microsoft.com...
> Hi,
> Does anyone know how to manually add a line to a chart in whatever
location
> I want without using any sort of dataset? Or is this even possible?
> Thanks
===========================================
<?xml version="1.0" encoding="utf-8"?>
<Report
xmlns="http://schemas.microsoft.com/sqlserver/reporting/2003/10/reportdefini
tion"
xmlns:rd="">http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
<RightMargin>1in</RightMargin>
<Body>
<ReportItems>
<Chart Name="Sales">
<ThreeDProperties>
<Rotation>30</Rotation>
<Inclination>30</Inclination>
<Shading>Simple</Shading>
<WallThickness>50</WallThickness>
</ThreeDProperties>
<Style />
<Legend>
<Visible>true</Visible>
<Style>
<BorderStyle>
<Default>Solid</Default>
</BorderStyle>
<Color>Brown</Color>
</Style>
<Position>BottomCenter</Position>
<Layout>Table</Layout>
</Legend>
<Palette>Default</Palette>
<ChartData>
<ChartSeries>
<DataPoints>
<DataPoint>
<DataValues>
<DataValue>
<Value>=Sum(Fields!UnitPrice.Value *
Fields!Quantity.Value)</Value>
</DataValue>
</DataValues>
<DataLabel />
<Marker>
<Size>6pt</Size>
</Marker>
</DataPoint>
</DataPoints>
</ChartSeries>
<ChartSeries>
<DataPoints>
<DataPoint>
<DataValues>
<DataValue>
<Value>=iif(1997 = Year(Fields!OrderDate.Value), 130000,
Nothing)</Value>
</DataValue>
</DataValues>
<DataLabel />
<Marker>
<Size>6pt</Size>
</Marker>
</DataPoint>
</DataPoints>
</ChartSeries>
</ChartData>
<CategoryAxis>
<Axis>
<Title>
<Style />
</Title>
<Style />
<MajorGridLines>
<ShowGridLines>true</ShowGridLines>
<Style>
<BorderStyle>
<Default>Solid</Default>
</BorderStyle>
</Style>
</MajorGridLines>
<MinorGridLines>
<Style>
<BorderStyle>
<Default>Solid</Default>
</BorderStyle>
</Style>
</MinorGridLines>
<MajorTickMarks>Outside</MajorTickMarks>
<Visible>true</Visible>
</Axis>
</CategoryAxis>
<DataSetName>Northwind</DataSetName>
<PointWidth>100</PointWidth>
<Type>Line</Type>
<Title>
<Caption>Sales</Caption>
<Style>
<FontSize>14pt</FontSize>
<FontWeight>700</FontWeight>
</Style>
</Title>
<CategoryGroupings>
<CategoryGrouping>
<DynamicCategories>
<Grouping Name="Sales_CategoryGroup1">
<GroupExpressions>
<GroupExpression>=Month(Fields!OrderDate.Value)</GroupExpression>
</GroupExpressions>
</Grouping>
<Sorting>
<SortBy>
<SortExpression>=Month(Fields!OrderDate.Value)</SortExpression>
<Direction>Ascending</Direction>
</SortBy>
</Sorting>
<Label>=MonthName(Month(Fields!OrderDate.Value))</Label>
</DynamicCategories>
</CategoryGrouping>
</CategoryGroupings>
<Height>6.125in</Height>
<SeriesGroupings>
<SeriesGrouping>
<DynamicSeries>
<Grouping Name="Sales_SeriesGroup1">
<GroupExpressions>
<GroupExpression>=Year(Fields!OrderDate.Value)</GroupExpression>
</GroupExpressions>
</Grouping>
<Label>=""</Label>
</DynamicSeries>
</SeriesGrouping>
<SeriesGrouping>
<StaticSeries>
<StaticMember>
<Label>="Sales " & Year(Fields!OrderDate.Value)</Label>
</StaticMember>
<StaticMember>
<Label>=iif(1997 = Year(Fields!OrderDate.Value), "Target", "
")</Label>
</StaticMember>
</StaticSeries>
</SeriesGrouping>
</SeriesGroupings>
<Subtype>Plain</Subtype>
<PlotArea>
<Style>
<BackgroundGradientEndColor>White</BackgroundGradientEndColor>
<BackgroundGradientType>TopBottom</BackgroundGradientType>
<BackgroundColor>LightGrey</BackgroundColor>
<BorderStyle>
<Default>Solid</Default>
</BorderStyle>
</Style>
</PlotArea>
<ValueAxis>
<Axis>
<Title>
<Style />
</Title>
<Style />
<MajorGridLines>
<ShowGridLines>true</ShowGridLines>
<Style>
<BorderStyle>
<Default>Solid</Default>
</BorderStyle>
</Style>
</MajorGridLines>
<MinorGridLines>
<Style>
<BorderStyle>
<Default>Solid</Default>
</BorderStyle>
</Style>
</MinorGridLines>
<MajorTickMarks>Outside</MajorTickMarks>
<MinorTickMarks>Outside</MinorTickMarks>
<Min>0</Min>
<Margin>true</Margin>
<Visible>true</Visible>
<Scalar>true</Scalar>
</Axis>
</ValueAxis>
</Chart>
</ReportItems>
<Style />
<Height>6.5in</Height>
</Body>
<TopMargin>1in</TopMargin>
<DataSources>
<DataSource Name="Northwind">
<rd:DataSourceID>da5964d0-11a7-4e51-9b22-cc4fa55fdd7a</rd:DataSourceID>
<ConnectionProperties>
<DataProvider>SQL</DataProvider>
<ConnectString>data source=(local);initial
catalog=Northwind</ConnectString>
<IntegratedSecurity>true</IntegratedSecurity>
</ConnectionProperties>
</DataSource>
</DataSources>
<Width>6.5in</Width>
<DataSets>
<DataSet Name="Northwind">
<Fields>
<Field Name="UnitPrice">
<DataField>UnitPrice</DataField>
<rd:TypeName>System.Decimal</rd:TypeName>
</Field>
<Field Name="Quantity">
<DataField>Quantity</DataField>
<rd:TypeName>System.Int16</rd:TypeName>
</Field>
<Field Name="OrderDate">
<DataField>OrderDate</DataField>
<rd:TypeName>System.DateTime</rd:TypeName>
</Field>
</Fields>
<Query>
<DataSourceName>Northwind</DataSourceName>
<CommandText>SELECT [Order Details].UnitPrice, [Order
Details].Quantity, Orders.OrderDate
FROM Orders INNER JOIN
[Order Details] ON Orders.OrderID = [Order
Details].OrderID
ORDER BY Orders.OrderDate</CommandText>
<Timeout>30</Timeout>
</Query>
</DataSet>
</DataSets>
<LeftMargin>1in</LeftMargin>
<rd:SnapToGrid>true</rd:SnapToGrid>
<rd:DrawGrid>true</rd:DrawGrid>
<rd:ReportID>bc811835-2302-4f9e-9c89-a99d4d3f5fd2</rd:ReportID>
<BottomMargin>1in</BottomMargin>
</Report>
Thursday, March 8, 2012
Add records in a table
I need to add some records in a table called location(primary key:
loc_id). What I want to do is for each location in the table, I add
the same record but with a different loc_id, which can be a random
string. All the other column should contain the same value. Can anyone
give me a hint on how to do this in SQL server 2000 enterprise
manager?
thx."Hamilton sucks" <caof@.mcmaster.cawrote in message
news:1189201676.191048.77380@.22g2000hsm.googlegrou ps.com...
Quote:
Originally Posted by
Hi:
I need to add some records in a table called location(primary key:
loc_id). What I want to do is for each location in the table, I add
the same record but with a different loc_id, which can be a random
string. All the other column should contain the same value. Can anyone
give me a hint on how to do this in SQL server 2000 enterprise
manager?
thx.
>
A strange design. If the only key is random then how do you hope to retrieve
the information? If the rest of the data is to be identical then why bother
copying it?
DECLARE @.loc_id VARCHAR(36);
SET @.loc_id = CAST(NEWID() AS VARCHAR(36));
INSERT INTO location (@.loc_id, col1, col2, ...)
SELECT col1, col2, ...
FROM location ;
--
David Portas|||David Portas (REMOVE_BEFORE_REPLYING_dportas@.acm.org) writes:
Quote:
Originally Posted by
"Hamilton sucks" <caof@.mcmaster.cawrote in message
news:1189201676.191048.77380@.22g2000hsm.googlegrou ps.com...
Quote:
Originally Posted by
>I need to add some records in a table called location(primary key:
>loc_id). What I want to do is for each location in the table, I add
>the same record but with a different loc_id, which can be a random
>string. All the other column should contain the same value. Can anyone
>give me a hint on how to do this in SQL server 2000 enterprise
>manager?
>thx.
>>
>
A strange design. If the only key is random then how do you hope to
retrieve the information? If the rest of the data is to be identical
then why bother copying it?
Maybe he is generating test data?
Quote:
Originally Posted by
DECLARE @.loc_id VARCHAR(36);
SET @.loc_id = CAST(NEWID() AS VARCHAR(36));
>
INSERT INTO location (@.loc_id, col1, col2, ...)
SELECT col1, col2, ...
FROM location ;
That does not look like it would work out. :-)
As I understand Hamilton, he wants each copied row to have each own
new id. Using newid() this would be:
INSERT location (loc_id, col1, col2, ...)
SELECT convert(char(36), newid()), col1, col2, ...
FROM location
Obviously, this will not work if loc_id is shorter than 36 characters.
Hamilton could use substring, but obviously the short loc_id is the
bigger the possibility for duplicates.
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||"Erland Sommarskog" <esquel@.sommarskog.sewrote in message
news:Xns99A56D13F4F0DYazorman@.127.0.0.1...
Quote:
Originally Posted by
David Portas (REMOVE_BEFORE_REPLYING_dportas@.acm.org) writes:
Quote:
Originally Posted by
>"Hamilton sucks" <caof@.mcmaster.cawrote in message
>news:1189201676.191048.77380@.22g2000hsm.googlegrou ps.com...
Quote:
Originally Posted by
>>I need to add some records in a table called location(primary key:
>>loc_id). What I want to do is for each location in the table, I add
>>the same record but with a different loc_id, which can be a random
>>string. All the other column should contain the same value. Can anyone
>>give me a hint on how to do this in SQL server 2000 enterprise
>>manager?
>>thx.
>>>
>>
>A strange design. If the only key is random then how do you hope to
>retrieve the information? If the rest of the data is to be identical
>then why bother copying it?
>
Maybe he is generating test data?
>
Quote:
Originally Posted by
>DECLARE @.loc_id VARCHAR(36);
>SET @.loc_id = CAST(NEWID() AS VARCHAR(36));
>>
>INSERT INTO location (@.loc_id, col1, col2, ...)
> SELECT col1, col2, ...
> FROM location ;
>
That does not look like it would work out. :-)
>
As I understand Hamilton, he wants each copied row to have each own
new id. Using newid() this would be:
>
INSERT location (loc_id, col1, col2, ...)
SELECT convert(char(36), newid()), col1, col2, ...
FROM location
>
>
Obviously, this will not work if loc_id is shorter than 36 characters.
Hamilton could use substring, but obviously the short loc_id is the
bigger the possibility for duplicates.
>
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
>
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx
Thanks Erland. My mistake.
--
David Portas|||On Sep 7, 6:08 pm, "David Portas"
<REMOVE_BEFORE_REPLYING_dpor...@.acm.orgwrote:
Quote:
Originally Posted by
"Hamilton sucks" <c...@.mcmaster.cawrote in message
>
news:1189201676.191048.77380@.22g2000hsm.googlegrou ps.com...
>
Quote:
Originally Posted by
Hi:
I need to add some records in a table called location(primary key:
loc_id). What I want to do is for each location in the table, I add
the same record but with a different loc_id, which can be a random
string. All the other column should contain the same value. Can anyone
give me a hint on how to do this in SQL server 2000 enterprise
manager?
thx.
>
A strange design. If the only key is random then how do you hope to retrieve
the information? If the rest of the data is to be identical then why bother
copying it?
>
DECLARE @.loc_id VARCHAR(36);
SET @.loc_id = CAST(NEWID() AS VARCHAR(36));
>
INSERT INTO location (@.loc_id, col1, col2, ...)
SELECT col1, col2, ...
FROM location ;
>
--
David Portas
Thanks, david for your help. The reason for copying records is that I
need to change them to new records, which are exactly the same as the
old records except one column value. The loc_id is the primary key but
it's not really used for searching information. So basically I don't
care about the loc_id as long as they are unique, that 's why i want
it to be random.|||On Sep 8, 4:38 am, Erland Sommarskog <esq...@.sommarskog.sewrote:
Quote:
Originally Posted by
David Portas (REMOVE_BEFORE_REPLYING_dpor...@.acm.org) writes:
Quote:
Originally Posted by
"Hamilton sucks" <c...@.mcmaster.cawrote in message
news:1189201676.191048.77380@.22g2000hsm.googlegrou ps.com...
Quote:
Originally Posted by
I need to add some records in a table called location(primary key:
loc_id). What I want to do is for each location in the table, I add
the same record but with a different loc_id, which can be a random
string. All the other column should contain the same value. Can anyone
give me a hint on how to do this in SQL server 2000 enterprise
manager?
thx.
>
Quote:
Originally Posted by
A strange design. If the only key is random then how do you hope to
retrieve the information? If the rest of the data is to be identical
then why bother copying it?
>
Maybe he is generating test data?
>
Quote:
Originally Posted by
DECLARE @.loc_id VARCHAR(36);
SET @.loc_id = CAST(NEWID() AS VARCHAR(36));
>
Quote:
Originally Posted by
INSERT INTO location (@.loc_id, col1, col2, ...)
SELECT col1, col2, ...
FROM location ;
>
That does not look like it would work out. :-)
>
As I understand Hamilton, he wants each copied row to have each own
new id. Using newid() this would be:
>
INSERT location (loc_id, col1, col2, ...)
SELECT convert(char(36), newid()), col1, col2, ...
FROM location
>
Obviously, this will not work if loc_id is shorter than 36 characters.
Hamilton could use substring, but obviously the short loc_id is the
bigger the possibility for duplicates.
>
--
Erland Sommarskog, SQL Server MVP, esq...@.sommarskog.se
>
Books Online for SQL Server 2005 athttp://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books...
Books Online for SQL Server 2000 athttp://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
Maybe I should consult about the design. The table location holds the
location info about the local schools, each of them is linked to a
test group and a set of students. If I want to add a new test group,
which contains the same set of locations except that they are linked
to the new group. Should I create a new table or add new records into
tbl_location? The same problem holds for tbl_students as well since in
the new group, all students' status must be reset.|||"Hamilton sucks" <caof@.mcmaster.cawrote in message
news:1189273920.752746.25660@.o80g2000hse.googlegro ups.com...
Quote:
Originally Posted by
>
The reason for copying records is that I
need to change them to new records, which are exactly the same as the
old records except one column value.
Then they are not exactly the same. Insert the new rows together including
the NEW column value(s). That way you can add any relevent candidate key
constraints to your table - something that wouldn't be possible if the table
had to support transitional "copies" of the old data. Example:
INSERT INTO tbl (col1, col2, col3)
SELECT col1, @.new_col2, col3
FROM tbl
WHERE ... ? ;
Quote:
Originally Posted by
Maybe I should consult about the design. The table location holds the
location info about the local schools, each of them is linked to a
test group and a set of students. If I want to add a new test group,
which contains the same set of locations except that they are linked
to the new group. Should I create a new table or add new records into
tbl_location? The same problem holds for tbl_students as well since in
the new group, all students' status must be reset.
>
This sounds very like a multi-valued or join-dependency situation. Are you
familiar with the Fourth and Fifth Normal Forms? If not then look up some
examples. You should satisfy yourself about the design based on your own
understanding of the business rules. It's notoriously difficult to give
detailed design advice in an online discussion. (Easy to spot potential
problems but hard to suggest the right solutions).
--
David Portas
Tuesday, March 6, 2012
add linked server
I have tried to add a linked server(sql2000) residing
at location B from Location A (a server computer ,using
SQL 7.0) but i got the error "general network error , pls
check network documentation" I have gotten the correct
login id & pwd from the user at the other end.
have also configured the port#(under Client Utility)
correctly for client connection and also triedthe
sp_addlinkedservers & sp_addsvrlogin already
Is there any dll file needed ? such as DBNET.dll ? to
add linked server from sql ver 7.0 to sql2000 ?
Does it need any specific version of the odbc driver
for SQL Server ? current it's version is 3.70.10.63 i have
tried to add and odbc link but still have the same error
I have no problem when using Query Analyzer from my
client computer AND the user from the other end is able to
add my sqlserver successfully as a linked server. The odbc
driver for SQL Server is 3.85.xx.xx
Appreciate if somebody could help me out as i am doing
some data migration which i have set up some DTS jobs to
copy data daily over instead of one big chunks the day
before migration
many thks
maxzim
Can you show us your creation script?
This example works without creating a linked server
declare @.pid varchar(30)
set @.pid='2450'
select id from openrowset('sqloledb',
'server';'sa';'pass',database.dbo.table)
where id > @.pid
"maxzsim" <anonymous@.discussions.microsoft.com> wrote in message
news:680a01c493d3$071362b0$a501280a@.phx.gbl...
> Hi ,
> I have tried to add a linked server(sql2000) residing
> at location B from Location A (a server computer ,using
> SQL 7.0) but i got the error "general network error , pls
> check network documentation" I have gotten the correct
> login id & pwd from the user at the other end.
> have also configured the port#(under Client Utility)
> correctly for client connection and also triedthe
> sp_addlinkedservers & sp_addsvrlogin already
> Is there any dll file needed ? such as DBNET.dll ? to
> add linked server from sql ver 7.0 to sql2000 ?
> Does it need any specific version of the odbc driver
> for SQL Server ? current it's version is 3.70.10.63 i have
> tried to add and odbc link but still have the same error
> I have no problem when using Query Analyzer from my
> client computer AND the user from the other end is able to
> add my sqlserver successfully as a linked server. The odbc
> driver for SQL Server is 3.85.xx.xx
> Appreciate if somebody could help me out as i am doing
> some data migration which i have set up some DTS jobs to
> copy data daily over instead of one big chunks the day
> before migration
> many thks
>
|||Hi Uri ,
thks will try out urs
but for my creation script
i have used the Enterprise Manager and just specify the
remote user & pwd
for the query analyzer on the sql server i used :
sp_addlinkedserver 'serverA' -- it's using sql server so
i did not specify the rest of the connection
sp_addsvrlogin 'serverA' ,
false , 'sa', 'userid' , 'userpassword'
for the query analyzer from my local client computer ,
i simply enter the server name , enter the pwd & id and i
get connected
>--Original Message--
>maxzim
>Can you show us your creation script?
>This example works without creating a linked server
>declare @.pid varchar(30)
>set @.pid='2450'
>
>select id from openrowset('sqloledb',
>'server';'sa';'pass',database.dbo.table)
>where id > @.pid
>
>
>
>"maxzsim" <anonymous@.discussions.microsoft.com> wrote in
message[vbcol=seagreen]
>news:680a01c493d3$071362b0$a501280a@.phx.gbl...
pls[vbcol=seagreen]
have[vbcol=seagreen]
to[vbcol=seagreen]
odbc
>
>.
>
|||Hi
Do you have specified Server Type in the first tab when you use EM?
"maxzsim" <anonymous@.discussions.microsoft.com> wrote in message
news:695e01c493d8$fbf0ae50$a301280a@.phx.gbl...[vbcol=seagreen]
> Hi Uri ,
> thks will try out urs
> but for my creation script
> i have used the Enterprise Manager and just specify the
> remote user & pwd
> for the query analyzer on the sql server i used :
> sp_addlinkedserver 'serverA' -- it's using sql server so
> i did not specify the rest of the connection
> sp_addsvrlogin 'serverA' ,
> false , 'sa', 'userid' , 'userpassword'
> for the query analyzer from my local client computer ,
> i simply enter the server name , enter the pwd & id and i
> get connected
> message
> pls
> have
> to
> odbc
|||Hi Uri ,
i used SQL Server in the 1st tab
>--Original Message--
>Hi
>Do you have specified Server Type in the first tab when
you use EM?
>
>
>"maxzsim" <anonymous@.discussions.microsoft.com> wrote in
message[vbcol=seagreen]
>news:695e01c493d8$fbf0ae50$a301280a@.phx.gbl...
the[vbcol=seagreen]
so[vbcol=seagreen]
computer ,[vbcol=seagreen]
i[vbcol=seagreen]
in[vbcol=seagreen]
residing[vbcol=seagreen]
computer ,using[vbcol=seagreen]
correct[vbcol=seagreen]
Utility)[vbcol=seagreen]
DBNET.dll ? to[vbcol=seagreen]
driver[vbcol=seagreen]
error[vbcol=seagreen]
able[vbcol=seagreen]
doing[vbcol=seagreen]
jobs to[vbcol=seagreen]
day
>
>.
>
|||Hi Uri ,
i have used the openrowset but it says "server does not
exist or access denied" which i am using the
administrator's id & pwd
rdgs
>--Original Message--
>Hi
>Do you have specified Server Type in the first tab when
you use EM?
>
>
>"maxzsim" <anonymous@.discussions.microsoft.com> wrote in
message[vbcol=seagreen]
>news:695e01c493d8$fbf0ae50$a301280a@.phx.gbl...
the[vbcol=seagreen]
so[vbcol=seagreen]
computer ,[vbcol=seagreen]
i[vbcol=seagreen]
in[vbcol=seagreen]
residing[vbcol=seagreen]
computer ,using[vbcol=seagreen]
correct[vbcol=seagreen]
Utility)[vbcol=seagreen]
DBNET.dll ? to[vbcol=seagreen]
driver[vbcol=seagreen]
error[vbcol=seagreen]
able[vbcol=seagreen]
doing[vbcol=seagreen]
jobs to[vbcol=seagreen]
day
>
>.
>
|||Hi
Probably this is a permission issue. Make sure that you have full
permissions on destination server.
"maxzsim" <anonymous@.discussions.microsoft.com> wrote in message
news:673f01c493dc$63f279e0$a601280a@.phx.gbl...[vbcol=seagreen]
> Hi Uri ,
> i have used the openrowset but it says "server does not
> exist or access denied" which i am using the
> administrator's id & pwd
> rdgs
> you use EM?
> message
> the
> so
> computer ,
> i
> in
> residing
> computer ,using
> correct
> Utility)
> DBNET.dll ? to
> driver
> error
> able
> doing
> jobs to
> day
add linked server
I have tried to add a linked server(sql2000) residing
at location B from Location A (a server computer ,using
SQL 7.0) but i got the error "general network error , pls
check network documentation" I have gotten the correct
login id & pwd from the user at the other end.
have also configured the port#(under Client Utility)
correctly for client connection and also triedthe
sp_addlinkedservers & sp_addsvrlogin already
Is there any dll file needed ? such as DBNET.dll ? to
add linked server from sql ver 7.0 to sql2000 ?
Does it need any specific version of the odbc driver
for SQL Server ? current it's version is 3.70.10.63 i have
tried to add and odbc link but still have the same error
I have no problem when using Query Analyzer from my
client computer AND the user from the other end is able to
add my sqlserver successfully as a linked server. The odbc
driver for SQL Server is 3.85.xx.xx
Appreciate if somebody could help me out as i am doing
some data migration which i have set up some DTS jobs to
copy data daily over instead of one big chunks the day
before migration
many thksmaxzim
Can you show us your creation script?
This example works without creating a linked server
declare @.pid varchar(30)
set @.pid='2450'
select id from openrowset('sqloledb',
'server';'sa';'pass',database.dbo.table)
where id > @.pid
"maxzsim" <anonymous@.discussions.microsoft.com> wrote in message
news:680a01c493d3$071362b0$a501280a@.phx.gbl...
> Hi ,
> I have tried to add a linked server(sql2000) residing
> at location B from Location A (a server computer ,using
> SQL 7.0) but i got the error "general network error , pls
> check network documentation" I have gotten the correct
> login id & pwd from the user at the other end.
> have also configured the port#(under Client Utility)
> correctly for client connection and also triedthe
> sp_addlinkedservers & sp_addsvrlogin already
> Is there any dll file needed ? such as DBNET.dll ? to
> add linked server from sql ver 7.0 to sql2000 ?
> Does it need any specific version of the odbc driver
> for SQL Server ? current it's version is 3.70.10.63 i have
> tried to add and odbc link but still have the same error
> I have no problem when using Query Analyzer from my
> client computer AND the user from the other end is able to
> add my sqlserver successfully as a linked server. The odbc
> driver for SQL Server is 3.85.xx.xx
> Appreciate if somebody could help me out as i am doing
> some data migration which i have set up some DTS jobs to
> copy data daily over instead of one big chunks the day
> before migration
> many thks
>|||Hi Uri ,
thks will try out urs
but for my creation script
i have used the Enterprise Manager and just specify the
remote user & pwd
for the query analyzer on the sql server i used :
sp_addlinkedserver 'serverA' -- it's using sql server so
i did not specify the rest of the connection
sp_addsvrlogin 'serverA' ,
false , 'sa', 'userid' , 'userpassword'
for the query analyzer from my local client computer ,
i simply enter the server name , enter the pwd & id and i
get connected
>--Original Message--
>maxzim
>Can you show us your creation script?
>This example works without creating a linked server
>declare @.pid varchar(30)
>set @.pid='2450'
>
>select id from openrowset('sqloledb',
>'server';'sa';'pass',database.dbo.table)
>where id > @.pid
>
>
>
>"maxzsim" <anonymous@.discussions.microsoft.com> wrote in
message
>news:680a01c493d3$071362b0$a501280a@.phx.gbl...
>> Hi ,
>> I have tried to add a linked server(sql2000) residing
>> at location B from Location A (a server computer ,using
>> SQL 7.0) but i got the error "general network error ,
pls
>> check network documentation" I have gotten the correct
>> login id & pwd from the user at the other end.
>> have also configured the port#(under Client Utility)
>> correctly for client connection and also triedthe
>> sp_addlinkedservers & sp_addsvrlogin already
>> Is there any dll file needed ? such as DBNET.dll ? to
>> add linked server from sql ver 7.0 to sql2000 ?
>> Does it need any specific version of the odbc driver
>> for SQL Server ? current it's version is 3.70.10.63 i
have
>> tried to add and odbc link but still have the same error
>> I have no problem when using Query Analyzer from my
>> client computer AND the user from the other end is able
to
>> add my sqlserver successfully as a linked server. The
odbc
>> driver for SQL Server is 3.85.xx.xx
>> Appreciate if somebody could help me out as i am doing
>> some data migration which i have set up some DTS jobs to
>> copy data daily over instead of one big chunks the day
>> before migration
>> many thks
>>
>
>.
>|||Hi
Do you have specified Server Type in the first tab when you use EM?
"maxzsim" <anonymous@.discussions.microsoft.com> wrote in message
news:695e01c493d8$fbf0ae50$a301280a@.phx.gbl...
> Hi Uri ,
> thks will try out urs
> but for my creation script
> i have used the Enterprise Manager and just specify the
> remote user & pwd
> for the query analyzer on the sql server i used :
> sp_addlinkedserver 'serverA' -- it's using sql server so
> i did not specify the rest of the connection
> sp_addsvrlogin 'serverA' ,
> false , 'sa', 'userid' , 'userpassword'
> for the query analyzer from my local client computer ,
> i simply enter the server name , enter the pwd & id and i
> get connected
> >--Original Message--
> >maxzim
> >Can you show us your creation script?
> >This example works without creating a linked server
> >declare @.pid varchar(30)
> >set @.pid='2450'
> >
> >
> >select id from openrowset('sqloledb',
> >'server';'sa';'pass',database.dbo.table)
> >where id > @.pid
> >
> >
> >
> >
> >
> >
> >
> >"maxzsim" <anonymous@.discussions.microsoft.com> wrote in
> message
> >news:680a01c493d3$071362b0$a501280a@.phx.gbl...
> >> Hi ,
> >>
> >> I have tried to add a linked server(sql2000) residing
> >> at location B from Location A (a server computer ,using
> >> SQL 7.0) but i got the error "general network error ,
> pls
> >> check network documentation" I have gotten the correct
> >> login id & pwd from the user at the other end.
> >>
> >> have also configured the port#(under Client Utility)
> >> correctly for client connection and also triedthe
> >> sp_addlinkedservers & sp_addsvrlogin already
> >>
> >> Is there any dll file needed ? such as DBNET.dll ? to
> >> add linked server from sql ver 7.0 to sql2000 ?
> >>
> >> Does it need any specific version of the odbc driver
> >> for SQL Server ? current it's version is 3.70.10.63 i
> have
> >> tried to add and odbc link but still have the same error
> >>
> >> I have no problem when using Query Analyzer from my
> >> client computer AND the user from the other end is able
> to
> >> add my sqlserver successfully as a linked server. The
> odbc
> >> driver for SQL Server is 3.85.xx.xx
> >>
> >> Appreciate if somebody could help me out as i am doing
> >> some data migration which i have set up some DTS jobs to
> >> copy data daily over instead of one big chunks the day
> >> before migration
> >>
> >> many thks
> >>
> >>
> >
> >
> >.
> >|||Hi Uri ,
i used SQL Server in the 1st tab
>--Original Message--
>Hi
>Do you have specified Server Type in the first tab when
you use EM?
>
>
>"maxzsim" <anonymous@.discussions.microsoft.com> wrote in
message
>news:695e01c493d8$fbf0ae50$a301280a@.phx.gbl...
>> Hi Uri ,
>> thks will try out urs
>> but for my creation script
>> i have used the Enterprise Manager and just specify
the
>> remote user & pwd
>> for the query analyzer on the sql server i used :
>> sp_addlinkedserver 'serverA' -- it's using sql server
so
>> i did not specify the rest of the connection
>> sp_addsvrlogin 'serverA' ,
>> false , 'sa', 'userid' , 'userpassword'
>> for the query analyzer from my local client
computer ,
>> i simply enter the server name , enter the pwd & id and
i
>> get connected
>> >--Original Message--
>> >maxzim
>> >Can you show us your creation script?
>> >This example works without creating a linked server
>> >declare @.pid varchar(30)
>> >set @.pid='2450'
>> >
>> >
>> >select id from openrowset('sqloledb',
>> >'server';'sa';'pass',database.dbo.table)
>> >where id > @.pid
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> >"maxzsim" <anonymous@.discussions.microsoft.com> wrote
in
>> message
>> >news:680a01c493d3$071362b0$a501280a@.phx.gbl...
>> >> Hi ,
>> >>
>> >> I have tried to add a linked server(sql2000)
residing
>> >> at location B from Location A (a server
computer ,using
>> >> SQL 7.0) but i got the error "general network error ,
>> pls
>> >> check network documentation" I have gotten the
correct
>> >> login id & pwd from the user at the other end.
>> >>
>> >> have also configured the port#(under Client
Utility)
>> >> correctly for client connection and also triedthe
>> >> sp_addlinkedservers & sp_addsvrlogin already
>> >>
>> >> Is there any dll file needed ? such as
DBNET.dll ? to
>> >> add linked server from sql ver 7.0 to sql2000 ?
>> >>
>> >> Does it need any specific version of the odbc
driver
>> >> for SQL Server ? current it's version is 3.70.10.63 i
>> have
>> >> tried to add and odbc link but still have the same
error
>> >>
>> >> I have no problem when using Query Analyzer from my
>> >> client computer AND the user from the other end is
able
>> to
>> >> add my sqlserver successfully as a linked server. The
>> odbc
>> >> driver for SQL Server is 3.85.xx.xx
>> >>
>> >> Appreciate if somebody could help me out as i am
doing
>> >> some data migration which i have set up some DTS
jobs to
>> >> copy data daily over instead of one big chunks the
day
>> >> before migration
>> >>
>> >> many thks
>> >>
>> >>
>> >
>> >
>> >.
>> >
>
>.
>|||Hi Uri ,
i have used the openrowset but it says "server does not
exist or access denied" which i am using the
administrator's id & pwd
rdgs
>--Original Message--
>Hi
>Do you have specified Server Type in the first tab when
you use EM?
>
>
>"maxzsim" <anonymous@.discussions.microsoft.com> wrote in
message
>news:695e01c493d8$fbf0ae50$a301280a@.phx.gbl...
>> Hi Uri ,
>> thks will try out urs
>> but for my creation script
>> i have used the Enterprise Manager and just specify
the
>> remote user & pwd
>> for the query analyzer on the sql server i used :
>> sp_addlinkedserver 'serverA' -- it's using sql server
so
>> i did not specify the rest of the connection
>> sp_addsvrlogin 'serverA' ,
>> false , 'sa', 'userid' , 'userpassword'
>> for the query analyzer from my local client
computer ,
>> i simply enter the server name , enter the pwd & id and
i
>> get connected
>> >--Original Message--
>> >maxzim
>> >Can you show us your creation script?
>> >This example works without creating a linked server
>> >declare @.pid varchar(30)
>> >set @.pid='2450'
>> >
>> >
>> >select id from openrowset('sqloledb',
>> >'server';'sa';'pass',database.dbo.table)
>> >where id > @.pid
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> >"maxzsim" <anonymous@.discussions.microsoft.com> wrote
in
>> message
>> >news:680a01c493d3$071362b0$a501280a@.phx.gbl...
>> >> Hi ,
>> >>
>> >> I have tried to add a linked server(sql2000)
residing
>> >> at location B from Location A (a server
computer ,using
>> >> SQL 7.0) but i got the error "general network error ,
>> pls
>> >> check network documentation" I have gotten the
correct
>> >> login id & pwd from the user at the other end.
>> >>
>> >> have also configured the port#(under Client
Utility)
>> >> correctly for client connection and also triedthe
>> >> sp_addlinkedservers & sp_addsvrlogin already
>> >>
>> >> Is there any dll file needed ? such as
DBNET.dll ? to
>> >> add linked server from sql ver 7.0 to sql2000 ?
>> >>
>> >> Does it need any specific version of the odbc
driver
>> >> for SQL Server ? current it's version is 3.70.10.63 i
>> have
>> >> tried to add and odbc link but still have the same
error
>> >>
>> >> I have no problem when using Query Analyzer from my
>> >> client computer AND the user from the other end is
able
>> to
>> >> add my sqlserver successfully as a linked server. The
>> odbc
>> >> driver for SQL Server is 3.85.xx.xx
>> >>
>> >> Appreciate if somebody could help me out as i am
doing
>> >> some data migration which i have set up some DTS
jobs to
>> >> copy data daily over instead of one big chunks the
day
>> >> before migration
>> >>
>> >> many thks
>> >>
>> >>
>> >
>> >
>> >.
>> >
>
>.
>|||Hi
Probably this is a permission issue. Make sure that you have full
permissions on destination server.
"maxzsim" <anonymous@.discussions.microsoft.com> wrote in message
news:673f01c493dc$63f279e0$a601280a@.phx.gbl...
> Hi Uri ,
> i have used the openrowset but it says "server does not
> exist or access denied" which i am using the
> administrator's id & pwd
> rdgs
> >--Original Message--
> >Hi
> >Do you have specified Server Type in the first tab when
> you use EM?
> >
> >
> >
> >
> >"maxzsim" <anonymous@.discussions.microsoft.com> wrote in
> message
> >news:695e01c493d8$fbf0ae50$a301280a@.phx.gbl...
> >> Hi Uri ,
> >> thks will try out urs
> >> but for my creation script
> >>
> >> i have used the Enterprise Manager and just specify
> the
> >> remote user & pwd
> >>
> >> for the query analyzer on the sql server i used :
> >>
> >> sp_addlinkedserver 'serverA' -- it's using sql server
> so
> >> i did not specify the rest of the connection
> >>
> >> sp_addsvrlogin 'serverA' ,
> >> false , 'sa', 'userid' , 'userpassword'
> >>
> >> for the query analyzer from my local client
> computer ,
> >> i simply enter the server name , enter the pwd & id and
> i
> >> get connected
> >> >--Original Message--
> >> >maxzim
> >> >Can you show us your creation script?
> >> >This example works without creating a linked server
> >> >declare @.pid varchar(30)
> >> >set @.pid='2450'
> >> >
> >> >
> >> >select id from openrowset('sqloledb',
> >> >'server';'sa';'pass',database.dbo.table)
> >> >where id > @.pid
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >"maxzsim" <anonymous@.discussions.microsoft.com> wrote
> in
> >> message
> >> >news:680a01c493d3$071362b0$a501280a@.phx.gbl...
> >> >> Hi ,
> >> >>
> >> >> I have tried to add a linked server(sql2000)
> residing
> >> >> at location B from Location A (a server
> computer ,using
> >> >> SQL 7.0) but i got the error "general network error ,
> >> pls
> >> >> check network documentation" I have gotten the
> correct
> >> >> login id & pwd from the user at the other end.
> >> >>
> >> >> have also configured the port#(under Client
> Utility)
> >> >> correctly for client connection and also triedthe
> >> >> sp_addlinkedservers & sp_addsvrlogin already
> >> >>
> >> >> Is there any dll file needed ? such as
> DBNET.dll ? to
> >> >> add linked server from sql ver 7.0 to sql2000 ?
> >> >>
> >> >> Does it need any specific version of the odbc
> driver
> >> >> for SQL Server ? current it's version is 3.70.10.63 i
> >> have
> >> >> tried to add and odbc link but still have the same
> error
> >> >>
> >> >> I have no problem when using Query Analyzer from my
> >> >> client computer AND the user from the other end is
> able
> >> to
> >> >> add my sqlserver successfully as a linked server. The
> >> odbc
> >> >> driver for SQL Server is 3.85.xx.xx
> >> >>
> >> >> Appreciate if somebody could help me out as i am
> doing
> >> >> some data migration which i have set up some DTS
> jobs to
> >> >> copy data daily over instead of one big chunks the
> day
> >> >> before migration
> >> >>
> >> >> many thks
> >> >>
> >> >>
> >> >
> >> >
> >> >.
> >> >
> >
> >
> >.
> >|||Hi Uri ,
i'll have to check wif the administrator at the other
end then
thks for all the help given =)
>--Original Message--
>Hi
>Probably this is a permission issue. Make sure that you
have full
>permissions on destination server.
>
>"maxzsim" <anonymous@.discussions.microsoft.com> wrote in
message
>news:673f01c493dc$63f279e0$a601280a@.phx.gbl...
>> Hi Uri ,
>> i have used the openrowset but it says "server does not
>> exist or access denied" which i am using the
>> administrator's id & pwd
>> rdgs
>> >--Original Message--
>> >Hi
>> >Do you have specified Server Type in the first tab when
>> you use EM?
>> >
>> >
>> >
>> >
>> >"maxzsim" <anonymous@.discussions.microsoft.com> wrote
in
>> message
>> >news:695e01c493d8$fbf0ae50$a301280a@.phx.gbl...
>> >> Hi Uri ,
>> >> thks will try out urs
>> >> but for my creation script
>> >>
>> >> i have used the Enterprise Manager and just
specify
>> the
>> >> remote user & pwd
>> >>
>> >> for the query analyzer on the sql server i used :
>> >>
>> >> sp_addlinkedserver 'serverA' -- it's using sql
server
>> so
>> >> i did not specify the rest of the connection
>> >>
>> >> sp_addsvrlogin 'serverA' ,
>> >> false , 'sa', 'userid' , 'userpassword'
>> >>
>> >> for the query analyzer from my local client
>> computer ,
>> >> i simply enter the server name , enter the pwd & id
and
>> i
>> >> get connected
>> >> >--Original Message--
>> >> >maxzim
>> >> >Can you show us your creation script?
>> >> >This example works without creating a linked server
>> >> >declare @.pid varchar(30)
>> >> >set @.pid='2450'
>> >> >
>> >> >
>> >> >select id from openrowset('sqloledb',
>> >> >'server';'sa';'pass',database.dbo.table)
>> >> >where id > @.pid
>> >> >
>> >> >
>> >> >
>> >> >
>> >> >
>> >> >
>> >> >
>> >> >"maxzsim" <anonymous@.discussions.microsoft.com>
wrote
>> in
>> >> message
>> >> >news:680a01c493d3$071362b0$a501280a@.phx.gbl...
>> >> >> Hi ,
>> >> >>
>> >> >> I have tried to add a linked server(sql2000)
>> residing
>> >> >> at location B from Location A (a server
>> computer ,using
>> >> >> SQL 7.0) but i got the error "general network
error ,
>> >> pls
>> >> >> check network documentation" I have gotten the
>> correct
>> >> >> login id & pwd from the user at the other end.
>> >> >>
>> >> >> have also configured the port#(under Client
>> Utility)
>> >> >> correctly for client connection and also triedthe
>> >> >> sp_addlinkedservers & sp_addsvrlogin already
>> >> >>
>> >> >> Is there any dll file needed ? such as
>> DBNET.dll ? to
>> >> >> add linked server from sql ver 7.0 to sql2000 ?
>> >> >>
>> >> >> Does it need any specific version of the odbc
>> driver
>> >> >> for SQL Server ? current it's version is
3.70.10.63 i
>> >> have
>> >> >> tried to add and odbc link but still have the same
>> error
>> >> >>
>> >> >> I have no problem when using Query Analyzer
from my
>> >> >> client computer AND the user from the other end is
>> able
>> >> to
>> >> >> add my sqlserver successfully as a linked server.
The
>> >> odbc
>> >> >> driver for SQL Server is 3.85.xx.xx
>> >> >>
>> >> >> Appreciate if somebody could help me out as i am
>> doing
>> >> >> some data migration which i have set up some DTS
>> jobs to
>> >> >> copy data daily over instead of one big chunks the
>> day
>> >> >> before migration
>> >> >>
>> >> >> many thks
>> >> >>
>> >> >>
>> >> >
>> >> >
>> >> >.
>> >> >
>> >
>> >
>> >.
>> >
>
>.
>
Thursday, February 9, 2012
actual space used in data file
I'm having a problem need your help:
I can see all properties of datafile (FilegroupName, FileID, FileType,
Location, CurrentSize, Space Used) by Enterpise Manager.
Please tell me how do I see all those properties by SQL Query Analyzer.
I want to know actual space used in data file to shrink file.
Thanks in advanced,
TN
sp_helpdb <your db>
can give you alot of this info
"TN" <TN@.discussions.microsoft.com> wrote in message
news:A86BD7C1-BC03-4163-80C9-EFB6A688D0B3@.microsoft.com...
> Hi all,
> I'm having a problem need your help:
> I can see all properties of datafile (FilegroupName, FileID, FileType,
> Location, CurrentSize, Space Used) by Enterpise Manager.
> Please tell me how do I see all those properties by SQL Query Analyzer.
> I want to know actual space used in data file to shrink file.
> Thanks in advanced,
> TN
|||Thanks for your help.
But this Proc does not tell me space used in data file.
I can see space used in data file
right click on DB
select All Tasks menu item
select Shrink Database..
click Files button
I can see all
I want to know like this in SQL Query Analyzer
Thanks
TN
"Armando Prato" wrote:
> sp_helpdb <your db>
> can give you alot of this info
> "TN" <TN@.discussions.microsoft.com> wrote in message
> news:A86BD7C1-BC03-4163-80C9-EFB6A688D0B3@.microsoft.com...
>
>
|||Enterprise Mangler uses an undocumented DBCC function called DBCC
SHOWFILESTATS. You will need to build a tool around it if you want more
than absolute bare-bones information.
Geoff N. Hiten
Microsoft SQL Server MVP
Senior Database Administrator
Careerbuilder.com
I support the Professional Association for SQL Server
www.sqlpass.org
"TN" <TN@.discussions.microsoft.com> wrote in message
news:305ECE55-D52D-4326-995C-221F8EE005D2@.microsoft.com...[vbcol=seagreen]
> Thanks for your help.
> But this Proc does not tell me space used in data file.
> I can see space used in data file
> right click on DB
> select All Tasks menu item
> select Shrink Database..
> click Files button
> I can see all
> I want to know like this in SQL Query Analyzer
> Thanks
> TN
> "Armando Prato" wrote:
Analyzer.[vbcol=seagreen]
|||Use profiler - you can see exactly what queries EM uses to do this.
"TN" <TN@.discussions.microsoft.com> wrote in message
news:305ECE55-D52D-4326-995C-221F8EE005D2@.microsoft.com...[vbcol=seagreen]
> Thanks for your help.
> But this Proc does not tell me space used in data file.
> I can see space used in data file
> right click on DB
> select All Tasks menu item
> select Shrink Database..
> click Files button
> I can see all
> I want to know like this in SQL Query Analyzer
> Thanks
> TN
> "Armando Prato" wrote:
Analyzer.[vbcol=seagreen]
|||Thanks Scott,
I do not know what is profiler.
Please tell me how to use this tool.
Thanks
TN
"Scott Morris" wrote:
> Use profiler - you can see exactly what queries EM uses to do this.
> "TN" <TN@.discussions.microsoft.com> wrote in message
> news:305ECE55-D52D-4326-995C-221F8EE005D2@.microsoft.com...
> Analyzer.
>
>
|||Perhaps now would be a good time to spend a little effort familiarizing
yourself with the tools provided with SQL Server (of which profiler is one).
Each is documented in the SQL Server documentation; the appropriate section
of the documentation can be accessed directly from each application (for
those that are not command-line based) using the Help menu. In addition,
you can find answers to many basic and advanced questions by searching the
index or by searching the documentation just by guessing with appropriate
words. The online documentation shipped with SQL server is generally
referred to as BOL in the newsgroups (Books OnLine - which is the text of
the corresponding item in the Start menu).
"TN" <TN@.discussions.microsoft.com> wrote in message
news:E10E2A99-F3FF-4E90-A253-EBE562FD1393@.microsoft.com...[vbcol=seagreen]
> Thanks Scott,
> I do not know what is profiler.
> Please tell me how to use this tool.
> Thanks
> TN
> "Scott Morris" wrote:
FileType,[vbcol=seagreen]
actual space used in data file
I'm having a problem need your help:
I can see all properties of datafile (FilegroupName, FileID, FileType,
Location, CurrentSize, Space Used) by Enterpise Manager.
Please tell me how do I see all those properties by SQL Query Analyzer.
I want to know actual space used in data file to shrink file.
Thanks in advanced,
TNsp_helpdb <your db>
can give you alot of this info
"TN" <TN@.discussions.microsoft.com> wrote in message
news:A86BD7C1-BC03-4163-80C9-EFB6A688D0B3@.microsoft.com...
> Hi all,
> I'm having a problem need your help:
> I can see all properties of datafile (FilegroupName, FileID, FileType,
> Location, CurrentSize, Space Used) by Enterpise Manager.
> Please tell me how do I see all those properties by SQL Query Analyzer.
> I want to know actual space used in data file to shrink file.
> Thanks in advanced,
> TN|||Thanks for your help.
But this Proc does not tell me space used in data file.
I can see space used in data file
right click on DB
select All Tasks menu item
select Shrink Database..
click Files button
I can see all
I want to know like this in SQL Query Analyzer
Thanks
TN
"Armando Prato" wrote:
> sp_helpdb <your db>
> can give you alot of this info
> "TN" <TN@.discussions.microsoft.com> wrote in message
> news:A86BD7C1-BC03-4163-80C9-EFB6A688D0B3@.microsoft.com...
>
>|||Enterprise Mangler uses an undocumented DBCC function called DBCC
SHOWFILESTATS. You will need to build a tool around it if you want more
than absolute bare-bones information.
Geoff N. Hiten
Microsoft SQL Server MVP
Senior Database Administrator
Careerbuilder.com
I support the Professional Association for SQL Server
www.sqlpass.org
"TN" <TN@.discussions.microsoft.com> wrote in message
news:305ECE55-D52D-4326-995C-221F8EE005D2@.microsoft.com...[vbcol=seagreen]
> Thanks for your help.
> But this Proc does not tell me space used in data file.
> I can see space used in data file
> right click on DB
> select All Tasks menu item
> select Shrink Database..
> click Files button
> I can see all
> I want to know like this in SQL Query Analyzer
> Thanks
> TN
> "Armando Prato" wrote:
>
Analyzer.[vbcol=seagreen]|||Use profiler - you can see exactly what queries EM uses to do this.
"TN" <TN@.discussions.microsoft.com> wrote in message
news:305ECE55-D52D-4326-995C-221F8EE005D2@.microsoft.com...[vbcol=seagreen]
> Thanks for your help.
> But this Proc does not tell me space used in data file.
> I can see space used in data file
> right click on DB
> select All Tasks menu item
> select Shrink Database..
> click Files button
> I can see all
> I want to know like this in SQL Query Analyzer
> Thanks
> TN
> "Armando Prato" wrote:
>
Analyzer.[vbcol=seagreen]|||Thanks Scott,
I do not know what is profiler.
Please tell me how to use this tool.
Thanks
TN
"Scott Morris" wrote:
> Use profiler - you can see exactly what queries EM uses to do this.
> "TN" <TN@.discussions.microsoft.com> wrote in message
> news:305ECE55-D52D-4326-995C-221F8EE005D2@.microsoft.com...
> Analyzer.
>
>|||Perhaps now would be a good time to spend a little effort familiarizing
yourself with the tools provided with SQL Server (of which profiler is one).
Each is documented in the SQL Server documentation; the appropriate section
of the documentation can be accessed directly from each application (for
those that are not command-line based) using the Help menu. In addition,
you can find answers to many basic and advanced questions by searching the
index or by searching the documentation just by guessing with appropriate
words. The online documentation shipped with SQL server is generally
referred to as BOL in the newsgroups (Books OnLine - which is the text of
the corresponding item in the Start menu).
"TN" <TN@.discussions.microsoft.com> wrote in message
news:E10E2A99-F3FF-4E90-A253-EBE562FD1393@.microsoft.com...[vbcol=seagreen]
> Thanks Scott,
> I do not know what is profiler.
> Please tell me how to use this tool.
> Thanks
> TN
> "Scott Morris" wrote:
>
FileType,[vbcol=seagreen]
actual space used in data file
I'm having a problem need your help:
I can see all properties of datafile (FilegroupName, FileID, FileType,
Location, CurrentSize, Space Used) by Enterpise Manager.
Please tell me how do I see all those properties by SQL Query Analyzer.
I want to know actual space used in data file to shrink file.
Thanks in advanced,
TNsp_helpdb <your db>
can give you alot of this info
"TN" <TN@.discussions.microsoft.com> wrote in message
news:A86BD7C1-BC03-4163-80C9-EFB6A688D0B3@.microsoft.com...
> Hi all,
> I'm having a problem need your help:
> I can see all properties of datafile (FilegroupName, FileID, FileType,
> Location, CurrentSize, Space Used) by Enterpise Manager.
> Please tell me how do I see all those properties by SQL Query Analyzer.
> I want to know actual space used in data file to shrink file.
> Thanks in advanced,
> TN|||Thanks for your help.
But this Proc does not tell me space used in data file.
I can see space used in data file
right click on DB
select All Tasks menu item
select Shrink Database..
click Files button
I can see all
I want to know like this in SQL Query Analyzer
Thanks
TN
"Armando Prato" wrote:
> sp_helpdb <your db>
> can give you alot of this info
> "TN" <TN@.discussions.microsoft.com> wrote in message
> news:A86BD7C1-BC03-4163-80C9-EFB6A688D0B3@.microsoft.com...
> > Hi all,
> >
> > I'm having a problem need your help:
> >
> > I can see all properties of datafile (FilegroupName, FileID, FileType,
> > Location, CurrentSize, Space Used) by Enterpise Manager.
> >
> > Please tell me how do I see all those properties by SQL Query Analyzer.
> > I want to know actual space used in data file to shrink file.
> >
> > Thanks in advanced,
> > TN
>
>|||Enterprise Mangler uses an undocumented DBCC function called DBCC
SHOWFILESTATS. You will need to build a tool around it if you want more
than absolute bare-bones information.
--
Geoff N. Hiten
Microsoft SQL Server MVP
Senior Database Administrator
Careerbuilder.com
I support the Professional Association for SQL Server
www.sqlpass.org
"TN" <TN@.discussions.microsoft.com> wrote in message
news:305ECE55-D52D-4326-995C-221F8EE005D2@.microsoft.com...
> Thanks for your help.
> But this Proc does not tell me space used in data file.
> I can see space used in data file
> right click on DB
> select All Tasks menu item
> select Shrink Database..
> click Files button
> I can see all
> I want to know like this in SQL Query Analyzer
> Thanks
> TN
> "Armando Prato" wrote:
> > sp_helpdb <your db>
> >
> > can give you alot of this info
> >
> > "TN" <TN@.discussions.microsoft.com> wrote in message
> > news:A86BD7C1-BC03-4163-80C9-EFB6A688D0B3@.microsoft.com...
> > > Hi all,
> > >
> > > I'm having a problem need your help:
> > >
> > > I can see all properties of datafile (FilegroupName, FileID, FileType,
> > > Location, CurrentSize, Space Used) by Enterpise Manager.
> > >
> > > Please tell me how do I see all those properties by SQL Query
Analyzer.
> > > I want to know actual space used in data file to shrink file.
> > >
> > > Thanks in advanced,
> > > TN
> >
> >
> >|||Use profiler - you can see exactly what queries EM uses to do this.
"TN" <TN@.discussions.microsoft.com> wrote in message
news:305ECE55-D52D-4326-995C-221F8EE005D2@.microsoft.com...
> Thanks for your help.
> But this Proc does not tell me space used in data file.
> I can see space used in data file
> right click on DB
> select All Tasks menu item
> select Shrink Database..
> click Files button
> I can see all
> I want to know like this in SQL Query Analyzer
> Thanks
> TN
> "Armando Prato" wrote:
> > sp_helpdb <your db>
> >
> > can give you alot of this info
> >
> > "TN" <TN@.discussions.microsoft.com> wrote in message
> > news:A86BD7C1-BC03-4163-80C9-EFB6A688D0B3@.microsoft.com...
> > > Hi all,
> > >
> > > I'm having a problem need your help:
> > >
> > > I can see all properties of datafile (FilegroupName, FileID, FileType,
> > > Location, CurrentSize, Space Used) by Enterpise Manager.
> > >
> > > Please tell me how do I see all those properties by SQL Query
Analyzer.
> > > I want to know actual space used in data file to shrink file.
> > >
> > > Thanks in advanced,
> > > TN
> >
> >
> >|||Thanks Scott,
I do not know what is profiler.
Please tell me how to use this tool.
Thanks
TN
"Scott Morris" wrote:
> Use profiler - you can see exactly what queries EM uses to do this.
> "TN" <TN@.discussions.microsoft.com> wrote in message
> news:305ECE55-D52D-4326-995C-221F8EE005D2@.microsoft.com...
> > Thanks for your help.
> > But this Proc does not tell me space used in data file.
> > I can see space used in data file
> >
> > right click on DB
> > select All Tasks menu item
> > select Shrink Database..
> > click Files button
> >
> > I can see all
> >
> > I want to know like this in SQL Query Analyzer
> >
> > Thanks
> > TN
> >
> > "Armando Prato" wrote:
> >
> > > sp_helpdb <your db>
> > >
> > > can give you alot of this info
> > >
> > > "TN" <TN@.discussions.microsoft.com> wrote in message
> > > news:A86BD7C1-BC03-4163-80C9-EFB6A688D0B3@.microsoft.com...
> > > > Hi all,
> > > >
> > > > I'm having a problem need your help:
> > > >
> > > > I can see all properties of datafile (FilegroupName, FileID, FileType,
> > > > Location, CurrentSize, Space Used) by Enterpise Manager.
> > > >
> > > > Please tell me how do I see all those properties by SQL Query
> Analyzer.
> > > > I want to know actual space used in data file to shrink file.
> > > >
> > > > Thanks in advanced,
> > > > TN
> > >
> > >
> > >
>
>|||Perhaps now would be a good time to spend a little effort familiarizing
yourself with the tools provided with SQL Server (of which profiler is one).
Each is documented in the SQL Server documentation; the appropriate section
of the documentation can be accessed directly from each application (for
those that are not command-line based) using the Help menu. In addition,
you can find answers to many basic and advanced questions by searching the
index or by searching the documentation just by guessing with appropriate
words. The online documentation shipped with SQL server is generally
referred to as BOL in the newsgroups (Books OnLine - which is the text of
the corresponding item in the Start menu).
"TN" <TN@.discussions.microsoft.com> wrote in message
news:E10E2A99-F3FF-4E90-A253-EBE562FD1393@.microsoft.com...
> Thanks Scott,
> I do not know what is profiler.
> Please tell me how to use this tool.
> Thanks
> TN
> "Scott Morris" wrote:
> > Use profiler - you can see exactly what queries EM uses to do this.
> >
> > "TN" <TN@.discussions.microsoft.com> wrote in message
> > news:305ECE55-D52D-4326-995C-221F8EE005D2@.microsoft.com...
> > > Thanks for your help.
> > > But this Proc does not tell me space used in data file.
> > > I can see space used in data file
> > >
> > > right click on DB
> > > select All Tasks menu item
> > > select Shrink Database..
> > > click Files button
> > >
> > > I can see all
> > >
> > > I want to know like this in SQL Query Analyzer
> > >
> > > Thanks
> > > TN
> > >
> > > "Armando Prato" wrote:
> > >
> > > > sp_helpdb <your db>
> > > >
> > > > can give you alot of this info
> > > >
> > > > "TN" <TN@.discussions.microsoft.com> wrote in message
> > > > news:A86BD7C1-BC03-4163-80C9-EFB6A688D0B3@.microsoft.com...
> > > > > Hi all,
> > > > >
> > > > > I'm having a problem need your help:
> > > > >
> > > > > I can see all properties of datafile (FilegroupName, FileID,
FileType,
> > > > > Location, CurrentSize, Space Used) by Enterpise Manager.
> > > > >
> > > > > Please tell me how do I see all those properties by SQL Query
> > Analyzer.
> > > > > I want to know actual space used in data file to shrink file.
> > > > >
> > > > > Thanks in advanced,
> > > > > TN
> > > >
> > > >
> > > >
> >
> >
> >