Showing posts with label group. Show all posts
Showing posts with label group. Show all posts

Sunday, March 25, 2012

Dropping a file in a filegroup that does not exist.

Hi,
I moved a database from an older sql box to one of our new servers. One of
the files in the prmiary file group was not moved and the server was wiped...
the filename is sysft_ix_STS_neo_1414639615. Everytime I try to do a backup
of that database I get a "file or firegroup is not online..." error message
and SQL won't let me drop it because it does not exist. Can anyone help me
out?Hi Henry
If there was data in this filegroup then you would have to resort to your
last backup.
John
"Henry" wrote:
> Hi,
> I moved a database from an older sql box to one of our new servers. One of
> the files in the prmiary file group was not moved and the server was wiped...
> the filename is sysft_ix_STS_neo_1414639615. Everytime I try to do a backup
> of that database I get a "file or firegroup is not online..." error message
> and SQL won't let me drop it because it does not exist. Can anyone help me
> out?|||I'm pretty certain this is the full text index and that rebuilding or removing full-text indexing
would solve this. This is what I recall from earlier post with the same problem.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:7E297789-FEFB-41D9-BF17-90BF96129198@.microsoft.com...
> Hi Henry
> If there was data in this filegroup then you would have to resort to your
> last backup.
> John
> "Henry" wrote:
>> Hi,
>> I moved a database from an older sql box to one of our new servers. One of
>> the files in the prmiary file group was not moved and the server was wiped...
>> the filename is sysft_ix_STS_neo_1414639615. Everytime I try to do a backup
>> of that database I get a "file or firegroup is not online..." error message
>> and SQL won't let me drop it because it does not exist. Can anyone help me
>> out?|||Hi Tibor
You are probably right! sp_help_fulltext_catalogs might verify this!
John
"Tibor Karaszi" wrote:
> I'm pretty certain this is the full text index and that rebuilding or removing full-text indexing
> would solve this. This is what I recall from earlier post with the same problem.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "John Bell" <jbellnewsposts@.hotmail.com> wrote in message
> news:7E297789-FEFB-41D9-BF17-90BF96129198@.microsoft.com...
> > Hi Henry
> >
> > If there was data in this filegroup then you would have to resort to your
> > last backup.
> >
> > John
> >
> > "Henry" wrote:
> >
> >> Hi,
> >>
> >> I moved a database from an older sql box to one of our new servers. One of
> >> the files in the prmiary file group was not moved and the server was wiped...
> >> the filename is sysft_ix_STS_neo_1414639615. Everytime I try to do a backup
> >> of that database I get a "file or firegroup is not online..." error message
> >> and SQL won't let me drop it because it does not exist. Can anyone help me
> >> out?
>

Dropping a file in a filegroup that does not exist.

Hi,
I moved a database from an older sql box to one of our new servers. One of
the files in the prmiary file group was not moved and the server was wiped..
.
the filename is sysft_ix_STS_neo_1414639615. Everytime I try to do a backup
of that database I get a "file or firegroup is not online..." error message
and SQL won't let me drop it because it does not exist. Can anyone help me
out?Hi Henry
If there was data in this filegroup then you would have to resort to your
last backup.
John
"Henry" wrote:

> Hi,
> I moved a database from an older sql box to one of our new servers. One o
f
> the files in the prmiary file group was not moved and the server was wiped
..
> the filename is sysft_ix_STS_neo_1414639615. Everytime I try to do a back
up
> of that database I get a "file or firegroup is not online..." error messag
e
> and SQL won't let me drop it because it does not exist. Can anyone help m
e
> out?|||Hi Henry
If there was data in this filegroup then you would have to resort to your
last backup.
John
"Henry" wrote:

> Hi,
> I moved a database from an older sql box to one of our new servers. One o
f
> the files in the prmiary file group was not moved and the server was wiped
..
> the filename is sysft_ix_STS_neo_1414639615. Everytime I try to do a back
up
> of that database I get a "file or firegroup is not online..." error messag
e
> and SQL won't let me drop it because it does not exist. Can anyone help m
e
> out?|||I'm pretty certain this is the full text index and that rebuilding or removi
ng full-text indexing
would solve this. This is what I recall from earlier post with the same prob
lem.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:7E297789-FEFB-41D9-BF17-90BF96129198@.microsoft.com...[vbcol=seagreen]
> Hi Henry
> If there was data in this filegroup then you would have to resort to your
> last backup.
> John
> "Henry" wrote:
>|||Hi Tibor
You are probably right! sp_help_fulltext_catalogs might verify this!
John
"Tibor Karaszi" wrote:

> I'm pretty certain this is the full text index and that rebuilding or remo
ving full-text indexing
> would solve this. This is what I recall from earlier post with the same pr
oblem.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "John Bell" <jbellnewsposts@.hotmail.com> wrote in message
> news:7E297789-FEFB-41D9-BF17-90BF96129198@.microsoft.com...
>|||I'm pretty certain this is the full text index and that rebuilding or removi
ng full-text indexing
would solve this. This is what I recall from earlier post with the same prob
lem.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:7E297789-FEFB-41D9-BF17-90BF96129198@.microsoft.com...[vbcol=seagreen]
> Hi Henry
> If there was data in this filegroup then you would have to resort to your
> last backup.
> John
> "Henry" wrote:
>|||Hi Tibor
You are probably right! sp_help_fulltext_catalogs might verify this!
John
"Tibor Karaszi" wrote:

> I'm pretty certain this is the full text index and that rebuilding or remo
ving full-text indexing
> would solve this. This is what I recall from earlier post with the same pr
oblem.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "John Bell" <jbellnewsposts@.hotmail.com> wrote in message
> news:7E297789-FEFB-41D9-BF17-90BF96129198@.microsoft.com...
>

Wednesday, March 7, 2012

Drop all indexes in a table, how to drop all for user tables in database

Hi,
I found this SQL in the news group to drop indexs in a table. I need a
script that will drop all indexes in all user tables of a given
database:

DECLARE @.indexName NVARCHAR(128)
DECLARE @.dropIndexSql NVARCHAR(4000)

DECLARE tableIndexes CURSOR FOR
SELECT name FROM sysindexes
WHERE id = OBJECT_ID(N'F_BI_Registration_Tracking_Summary')
AND indid 0
AND indid < 255
AND INDEXPROPERTY(id, name, 'IsStatistics') = 0
OPEN tableIndexes
FETCH NEXT FROM tableIndexes INTO @.indexName
WHILE @.@.fetch_status = 0
BEGIN
SET @.dropIndexSql = N' DROP INDEX
F_BI_Registration_Tracking_Summary.' + @.indexName
EXEC sp_executesql @.dropIndexSql
FETCH NEXT FROM tableIndexes INTO @.indexName
END
CLOSE tableIndexes
DEALLOCATE tableIndexes
TIA
Robrcamarda wrote:

Quote:

Originally Posted by

Hi,
I found this SQL in the news group to drop indexs in a table. I need a
script that will drop all indexes in all user tables of a given
database:
>
DECLARE @.indexName NVARCHAR(128)
DECLARE @.dropIndexSql NVARCHAR(4000)
>
DECLARE tableIndexes CURSOR FOR
SELECT name FROM sysindexes
WHERE id = OBJECT_ID(N'F_BI_Registration_Tracking_Summary')
AND indid 0
AND indid < 255
AND INDEXPROPERTY(id, name, 'IsStatistics') = 0
OPEN tableIndexes
FETCH NEXT FROM tableIndexes INTO @.indexName
WHILE @.@.fetch_status = 0
BEGIN
SET @.dropIndexSql = N' DROP INDEX
F_BI_Registration_Tracking_Summary.' + @.indexName
EXEC sp_executesql @.dropIndexSql
FETCH NEXT FROM tableIndexes INTO @.indexName
END
CLOSE tableIndexes
DEALLOCATE tableIndexes
TIA
Rob


