Showing posts with label drives. Show all posts
Showing posts with label drives. Show all posts

Wednesday, March 28, 2012

Lock SQL table using asp.net

Hi,all:
This problem almost drives me crazy, hope I can get some hints from you guyz!!!
Ok, here is the situation:
I wanna only one users 2 modify the data(update) from my page each time, and if at the same time, there are some other users connecting my database through .aspx page, they can only browse the data until the first users finish updating.
It seems I need to implement locking the database, but I am not sure how I am gonna do that using asp.net!!!
Thanx in advance!This sort of locking is not a great idea. What happens if the first editing user goes to lunch, or looses his connection, or just looses interest?

Better, create a system that will test to ensure that an impending update is in fact updating the same data as it originally got to do the editing on.|||Hi,douglas:
Thanx a lot for ur reply! But I still have some question about this,
would you mind telling me that if the sql server has this kind of functionality?
And if it has, how about the time-out for this function?
Thanx in advance!|||the problem is, you will not have an open connection to the database between page posts. Locking is not viable for an asp.net app.|||Hi, Douglas:
Thanx for the reply, I have one more question :)
Is it possible that I can excecute the "Lock Table..." sql statement in asp.net?
if it's possible, is there any limit time for that "lock"?
Thanx a lot!
Cheers|||Have a look at "isolation levels" and, in you specific case "serializable". But you really need to understand the ramifications otherwise you'll bring the database and/or your application to its knees.

Monday, March 19, 2012

Locate backup file - can't see other drives

In MS SQL 2005 when you select "Restore Database" and click "From
Device", you get a directory explorer where you can select a backup
file. In that explorer window ("Locate Backup File") I can't see any
other drives than the one where my MS SQL Server is installed.
Is it just my system or is this by design?
Thanks for any ideas!
It could be that your SQL Server is clustered and you're seeing only the
disks on which SQL Server has a dependency.
Tom
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Toronto, ON Canada
"lanfear" <v_koski@.hotmail.com> wrote in message
news:1183726609.006262.23360@.q75g2000hsh.googlegro ups.com...
In MS SQL 2005 when you select "Restore Database" and click "From
Device", you get a directory explorer where you can select a backup
file. In that explorer window ("Locate Backup File") I can't see any
other drives than the one where my MS SQL Server is installed.
Is it just my system or is this by design?
Thanks for any ideas!
|||Hi
"lanfear" wrote:

> In MS SQL 2005 when you select "Restore Database" and click "From
> Device", you get a directory explorer where you can select a backup
> file. In that explorer window ("Locate Backup File") I can't see any
> other drives than the one where my MS SQL Server is installed.
> Is it just my system or is this by design?
> Thanks for any ideas!
>
Normally the dialog would default to a location and you could browse from
there depending on your permissions to see the directories. You could try
typing the path in yourself. With a cluster you would only see the drives
that have been tagged as cluster resources.
John
|||Are the other drives in question local? I
Anthony E. Castro - MCDBA
"lanfear" wrote:

> In MS SQL 2005 when you select "Restore Database" and click "From
> Device", you get a directory explorer where you can select a backup
> file. In that explorer window ("Locate Backup File") I can't see any
> other drives than the one where my MS SQL Server is installed.
> Is it just my system or is this by design?
> Thanks for any ideas!
>
|||Wow, bullseye! It's a two node cluster where only the E drive is in
the resource group. I suppose there isn't a way to have other drives
displayed when it's a clustered service.
Thanks a lot for the fast reply, now I don't have to scratch my head
anymore. Thanks John & Anthony aswell.
/lf
On Jul 6, 3:23 pm, "Tom Moreau" <t...@.dont.spam.me.cips.ca> wrote:
> It could be that your SQL Server is clustered and you're seeing only the
> disks on which SQL Server has a dependency.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Toronto, ON Canada
> "lanfear" <v_ko...@.hotmail.com> wrote in message
> news:1183726609.006262.23360@.q75g2000hsh.googlegro ups.com...
> In MS SQL 2005 when you select "Restore Database" and click "From
> Device", you get a directory explorer where you can select a backup
> file. In that explorer window ("Locate Backup File") I can't see any
> other drives than the one where my MS SQL Server is installed.
> Is it just my system or is this by design?
> Thanks for any ideas!
|||Just got back from vacation - sorry for the late follow-up. I don't think
there is a way to get that in SSMS.
That said, I'm concerned that there is only one disk dependency - drive E: -
for your clustered instance. Typically, you have one disk for data and
another for logs.
Tom
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON Canada
https://mvp.support.microsoft.com/profile/Tom.Moreau
"lanfear" <v_koski@.hotmail.com> wrote in message
news:1183732767.641961.258190@.q75g2000hsh.googlegr oups.com...
Wow, bullseye! It's a two node cluster where only the E drive is in
the resource group. I suppose there isn't a way to have other drives
displayed when it's a clustered service.
Thanks a lot for the fast reply, now I don't have to scratch my head
anymore. Thanks John & Anthony aswell.
/lf
On Jul 6, 3:23 pm, "Tom Moreau" <t...@.dont.spam.me.cips.ca> wrote:
> It could be that your SQL Server is clustered and you're seeing only the
> disks on which SQL Server has a dependency.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Toronto, ON Canada
> "lanfear" <v_ko...@.hotmail.com> wrote in message
> news:1183726609.006262.23360@.q75g2000hsh.googlegro ups.com...
> In MS SQL 2005 when you select "Restore Database" and click "From
> Device", you get a directory explorer where you can select a backup
> file. In that explorer window ("Locate Backup File") I can't see any
> other drives than the one where my MS SQL Server is installed.
> Is it just my system or is this by design?
> Thanks for any ideas!

