Showing posts with label ideas. Show all posts
Showing posts with label ideas. Show all posts

Friday, March 9, 2012

detach database unavailable

Any ideas why the detach databade option is unavailable
(dimmed out) on my SQL Server 7.0 Standard edition?Hi Jim
Detaching a database from the GUI was not possible in SQL 7. You have to the
stored procedure sp_detach_db.
--
HTH
--
Kalen Delaney
SQL Server MVP
www.SolidQualityLearning.com
"Jim" <jim.abel@.lmco.com> wrote in message
news:56e701c3b2ce$5a6e21c0$a601280a@.phx.gbl...
> Any ideas why the detach databade option is unavailable
> (dimmed out) on my SQL Server 7.0 Standard edition?|||Sorry Nevermind, I forgot that a database cannot be
detached when it is in use. I just didn't realize that
it will dim out the option in EM
>--Original Message--
>Any ideas why the detach databade option is unavailable
>(dimmed out) on my SQL Server 7.0 Standard edition?
>.
>|||I don't have an SQL7 to test on, but as I remember: EM7 didn't expose detach or attach options. And
while EM2000 does, when connecting to an SQL7, the options are not available (as Kalen points out).
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"Jim" <jim.abel@.lmco.com> wrote in message news:0e5401c3b2d0$7b8d37e0$a001280a@.phx.gbl...
> Sorry Nevermind, I forgot that a database cannot be
> detached when it is in use. I just didn't realize that
> it will dim out the option in EM
> >--Original Message--
> >Any ideas why the detach databade option is unavailable
> >(dimmed out) on my SQL Server 7.0 Standard edition?
> >.
> >|||Thanks for the replys, I realized that I would need to
use the query analyzer shortly after my post but
appreciate the confirmation of my ssuspicions.
This post is complete.
Thany you
>--Original Message--
>Hi Jim
>Detaching a database from the GUI was not possible in
SQL 7. You have to the
>stored procedure sp_detach_db.
>--
>HTH
>--
>Kalen Delaney
>SQL Server MVP
>www.SolidQualityLearning.com
>
>"Jim" <jim.abel@.lmco.com> wrote in message
>news:56e701c3b2ce$5a6e21c0$a601280a@.phx.gbl...
>> Any ideas why the detach databade option is unavailable
>> (dimmed out) on my SQL Server 7.0 Standard edition?
>
>.
>

Wednesday, March 7, 2012

Desperate! - Need simple MSSQL server monitoring scripts, ideas, etc that can be performed

Does anyone have any basic, simple scripts of sp's that I can give my
computer operators to use to monitor for serious conditions on our sql
servers? We are new in the ms-sql arena, a small shop and we cant
really purchase any tools to monitor these servers, but we need some
basic checks that we can use to make sure a server is performing in a
reasonable fashion, no blocks, cpu<xx%, memory not pegged, IO working,
etc...and we need to be able to do this without bugging our
programmers every time we are wondering why things are slowwnig down.

We are a split shop between as400s and sql servers, and our operations
staff has no problem performing this type of duty on the 400s. I think
since the sql servers are so easy to deploy into production, the idea
of how to monitor these things health got lost in the shuffle and
allowing the programmers to do it just serves to destabilize our
environment.

Please help! Our shop has turned to chaos since we went live with
MSSQL centric applications and everytime one programmer "resolves an
issue" some other programmers application starts to act up.I think that if you have AS400's, you should have the funds for a monitoring
tool.
Look at a product called "Spotlight on SQL Server" from Quest Software
www.quest.com . This 1 screen interface looks like the helm of the Starship
Enterprise.
Just by observing the screen, your operators can see if anything is wrong.
It has built in alarms that you can customize with your own thresholds (ie,
CPU > xx%, memory low, Cache hit ratio less than 90%, etc).

Oscar...

"freakyfreak" <emebohw2@.netscape.net> wrote in message
news:70f72e5f.0410071044.22a331d2@.posting.google.c om...
> Does anyone have any basic, simple scripts of sp's that I can give my
> computer operators to use to monitor for serious conditions on our sql
> servers? We are new in the ms-sql arena, a small shop and we cant
> really purchase any tools to monitor these servers, but we need some
> basic checks that we can use to make sure a server is performing in a
> reasonable fashion, no blocks, cpu<xx%, memory not pegged, IO working,
> etc...and we need to be able to do this without bugging our
> programmers every time we are wondering why things are slowwnig down.
> We are a split shop between as400s and sql servers, and our operations
> staff has no problem performing this type of duty on the 400s. I think
> since the sql servers are so easy to deploy into production, the idea
> of how to monitor these things health got lost in the shuffle and
> allowing the programmers to do it just serves to destabilize our
> environment.
> Please help! Our shop has turned to chaos since we went live with
> MSSQL centric applications and everytime one programmer "resolves an
> issue" some other programmers application starts to act up.|||Are you aware that from your own desktop you can run Windows PERFMON and set
the source for the data to your database server?

PERFMON will show you MANY SQL Server performance counters that you can
monitor either graphically or do a capture for later analysis.