Hi Rob,

DECLARE @.indexName sysname --Changed to sysname, since that's what it
was
DECLARE @.tableName sysname
DECLARE @.dropIndexSql NVARCHAR(4000)

DECLARE tableIndexes CURSOR FOR
SELECT name,OBJECT_NAME(ID) FROM sysindexes
WHERE OBJECTPROPERTY(ID,N'IsTable') = 1 AND
OBJECTPROPERTY(ID,N'IsMSShipped') = 0
AND indid 0 --Is this right? Wouldn't this attempt to drop
clustered PK?
AND indid < 255
AND INDEXPROPERTY(id, name, 'IsStatistics') = 0
OPEN tableIndexes
FETCH NEXT FROM tableIndexes INTO @.indexName, @.tableName
WHILE @.@.fetch_status = 0
BEGIN
SET @.dropIndexSql = N' DROP INDEX ' + @.tableName + '.'
+ @.indexName
EXEC sp_executesql @.dropIndexSql
FETCH NEXT FROM tableIndexes INTO @.indexName, @.tableName
END
CLOSE tableIndexes
DEALLOCATE tableIndexes

I assume you're doing this for some kind of maintenance procedure in
your database, where you've already scripted off all of the indexes.

Damien|||Thanks Damien,
You are correct. I am using Cognos' Data Manager to build my data
warehouse. In on database, I truncate and reload all the data via it's
SQL API, so I loads pretty quick. It maintains the indexes, however I
indexes I build outside the tool. Since I truncate the tables, I dont
want indexes updated during the load, I will build them after. Hence,
the need to drop all indexes of my table before I load the data.
TYVM!
rOB

Quote:

Originally Posted by

>
I assume you're doing this for some kind of maintenance procedure in
your database, where you've already scripted off all of the indexes.
>
Damien

Sunday, February 19, 2012

drill-through from matrix subtotals

