显示标签为“dear”的博文。显示所有博文
显示标签为“dear”的博文。显示所有博文

2012年3月27日星期二

Disk Quorum Full

Dear All,

I've the quorum disk of my cluster on win2003 full and I cannot use The cluster administrator because the Service Cluster cannot going up.

Obviously the shared disk (included Quorum) and MSDTC are not visible and I'm wondering if is possible to solve the problem without rebuild the cluster.

Thank you to everybody

Information thanks to Elden Christensen:

You need to start the service with the /FQ recovery switch, and then you can free space or change the quorum disk.This KB has the procedure:

http://support.microsoft.com/kb/280353/en-us

Regards,

Boris.

Disk Quorum Full

Dear All,

I've the quorum disk of my cluster on win2003 full and I cannot use The cluster administrator because the Service Cluster cannot going up.

Obviously the shared disk (included Quorum) and MSDTC are not visible and I'm wondering if is possible to solve the problem without rebuild the cluster.

Thank you to everybody

Information thanks to Elden Christensen:

You need to start the service with the /FQ recovery switch, and then you can free space or change the quorum disk.This KB has the procedure:

http://support.microsoft.com/kb/280353/en-us

Regards,

Boris.

2012年3月7日星期三

Disadvantages of using uniqueidentifier (Tell your Tale)

Dear SQL...

I'm about to useuniqueidentifier andNEWID() for my new DB,

The DB may grow wild and I want to super safely create connections between tables,
so it would not just rely on numbers (that can B changed) as used with IDENTITY...

If U had some BAD experience with this or if U have any tips I can use please let me know

+

Should I take any special steps when usingindex on it ?I found a GREAT post that helped a lot:
Seeded(int) Identity columns vs. UniqueIdentifiers(GUIDs)

But still -what about the INDEX ?

1. Should I put an index on a uniqueidentifier column at all ?
2. Will the index consume big SQL Server space ? (what proportion)

OR

Is it a good idea to save it as achar string instead of uniqueidentifier ?
(will it help to manage the index better N faster)|||Hi,

I love GUIDs as surrogate primary keys. They solve a lot of problems and make coding simpler. And for most apps, the slight performance degradation is nothing compared to network latency and other factors.

No, don't bother indexing them separately. There's nothing to order; order doesn't matter at all.

Don|||Don, so what will happen if I'll have a big table ?
I guess that as the table gets bigger selecting one record will take longer...

Am I wrong ? - will SQL Server not just go throgh *ALL* records to find one ?

+
What is your opinion about saving the GUID as a string of chars ?
(will allow using the speed of an index ?)|||No, it won't necessarily. That's why I said aseparate index. If you use it as the primary key, SQL Server indexes it for you. That's necessary for it to be a primary key. I see that I said that poorly. Hope this clarifies it.

But also to clarify, you're going to use it as a primary key, right? You didn't say that in your posts, but you referenced the Seeded(int) Identity columns vs. UniqueIdentifiers(GUIDs) article, which suggests you are.

Nope on saving it as a string of characters. You'll just be circumventing the performance optimizations Microsoft built in.

Don|||Thanks 4 your educated answers :-)

I am going to use it for my Primary keys...

ALTER TABLE [dbo].[MyTable] ADD
CONSTRAINT [DF_MyTable] DEFAULT (newid()) FOR [MyTable_ID],
CONSTRAINT [PK_MyTable] PRIMARY KEY NONCLUSTERED
(
[MyTable_ID]
) ON [PRIMARY] ,
CONSTRAINT [IX_MyTable] UNIQUE NONCLUSTERED
(
[MyTable_ID]
) ON [PRIMARY]
GO
(am I right on the NONCLUSTERED ?)

About saving the GUIDs as a string of chars:
I thought that maybe I can also add a prefix (like Date()) to each GUID
so that I can create an effective CLUSTERED index instead of NONCLUSTERED
(using a string of chars or uniqueidentifier this is really my last dilemma on this issue...)

