Showing posts with label tree. Show all posts
Showing posts with label tree. Show all posts

Friday, March 9, 2012

detach 6.5 compatible database in studio - HOW?

I've got two databases showing in the studio tree, but they are marked 6.5 compatible and cannot be expanded. Worse, there is no way (apparently) in the menu of either database to remove, delete or detach them.

How can I get these out of the system?

Thanks in advance.

randyv

What about using the TSQL statement for dropping / detaching the databases ? (DROP DATABASE / sp_detach)

HTH, Jens K. Suessmeyer.


http://www.sqlserver2005.de

|||

No, that doesn't work because it is grayed out... It finally dawned on me that since I could not take any action directly on the database due to compatibility problems, but that the database was from 2000, there was no reason the level could not be increased.

To make sure I had no problem with the application, this is what I did. I backed up the database on the 2000 server, then restored it as a different database. Then I changed the compatibility level on that restored database to 80.

Next I backed that databased up and copied the .bak file to the other server running 2005.

Then I restored that .bak file as the existing 6.5 level database with a restore over existing database flag turned on.

Presto ! Problem solved. It is taking the long way around the problem, but there is no other option open, apparently.

|||

Try to run this transact sql script against your database:


USE databaseName
GO
EXECUTE sp_dbcmptlevel databaseName , 90
GO
EXEC sp_updatestats
GO

detach 6.5 compatible database in studio - HOW?

I've got two databases showing in the studio tree, but they are marked 6.5 compatible and cannot be expanded. Worse, there is no way (apparently) in the menu of either database to remove, delete or detach them.

How can I get these out of the system?

Thanks in advance.

randyv

What about using the TSQL statement for dropping / detaching the databases ? (DROP DATABASE / sp_detach)

HTH, Jens K. Suessmeyer.


http://www.sqlserver2005.de

|||

No, that doesn't work because it is grayed out... It finally dawned on me that since I could not take any action directly on the database due to compatibility problems, but that the database was from 2000, there was no reason the level could not be increased.

To make sure I had no problem with the application, this is what I did. I backed up the database on the 2000 server, then restored it as a different database. Then I changed the compatibility level on that restored database to 80.

Next I backed that databased up and copied the .bak file to the other server running 2005.

Then I restored that .bak file as the existing 6.5 level database with a restore over existing database flag turned on.

Presto ! Problem solved. It is taking the long way around the problem, but there is no other option open, apparently.

|||

Try to run this transact sql script against your database:


USE databaseName
GO
EXECUTE sp_dbcmptlevel databaseName , 90
GO
EXEC sp_updatestats
GO

detach 6.5 compatible database in studio - HOW?

I've got two databases showing in the studio tree, but they are marked 6.5 compatible and cannot be expanded. Worse, there is no way (apparently) in the menu of either database to remove, delete or detach them.

How can I get these out of the system?

Thanks in advance.

randyv

What about using the TSQL statement for dropping / detaching the databases ? (DROP DATABASE / sp_detach)

HTH, Jens K. Suessmeyer.


http://www.sqlserver2005.de

|||

No, that doesn't work because it is grayed out... It finally dawned on me that since I could not take any action directly on the database due to compatibility problems, but that the database was from 2000, there was no reason the level could not be increased.

To make sure I had no problem with the application, this is what I did. I backed up the database on the 2000 server, then restored it as a different database. Then I changed the compatibility level on that restored database to 80.

Next I backed that databased up and copied the .bak file to the other server running 2005.

Then I restored that .bak file as the existing 6.5 level database with a restore over existing database flag turned on.

Presto ! Problem solved. It is taking the long way around the problem, but there is no other option open, apparently.

|||

Try to run this transact sql script against your database:


USE databaseName
GO
EXECUTE sp_dbcmptlevel databaseName , 90
GO
EXEC sp_updatestats
GO

Tuesday, February 14, 2012

Design a Tree in a blank Report

I'm creating a report like a Tree structure.

Area1 Total Modifications in Area1
Type1 Total Modifications in Type1 in area1
Sub Type1 Total Modifications in Sub Type1 in Type1 in area1
Sub Type2 Total Modifications in Sub Type2 in Type1 in area1

Type2 Total Modifications in Type2 in area1
Sub Typex Total Modifications in Sub Typex in Type2 in area1
Sub Typex2 Total Modifications in Sub Typex2 in Type2 in area1

Area2
Type1 Total Modifications in Type1 in area2
Sub Type1 Total Modifications in Sub Type1 in Type1 in area2
Sub Type2 Total Modifications in Sub Type2 in Type1 in area2

Type2 Total Modifications in Type2 in area2
Sub Typex Total Modifications in Sub Typex in Type2 in area2
Sub Typex2 Total Modifications in Sub Typex2 in Type2 in area2


I used the Report Wizard, created a Tabular report, did the grouping, and choose the Table Layout as Stepped and enabled the Drilldown and subtotal and it is works perfectly. When clicked on Area1, it shows the Type1 and Type2, and when clicked on Type shows the Sub type..

Now the problem is i have all the complex SQL code for this in a Stored Procedure.

When using Stored Procedure, Report Wizard cannot be used. So, How do i achieve similar Stepped Tabular report with drilldown feature when i create a blank report with Stored Procedure in Dataset ?

I used Table control and added two groups for Area and Type. I made the Area as Parent for Type and tried Hide and visibility Toggle option but i got error
"Toggle items must be text boxes that share the same scope as the hidden item or are in a scope that contains the hidden item, and cannot be contained within the current report item unless current grouping scope has a Parent."

Is this the way to do it or am i missing somthing in this?

Any help with steps appreciated.

Thanks.

Got it.
I created a report in Report Wiz using some query, and then i created a Dataset with Stored Proc and changed the dataset name for Table in Properties and it worked.