I have a matrix report (Report1) with rowgroup and columngroup. Both
contain also totals (defined as group subtotals). The number of rows and
columns varies.
Area1 Area2 Totals
Product 1 10 12 22
Product 2 7 11 18
Totals 17 23 40
I also have another report where I can list this data more detailed
(Report2). Report2 uses Product and Area as parameters where possible
values are 'Product 1', 'Product2' and 'All Products' (Area respectively).
Now I want to drill-through from Report1 into details in Report2 by
clicking the cell containing the number. I use 'Jump to report'-navigation
and fill the parameters from Report1 matrix dataset. This works fine as
long as I start drill-through from data cell ie. click numbers 10,12,7 or
11. The problem is that also the 'Totals' appear as links, but the
parameters are not filled in correctly.
So the question is how to define the parameters in 'Jump to report' so that
when clicking Product 1 totals (22) the parameters to Report2 are set to
Product 1 - All Areas.
-pasi
--
Message posted via http://www.sqlmonster.comPlease check the MSDN documentation about the InScope function:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/RSCREATE/htm/rcr_creating_expressions_v1_0jmt.asp
With InScope you can determine the current scope of a matrix cell and set
the drillthrough parameters accordingly. I.e. you would use an
IIF-expression to set the value of the drillthrough parameters correctly
based on the InScope return values. Note: a matrix cell is "in scope" of
column and row groupings, so you need at least two InScope function calls in
the case where you have 1 dynamic row and 1 dynamic column grouping. E.g.
=iif(InScope("ColumnGroup1"), iif(InScope("RowGroup1"), "In Cell", "In
Subtotal of RowGroup1"), iif(InScope("RowGroup1"), "In Subtotal of
ColumnGroup1", "In Subtotal of entire matrix"))
-- Robert
This posting is provided "AS IS" with no warranties, and confers no rights.
"Pasi Norrbacka via SQLMonster.com" <forum@.nospam.SQLMonster.com> wrote in
message news:dc114ab8cd48487a97ef6575f7bc7185@.SQLMonster.com...
>I have a matrix report (Report1) with rowgroup and columngroup. Both
> contain also totals (defined as group subtotals). The number of rows and
> columns varies.
> Area1 Area2 Totals
> Product 1 10 12 22
> Product 2 7 11 18
> Totals 17 23 40
> I also have another report where I can list this data more detailed
> (Report2). Report2 uses Product and Area as parameters where possible
> values are 'Product 1', 'Product2' and 'All Products' (Area respectively).
> Now I want to drill-through from Report1 into details in Report2 by
> clicking the cell containing the number. I use 'Jump to report'-navigation
> and fill the parameters from Report1 matrix dataset. This works fine as
> long as I start drill-through from data cell ie. click numbers 10,12,7 or
> 11. The problem is that also the 'Totals' appear as links, but the
> parameters are not filled in correctly.
> So the question is how to define the parameters in 'Jump to report' so
> that
> when clicking Product 1 totals (22) the parameters to Report2 are set to
> Product 1 - All Areas.
> -pasi
> --
> Message posted via http://www.sqlmonster.com|||Thanks, it works.
--
Message posted via http://www.sqlmonster.com

Friday, February 17, 2012

Drillthrough (beginner)

I have created two reports. One links to the other with a drillthrough. The linking works fine, but no values show up in the fields besides the group titles and column titles. Why is this happening?

The user is given a list of Counties with values. The Counties(in a matrix) are clickable for a drillthrough of Ages and Genders in the Counties. Looks something like this:

Years

Counties Total Crashes Fatalities

Cook 85 98

Manchester 2850 258

Sagamon 987 526

So when a user clicks a county, such as "Cook", this is displayed

Years

Age Gender Total Crashes Fatalities

0-8 Female 25 8

Male 55 15

9-15 Female 850 258

Male 185 35

16-22 Female 87 526

Male 10 35

But I am getting this in :

Years

Age Gender Total Crashes Fatalities

0-8 Female

Male

9-15 Female

Male

16-22 Female

Male

Whats going on? Can anyone make any suggestions? Just to let you know its based off of an Analysis Services Cube and not relational tables.

Does you second report have a county parameter? and, if so, have you linked the County field in the first report to the parameter in the second report?

- Ali

|||

Yes, my second report has a county report paramater, and i did the hyperlink the first report parameter to the second. (Right clicked county>Properties>Navigation>Jump to Report>Parameters>CrashCounty=Fields!CrashCounty.value).

It seemed to be linking, but its not displaying hardly any values. I have this report seperate with out the linking and its filled with values. Did i forget something?

drilling in to subreports

hi,
i need to created a main report which in turn leads to subreport.for eg say my main report has a group name and names of the person in that group.iam would passing the groupname as a parameter in the main report.what i actually need is that when i click on person name in the groupon my main report ,then i want my subreport showing the details of that particular person.how could i achieve this.
Thanks in Advance.
regards,
:wave: jemimaI use CR 8.5 and RDC for report creation...

Try this...

Set all your subreports to Suppress = True when you first run your report. Then set Report.subReport.Suppress = False (where subReport is the name that you gave your subreport) when the user clicks on the drill down. (I apologize, I don't know exactly how to code this)

drilldown group expanded by default

Hello!!

I have a matrix in a report with groups and subgroups like this :

*group1

*subgroup1.1

item1

item2

etc.

I would like to show the group expanded by default so when I view the report I see:

*group1

subgroup1.1

*group2

subgroup 2.1

Right now I've played with InitialToggleState and visibility->Hidden properties but I don′t know how to do it....help me please

Thanks

You need to set the visibility of the inner group to true. Right click and edit the group in the matrix.|||

I published an article showing the steps for this (at least an example similar enough to be useful, hopefully):

http://www.databasejournal.com/features/mssql/article.php/3527321

This was for MSRS2000, but the logic should be good in SSRS2005.

Good Luck!

Bill

William E. Pearson III
CPA, CMA, CIA, MCSE, MCDBA
Island Technologies Inc.
931 Monroe Drive
Suite 102-321
Atlanta, GA 30308

404.872.5972 Office

wep3@.islandtechnologies.com
wep3@.msas-architect.com

www.msas-architect.com
-- -- --

Publisher Sites:

http://www.databasejournal.com/article.php/1459531

http://www.sql-server-performance.com/bill_pearson.asp

http://www.informit.com/authors/bio.asp?a=862acd62-4662-49ae-879d-541c8b4d656f

http://www.2000trainers.com/section.aspx?sectionID=17

Tuesday, February 14, 2012

Drill-Down Context

I'm wanting to set the background color of a field. The field is part of a
drill-down row group (Office -> Transaction Type (visibility toggled by
Office) --> Field!TranCount.Value).
I would like to set the background color based on 2 conditions:
1) Field!x.Value (which I know) - this works currently
2) The context of the TranCount field
By context I mean...
If the drilldown is "open" or "closed".
Since the expression language in SRS is, apparently, very limited (and not
very well documented) I'm assuming that I'll have to live with Just setting
the background color based on the known field values.. but I can always ask!!!
TIADetermining the state of the drilldown toggle is not supported.
Bruce Johnson [MSFT]
Microsoft SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Glenn" <Glenn@.discussions.microsoft.com> wrote in message
news:82E55B4E-8153-4456-B0B9-9F45AE8AE797@.microsoft.com...
> I'm wanting to set the background color of a field. The field is part of a
> drill-down row group (Office -> Transaction Type (visibility toggled by
> Office) --> Field!TranCount.Value).
> I would like to set the background color based on 2 conditions:
> 1) Field!x.Value (which I know) - this works currently
> 2) The context of the TranCount field
> By context I mean...
> If the drilldown is "open" or "closed".
> Since the expression language in SRS is, apparently, very limited (and not
> very well documented) I'm assuming that I'll have to live with Just
> setting
> the background color based on the known field values.. but I can always
> ask!!!
> TIA