I may also need to create "replications" of this database (which I know none on...)
should I use uniqueidentifier (and not a string of chars) to allow replication ?

Thanks in advanced, Yovav.|||> If you use it as the primary key, SQL Server indexes it for you

yes. and it indexes it as clustered if you don't specify otherwise.

if you're using a guid as a primary key (i regularly do... the benefits far outweight the cost, especially when used in oo applications where you're rarely joining tables anyway), you want to make sure it's NOT clustered. otherwise when you go to insert a new record, data may have to be moved around, as guids could come in any sequence.

i would suggest using a guid as a pk. make it non-clustered. pick something else as your clustered index - normally whatever you would want to order by as default.

2012年2月19日星期日

Disable TOP

Dear all,
It's possible disable TOP operator?The only way that i have found is set
the compatibility to 6.5 but......
Thanks!!!!!!
That's the only way. BTW, why would you want to do this?
Tom
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
..
"Stefano_PITECO" <Stefano_PITECO@.discussions.microsoft.com> wrote in message
news:FB886D3B-8E16-4D60-AC85-A16974A63EB4@.microsoft.com...
Dear all,
It's possible disable TOP operator?The only way that i have found is set
the compatibility to 6.5 but......
Thanks!!!!!!
|||Stefano_PITECO wrote:
> Dear all,
> It's possible disable TOP operator?The only way that i have found is set
> the compatibility to 6.5 but......
> Thanks!!!!!!
You could try using SET FIPS_FLAGGER. See Books Online for details.
This will generate warnings for a lot of other stuff too.
David Portas
SQL Server MVP
|||Strange requirement :-D No that not posssible...
Why do you wanna do this ?
HTH, Jens Suessmeyer.
|||Top is one of the most important field of my database....
"Tom Moreau" wrote:

> That's the only way. BTW, why would you want to do this?
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Columnist, SQL Server Professional
> Toronto, ON Canada
> www.pinpub.com
> ..
> "Stefano_PITECO" <Stefano_PITECO@.discussions.microsoft.com> wrote in message
> news:FB886D3B-8E16-4D60-AC85-A16974A63EB4@.microsoft.com...
> Dear all,
> It's possible disable TOP operator?The only way that i have found is set
> the compatibility to 6.5 but......
> Thanks!!!!!!
>
|||So what you're saying is that TOP is a column name? Ouch. It'll mean that
you'll have to change all references to use [TOP] - or you'll have to change
the column name and then change all references to use that.
Tom
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
..
"Stefano_PITECO" <Stefano_PITECO@.discussions.microsoft.com> wrote in message
news:9B742642-294F-401C-87A0-5654F4C261F0@.microsoft.com...
Top is one of the most important field of my database....
"Tom Moreau" wrote:

> That's the only way. BTW, why would you want to do this?
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Columnist, SQL Server Professional
> Toronto, ON Canada
> www.pinpub.com
> ..
> "Stefano_PITECO" <Stefano_PITECO@.discussions.microsoft.com> wrote in
> message
> news:FB886D3B-8E16-4D60-AC85-A16974A63EB4@.microsoft.com...
> Dear all,
> It's possible disable TOP operator?The only way that i have found is set
> the compatibility to 6.5 but......
> Thanks!!!!!!
>
|||Stefano_PITECO wrote:
> Top is one of the most important field of my database....
>
This is on reason why column naming standards are important. Avoid
using reserved words as column names. Either change the name of the
column or make sure you always delimit TOP with square brackets.
David Portas
SQL Server MVP
|||Try using square brackets
SELECT TOP 10
[top]
, [ColumnB]
FROM
SomeTable
Should/might work.
Adrian
David Portas wrote:
> Stefano_PITECO wrote:
>
> This is on reason why column naming standards are important. Avoid
> using reserved words as column names. Either change the name of the
> column or make sure you always delimit TOP with square brackets.
>

Disable TOP