"freakyfreak" <emebohw2@.netscape.net> wrote in message
news:70f72e5f.0410071044.22a331d2@.posting.google.c om...
> Does anyone have any basic, simple scripts of sp's that I can give my
> computer operators to use to monitor for serious conditions on our sql
> servers? We are new in the ms-sql arena, a small shop and we cant
> really purchase any tools to monitor these servers, but we need some
> basic checks that we can use to make sure a server is performing in a
> reasonable fashion, no blocks, cpu<xx%, memory not pegged, IO working,
> etc...and we need to be able to do this without bugging our
> programmers every time we are wondering why things are slowwnig down.
> We are a split shop between as400s and sql servers, and our operations
> staff has no problem performing this type of duty on the 400s. I think
> since the sql servers are so easy to deploy into production, the idea
> of how to monitor these things health got lost in the shuffle and
> allowing the programmers to do it just serves to destabilize our
> environment.
> Please help! Our shop has turned to chaos since we went live with
> MSSQL centric applications and everytime one programmer "resolves an
> issue" some other programmers application starts to act up.|||Thanks DHatheway, this is kind of cool. one question though, I cant
figure out how to connect perfmon to my server...runs fins at my pc
for my pc.|||Hi

If your SQL Server counters are missing check out:
http://support.microsoft.com/defaul...kb;en-us;227662

If it is to the run the application then either type in permon.msc /s from
the run command or a command prompt or use the option on the administrator
menu.

I would not recommend running this over the network, but you can change the
computer being monitored when you add your counter (Select counters from
computer).

John

"freakyfreak" <emebohw2@.netscape.net> wrote in message
news:70f72e5f.0410081324.50c6607c@.posting.google.c om...
> Thanks DHatheway, this is kind of cool. one question though, I cant
> figure out how to connect perfmon to my server...runs fins at my pc
> for my pc.|||...useful (sarcasm implied)|||- Fire up PERFMON (start | run - then enter PERFMON in the RUN dialog box)
- It should pop up with a chart window populated by nothing. If not, click
"system monitor" from the tree on the left side.
- If you have a chart with entries, click on each line description in the
bottom right and delete each one (delete key).
- Then, right-click anywhere on the chart. This gets you a context menu
that includes "add counters..." Pick that option.
- Now you're looking at a dialog box that includes radio button options for
"use local computer" and "select counters from computer".
- Click on the "select counters from computer" and put the name of the
computer you want to monitor in the text box below (may have to use
double-slashes - e.g.: \\mydbserver)
- Click on the "Performance Counters" listbox. It will refresh with a list
of performance counters available on the remote computer (if it's a database
server, it should include a number of SQL Server performance counter
categories.
- Start selecting the ones you think relevant.

If you don't see counters for SQL Server listed for your database server,
John Bell's post of 10/9 5:05am points you to a resource to help you with
that problem.

There are also options for logging PERMON information. It's not what I'd
call intuitive but, once you get going this far, I think you'll be able to
figure it out.

Another option you have for PERFMON is to use Windows Terminal Server to run
a session on your database server and run PERFMON there. PERFMON running in
a WTS session on your database server will default to that server. I prefer
not to use WTS sessions on my database servers but it is a reasonable thing
to do for some management tasks. I'd strongly advise against doing anything
that would reduce security, like install or use Office or Internet Explorer,
etc. I keep my database servers "clean."

"freakyfreak" <emebohw2@.netscape.net> wrote in message
news:70f72e5f.0410081324.50c6607c@.posting.google.c om...
> Thanks DHatheway, this is kind of cool. one question though, I cant
> figure out how to connect perfmon to my server...runs fins at my pc
> for my pc.

Designing reports with Reproting Services

I'm no graphic designer but I am really struggling with making a decent looking report.

Does anyone have any ideas or tips when working with reporting services?

Hi,

I'm no expert either, but what works for me is designing a report template which has the basics, and use that as a starting place for all subsequent reports. The template contains a page footer which contains the date the report was run, the name of our office and "page # out of total pages".

Starting with this generic template I add a page header which contains the report name and any selection criteria which is input by the user at run-time. On to content: I output data in the order specified by users and use bold for all headings to increase readability. Where appropriate the Reporting Services' "groupby" feature also increases clarity by allowing you to suppress duplicate values on the print-out.

Hope this helps!

Friday, February 17, 2012

design ideas

I'm new to asp.net. Please help me with some ideas about the design of databases and interface of the web site.

We are a public school district, I want to create a website for families to go on line to update their family and student's demographic information. Basically I put the students' infomation pulled from our student information system software on the web, the parents can log in on line to update it at the beginning of school year. After that, I will create some report and let secretary manually do the update to our student information system.

The demographic infor includes 3 parts,

1. family street address, city, state, zip
2 guardian1 primary phones,second phone, emails. primary phones,second phone
3, student date birth, gender. may have multiple students in one family

But how can I track which field parents changed, shall I do it in programming in the web form, or later when I create some kind of reports. For I only want to pull students with the fields that updated and give them to secretary to update manully, and I don't want to generate a full report and let them compare which field is changed and then update, it will take them too much time.

Thanks much in advance

Hello anncao,

> how can I track which field parents changed

the exact implementation depends on your programming skills, so i'll be starting from a basic approach, which should anyway be enough in your scenario:

1) The database: to each field should be associated a flag field (say bit type), telling wether the field has been changed or not (say "street" and "street_changed"); also another flag field should be associated to the record as a whole, to tell if *any* of the fields has been changed (say "rec_changed"). These flags should default to 0 (zero), and be set to 1 when needed.