Drill down problem, report jumps to top of table!

Hi
I have a report with a table which has two groups. Each group is collapsed
by default when the report loads. When I click on the first group expand
icon (+) the group expands but also the report jumps up the screen so that
the top of my first data row in my table is alligned to the top of the IE
window. This is really annoying and I do not understand why it is happening.
Is this a known bug in RS or has anyone else had this problem and been able
to solve it? It also happens when I expand/collapse the second group.
I think it only started happening after I added a few images to my report. I
have tried removing the images from the report but this does not get rid of
the problem.
Any help/ideas would be greatly appreciated.
Kind Regards
Lewis Holmes
eNateHi
Problem solved!
In Visual Studio I had the page setup so that the body of the report was
larger than the area visible on the screen and so my footer was off the
screen. I have now changed this so that the body of the report is just large
enough for the contents of the body. Now the report does not jump around
when I expand/collapse groups.
Hope this may help anyone else with the same problem.
Regards
Lewis Holmes
eNate
"l.holmes" <enate@.newsgroups.nospam> wrote in message
news:u1ST$9g3FHA.2552@.TK2MSFTNGP10.phx.gbl...
> Hi
> I have a report with a table which has two groups. Each group is collapsed
> by default when the report loads. When I click on the first group expand
> icon (+) the group expands but also the report jumps up the screen so that
> the top of my first data row in my table is alligned to the top of the IE
> window. This is really annoying and I do not understand why it is
> happening. Is this a known bug in RS or has anyone else had this problem
> and been able to solve it? It also happens when I expand/collapse the
> second group.
> I think it only started happening after I added a few images to my report.
> I have tried removing the images from the report but this does not get rid
> of the problem.
> Any help/ideas would be greatly appreciated.
> Kind Regards
> Lewis Holmes
> eNate
>|||Hi Lewis,
It's great to hear you have resolved it and thanks so much for sharing your
experience with us.
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.