Locate backup file - can't see other drives

In MS SQL 2005 when you select "Restore Database" and click "From
Device", you get a directory explorer where you can select a backup
file. In that explorer window ("Locate Backup File") I can't see any
other drives than the one where my MS SQL Server is installed.
Is it just my system or is this by design?
Thanks for any ideas!It could be that your SQL Server is clustered and you're seeing only the
disks on which SQL Server has a dependency.
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Toronto, ON Canada
"lanfear" <v_koski@.hotmail.com> wrote in message
news:1183726609.006262.23360@.q75g2000hsh.googlegroups.com...
In MS SQL 2005 when you select "Restore Database" and click "From
Device", you get a directory explorer where you can select a backup
file. In that explorer window ("Locate Backup File") I can't see any
other drives than the one where my MS SQL Server is installed.
Is it just my system or is this by design?
Thanks for any ideas!|||Hi
"lanfear" wrote:

> In MS SQL 2005 when you select "Restore Database" and click "From
> Device", you get a directory explorer where you can select a backup
> file. In that explorer window ("Locate Backup File") I can't see any
> other drives than the one where my MS SQL Server is installed.
> Is it just my system or is this by design?
> Thanks for any ideas!
>
Normally the dialog would default to a location and you could browse from
there depending on your permissions to see the directories. You could try
typing the path in yourself. With a cluster you would only see the drives
that have been tagged as cluster resources.
John|||Are the other drives in question local? I
--
Anthony E. Castro - MCDBA
"lanfear" wrote:

> In MS SQL 2005 when you select "Restore Database" and click "From
> Device", you get a directory explorer where you can select a backup
> file. In that explorer window ("Locate Backup File") I can't see any
> other drives than the one where my MS SQL Server is installed.
> Is it just my system or is this by design?
> Thanks for any ideas!
>|||Wow, bullseye! It's a two node cluster where only the E drive is in
the resource group. I suppose there isn't a way to have other drives
displayed when it's a clustered service.
Thanks a lot for the fast reply, now I don't have to scratch my head
anymore. Thanks John & Anthony aswell.
/lf
On Jul 6, 3:23 pm, "Tom Moreau" <t...@.dont.spam.me.cips.ca> wrote:
> It could be that your SQL Server is clustered and you're seeing only the
> disks on which SQL Server has a dependency.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Toronto, ON Canada
> "lanfear" <v_ko...@.hotmail.com> wrote in message
> news:1183726609.006262.23360@.q75g2000hsh.googlegroups.com...
> In MS SQL 2005 when you select "Restore Database" and click "From
> Device", you get a directory explorer where you can select a backup
> file. In that explorer window ("Locate Backup File") I can't see any
> other drives than the one where my MS SQL Server is installed.
> Is it just my system or is this by design?
> Thanks for any ideas!|||Just got back from vacation - sorry for the late follow-up. I don't think
there is a way to get that in SSMS.
That said, I'm concerned that there is only one disk dependency - drive E: -
for your clustered instance. Typically, you have one disk for data and
another for logs.
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON Canada
https://mvp.support.microsoft.com/profile/Tom.Moreau
"lanfear" <v_koski@.hotmail.com> wrote in message
news:1183732767.641961.258190@.q75g2000hsh.googlegroups.com...
Wow, bullseye! It's a two node cluster where only the E drive is in
the resource group. I suppose there isn't a way to have other drives
displayed when it's a clustered service.
Thanks a lot for the fast reply, now I don't have to scratch my head
anymore. Thanks John & Anthony aswell.
/lf
On Jul 6, 3:23 pm, "Tom Moreau" <t...@.dont.spam.me.cips.ca> wrote:
> It could be that your SQL Server is clustered and you're seeing only the
> disks on which SQL Server has a dependency.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Toronto, ON Canada
> "lanfear" <v_ko...@.hotmail.com> wrote in message
> news:1183726609.006262.23360@.q75g2000hsh.googlegroups.com...
> In MS SQL 2005 when you select "Restore Database" and click "From
> Device", you get a directory explorer where you can select a backup
> file. In that explorer window ("Locate Backup File") I can't see any
> other drives than the one where my MS SQL Server is installed.
> Is it just my system or is this by design?
> Thanks for any ideas!