Dear all,
It's possible disable TOP operator?The only way that i have found is set
the compatibility to 6.5 but......
Thanks!!!!!!That's the only way. BTW, why would you want to do this?
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
.
"Stefano_PITECO" <Stefano_PITECO@.discussions.microsoft.com> wrote in message
news:FB886D3B-8E16-4D60-AC85-A16974A63EB4@.microsoft.com...
Dear all,
It's possible disable TOP operator?The only way that i have found is set
the compatibility to 6.5 but......
Thanks!!!!!!|||Stefano_PITECO wrote:
> Dear all,
> It's possible disable TOP operator?The only way that i have found is set
> the compatibility to 6.5 but......
> Thanks!!!!!!
You could try using SET FIPS_FLAGGER. See Books Online for details.
This will generate warnings for a lot of other stuff too.
David Portas
SQL Server MVP
--|||Strange requirement :-D No that not posssible...
Why do you wanna do this ?
HTH, Jens Suessmeyer.|||Top is one of the most important field of my database....
"Tom Moreau" wrote:

> That's the only way. BTW, why would you want to do this?
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Columnist, SQL Server Professional
> Toronto, ON Canada
> www.pinpub.com
> ..
> "Stefano_PITECO" <Stefano_PITECO@.discussions.microsoft.com> wrote in messa
ge
> news:FB886D3B-8E16-4D60-AC85-A16974A63EB4@.microsoft.com...
> Dear all,
> It's possible disable TOP operator?The only way that i have found is set
> the compatibility to 6.5 but......
> Thanks!!!!!!
>|||So what you're saying is that TOP is a column name? Ouch. It'll mean that
you'll have to change all references to use [TOP] - or you'll have to ch
ange
the column name and then change all references to use that.
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
.
"Stefano_PITECO" <Stefano_PITECO@.discussions.microsoft.com> wrote in message
news:9B742642-294F-401C-87A0-5654F4C261F0@.microsoft.com...
Top is one of the most important field of my database....
"Tom Moreau" wrote:

> That's the only way. BTW, why would you want to do this?
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Columnist, SQL Server Professional
> Toronto, ON Canada
> www.pinpub.com
> ..
> "Stefano_PITECO" <Stefano_PITECO@.discussions.microsoft.com> wrote in
> message
> news:FB886D3B-8E16-4D60-AC85-A16974A63EB4@.microsoft.com...
> Dear all,
> It's possible disable TOP operator?The only way that i have found is set
> the compatibility to 6.5 but......
> Thanks!!!!!!
>|||Stefano_PITECO wrote:
> Top is one of the most important field of my database....
>
This is on reason why column naming standards are important. Avoid
using reserved words as column names. Either change the name of the
column or make sure you always delimit TOP with square brackets.
David Portas
SQL Server MVP
--|||Try using square brackets
SELECT TOP 10
[top]
, [ColumnB]
FROM
SomeTable
Should/might work.
Adrian
David Portas wrote:
> Stefano_PITECO wrote:
>
>
> This is on reason why column naming standards are important. Avoid
> using reserved words as column names. Either change the name of the
> column or make sure you always delimit TOP with square brackets.
>

Disable TOP