2) The input form: before any rendering, you should store current field values, possibly in ViewState; after postback and before writing to the database, you should compare each field with its orginal stored value, and set its associated flag field to 1 if it has changed; also you should set the record-level flag in case *any* of the fields have changed. Please note that you will be writing to the database only flags set to 1, and be sure not to overwrite flags already set to 1 even in case in the current postback the user has not changed them...

3) The report: your final report should query the database and retrieve only those records where the record-level flag is set to 1; also, it should show changed fields somewhere marked (say red) in case their associated flag is set to 1 (or you could just show changed fields, or anything; "readability" is what matters here).

Hope this is clear enough. Btw, you could optimize on the flags and make them a single integer field where you work bit-wise level, but if this is too much complexity for you, just don't bother about it, as there's no relevant optimization at this level. Just make the code "readable" as well... ;)

-LV

|||

Thank you very much, that's certainly a good idea. But I still feels hard. I'm new to asp.net, try to use visual web developer express to accomplish this, thinking use the 3 gridview for the 3 parts, and have a update button for each part. for student and family are in different tables.

Is there an easier way I can do it similarly in visual web developer.

or can i make a copy of the tables and then later to compare them? but don't know how to select those fields which are different? we only collect his at the beginning of school year.

Or can you suggest me a book that I can start with how to write those codes ?

I have some experience with VBA, but not asp.net.

Thanks

|||

Ignore my previous message, I will go with the way you suggested.

For example I have a family table.if I want to do the way as you described at your posting, do I need to create an object data source, and where shall I write the comparing code?

Thanks

Design Idea

Need some design ideas.
I have to create a table which will have 2 types of IDs
MainID SubID
1 1
1 2
2 1
2 2
3 100
3 101
Basically I want to auto generate SubID for different MainIDs. For 2
different MainIDs, SubIDs can be same. Once the starting number is
determined the increment is always by 1.
Any ideas how this can be achived?"XXX" <sa@.nomail.com> wrote in message
news:#BH3Wz5ZFHA.3120@.TK2MSFTNGP12.phx.gbl...
> Need some design ideas.
> I have to create a table which will have 2 types of IDs
>
> MainID SubID
> 1 1
> 1 2
> 2 1
> 2 2
> 3 100
> 3 101
>
> Basically I want to auto generate SubID for different MainIDs. For 2
> different MainIDs, SubIDs can be same. Once the starting number is
> determined the increment is always by 1.
> Any ideas how this can be achived?
>
A trigger would probable work in this situation.
Rick Sawtell
MCT, MCSD, MCDBA|||On Thu, 2 Jun 2005 13:59:32 -0400, XXX wrote:

>Need some design ideas.
>I have to create a table which will have 2 types of IDs
>
>MainID SubID
>1 1
>1 2
>2 1
>2 2
>3 100
> 3 101
>
>Basically I want to auto generate SubID for different MainIDs. For 2
>different MainIDs, SubIDs can be same. Once the starting number is
>determined the increment is always by 1.
>Any ideas how this can be achived?
>
INSERT INTO MyTable (MainID, SubID, OtherColumns)
SELECT @.MainID, -- Passed in as parameter
COALESCE((SELECT MAX(SubID)
FROM MyTable
WHERE MainID = @.MainID),
@.StartofSubID), -- Passed in as parameter
@.OtherColumns -- Passed in as parameters
Best, Hugo
--
(Remove _NO_ and _SPAM_ to get my e-mail address)|||Thanks Hugo.
It works. I think you missed the '+1' in your query.
INSERT INTO MyTable (MainID, SubID, OtherColumns)
SELECT @.MainID, -- Passed in as parameter
COALESCE((SELECT MAX(SubID)
FROM MyTable
WHERE MainID = @.MainID) +1 ,
@.StartofSubID), -- Passed in as parameter
@.OtherColumns -- Passed in as parameters
"Hugo Kornelis" <hugo@.pe_NO_rFact.in_SPAM_fo> wrote in message
news:1suu91djb3l14fu50enarjf5u5dliagpan@.
4ax.com...
> On Thu, 2 Jun 2005 13:59:32 -0400, XXX wrote:
>
> INSERT INTO MyTable (MainID, SubID, OtherColumns)
> SELECT @.MainID, -- Passed in as parameter
> COALESCE((SELECT MAX(SubID)
> FROM MyTable
> WHERE MainID = @.MainID),
> @.StartofSubID), -- Passed in as parameter
> @.OtherColumns -- Passed in as parameters
> Best, Hugo
> --
> (Remove _NO_ and _SPAM_ to get my e-mail address)