Locate backup file - can't see other drives

In MS SQL 2005 when you select "Restore Database" and click "From
Device", you get a directory explorer where you can select a backup
file. In that explorer window ("Locate Backup File") I can't see any
other drives than the one where my MS SQL Server is installed.
Is it just my system or is this by design?
Thanks for any ideas!It could be that your SQL Server is clustered and you're seeing only the
disks on which SQL Server has a dependency.
--
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Toronto, ON Canada
"lanfear" <v_koski@.hotmail.com> wrote in message
news:1183726609.006262.23360@.q75g2000hsh.googlegroups.com...
In MS SQL 2005 when you select "Restore Database" and click "From
Device", you get a directory explorer where you can select a backup
file. In that explorer window ("Locate Backup File") I can't see any
other drives than the one where my MS SQL Server is installed.
Is it just my system or is this by design?
Thanks for any ideas!|||Hi
"lanfear" wrote:
> In MS SQL 2005 when you select "Restore Database" and click "From
> Device", you get a directory explorer where you can select a backup
> file. In that explorer window ("Locate Backup File") I can't see any
> other drives than the one where my MS SQL Server is installed.
> Is it just my system or is this by design?
> Thanks for any ideas!
>
Normally the dialog would default to a location and you could browse from
there depending on your permissions to see the directories. You could try
typing the path in yourself. With a cluster you would only see the drives
that have been tagged as cluster resources.
John|||Are the other drives in question local? I
--
Anthony E. Castro - MCDBA
"lanfear" wrote:
> In MS SQL 2005 when you select "Restore Database" and click "From
> Device", you get a directory explorer where you can select a backup
> file. In that explorer window ("Locate Backup File") I can't see any
> other drives than the one where my MS SQL Server is installed.
> Is it just my system or is this by design?
> Thanks for any ideas!
>|||Wow, bullseye! :) It's a two node cluster where only the E drive is in
the resource group. I suppose there isn't a way to have other drives
displayed when it's a clustered service.
Thanks a lot for the fast reply, now I don't have to scratch my head
anymore. Thanks John & Anthony aswell.
/lf
On Jul 6, 3:23 pm, "Tom Moreau" <t...@.dont.spam.me.cips.ca> wrote:
> It could be that your SQL Server is clustered and you're seeing only the
> disks on which SQL Server has a dependency.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Toronto, ON Canada
> "lanfear" <v_ko...@.hotmail.com> wrote in message
> news:1183726609.006262.23360@.q75g2000hsh.googlegroups.com...
> In MS SQL 2005 when you select "Restore Database" and click "From
> Device", you get a directory explorer where you can select a backup
> file. In that explorer window ("Locate Backup File") I can't see any
> other drives than the one where my MS SQL Server is installed.
> Is it just my system or is this by design?
> Thanks for any ideas!|||Just got back from vacation - sorry for the late follow-up. I don't think
there is a way to get that in SSMS.
That said, I'm concerned that there is only one disk dependency - drive E: -
for your clustered instance. Typically, you have one disk for data and
another for logs.
--
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON Canada
https://mvp.support.microsoft.com/profile/Tom.Moreau
"lanfear" <v_koski@.hotmail.com> wrote in message
news:1183732767.641961.258190@.q75g2000hsh.googlegroups.com...
Wow, bullseye! :) It's a two node cluster where only the E drive is in
the resource group. I suppose there isn't a way to have other drives
displayed when it's a clustered service.
Thanks a lot for the fast reply, now I don't have to scratch my head
anymore. Thanks John & Anthony aswell.
/lf
On Jul 6, 3:23 pm, "Tom Moreau" <t...@.dont.spam.me.cips.ca> wrote:
> It could be that your SQL Server is clustered and you're seeing only the
> disks on which SQL Server has a dependency.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Toronto, ON Canada
> "lanfear" <v_ko...@.hotmail.com> wrote in message
> news:1183726609.006262.23360@.q75g2000hsh.googlegroups.com...
> In MS SQL 2005 when you select "Restore Database" and click "From
> Device", you get a directory explorer where you can select a backup
> file. In that explorer window ("Locate Backup File") I can't see any
> other drives than the one where my MS SQL Server is installed.
> Is it just my system or is this by design?
> Thanks for any ideas!