Dear all,
It's possible disable TOP operator?The only way that i have found is set
the compatibility to 6.5 but......
Thanks!!!!!!That's the only way. BTW, why would you want to do this?
--
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
.
"Stefano_PITECO" <Stefano_PITECO@.discussions.microsoft.com> wrote in message
news:FB886D3B-8E16-4D60-AC85-A16974A63EB4@.microsoft.com...
Dear all,
It's possible disable TOP operator?The only way that i have found is set
the compatibility to 6.5 but......
Thanks!!!!!!|||Stefano_PITECO wrote:
> Dear all,
> It's possible disable TOP operator?The only way that i have found is set
> the compatibility to 6.5 but......
> Thanks!!!!!!
You could try using SET FIPS_FLAGGER. See Books Online for details.
This will generate warnings for a lot of other stuff too.
--
David Portas
SQL Server MVP
--|||Strange requirement :-D No that not posssible...
Why do you wanna do this ?
HTH, Jens Suessmeyer.|||Top is one of the most important field of my database....
"Tom Moreau" wrote:
> That's the only way. BTW, why would you want to do this?
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Columnist, SQL Server Professional
> Toronto, ON Canada
> www.pinpub.com
> ..
> "Stefano_PITECO" <Stefano_PITECO@.discussions.microsoft.com> wrote in message
> news:FB886D3B-8E16-4D60-AC85-A16974A63EB4@.microsoft.com...
> Dear all,
> It's possible disable TOP operator?The only way that i have found is set
> the compatibility to 6.5 but......
> Thanks!!!!!!
>|||So what you're saying is that TOP is a column name? Ouch. It'll mean that
you'll have to change all references to use [TOP] - or you'll have to change
the column name and then change all references to use that.
--
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
.
"Stefano_PITECO" <Stefano_PITECO@.discussions.microsoft.com> wrote in message
news:9B742642-294F-401C-87A0-5654F4C261F0@.microsoft.com...
Top is one of the most important field of my database....
"Tom Moreau" wrote:
> That's the only way. BTW, why would you want to do this?
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Columnist, SQL Server Professional
> Toronto, ON Canada
> www.pinpub.com
> ..
> "Stefano_PITECO" <Stefano_PITECO@.discussions.microsoft.com> wrote in
> message
> news:FB886D3B-8E16-4D60-AC85-A16974A63EB4@.microsoft.com...
> Dear all,
> It's possible disable TOP operator?The only way that i have found is set
> the compatibility to 6.5 but......
> Thanks!!!!!!
>|||Stefano_PITECO wrote:
> Top is one of the most important field of my database....
>
This is on reason why column naming standards are important. Avoid
using reserved words as column names. Either change the name of the
column or make sure you always delimit TOP with square brackets.
--
David Portas
SQL Server MVP
--|||Try using square brackets
SELECT TOP 10
[top]
, [ColumnB]
FROM
SomeTable
Should/might work.
Adrian
David Portas wrote:
> Stefano_PITECO wrote:
>>Top is one of the most important field of my database....
>
> This is on reason why column naming standards are important. Avoid
> using reserved words as column names. Either change the name of the
> column or make sure you always delimit TOP with square brackets.
>

Disable temporary table creation

Dear,
Is there a way to disallow a user to create a temporary table?
Thanks,
PeterYou could set explicit access-denied permissions for that user on tempdb,
but in so doing you would break numerous system stored procedures, ADO
functions, and a large number of applications and tools out there, for that
user.
-Mark
<pgp.coppens@.pandora.be> wrote in message
news:1115628367.375613.173760@.g14g2000cwa.googlegroups.com...
> Dear,
> Is there a way to disallow a user to create a temporary table?
> Thanks,
> Peter
>|||pgp.coppens,
Why would you want to do that? Could you describe your situation further?
Perhaps you should disallow all direct access to SQL Server tables and only
allow access to data through stored procedures and/or views.
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602m.html
"pgp.coppens@.pandora.be" wrote:

> Dear,
> Is there a way to disallow a user to create a temporary table?
> Thanks,
> Peter
>|||Mark Allison schreef:
> pgp.coppens,
> Why would you want to do that? Could you describe your situation
further?
> Perhaps you should disallow all direct access to SQL Server tables
and only[vbcol=seagreen]
> allow access to data through stored procedures and/or views.
> --
> Mark Allison, SQL Server MVP
> http://www.markallison.co.uk
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602m.html
>
>
> "pgp.coppens@.pandora.be" wrote:
>
Actually I am trying to create an apparently very artificial
environment so that I can document the error messages a user might get
when his server does not allow him to create temporary tables and the
application (I am trying to document) attempts it.
But from the looks of the reactions not many SQLServer servers will be
configured in such a way I guess, so it might not be worth the effort.
Thanks for all your reactions.
Peter