Showing posts with label level. Show all posts
Showing posts with label level. Show all posts

Sunday, March 25, 2012

Create Table Error

While Creating the Table in SqlServer200 It is givin the Error like

Server: Msg 2749, Level 16, State 2, Line 1
Identity column 'CustID' must be of data type int, bigint, smallint,
tinyint, or decimal or numeric with a scale of 0, and constrained to
be nonnullable.

Can't we create a Identity for character Field?
my Code is follows

CREATE TABLE Rtest (CustID Varchar(10) NOT NULL IDENTITY,
CustName VARCHAR(40) NOT NULL)NO, You cant have an varchar or char field as an identity column

Identity column must be of type numeric ,or the types specified in the error u have given.|||Identity property is to ensure the column value to increase by the defined step. How would a varchar increase?

Saturday, February 25, 2012

create index error

Hi
I am trying to create an index on a large database (~8GB). SQL Server comes
back with error: 3624, Level 20, State 1.
Can someone please decipher this error for me?
Many thanks in advance.
Akz
I didn't find 3624 in the sysmessages table. What is the actual error message?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Akz" <Akz@.discussions.microsoft.com> wrote in message
news:897FA05B-5963-4D71-9AEE-153F58D53C5D@.microsoft.com...
> Hi
> I am trying to create an index on a large database (~8GB). SQL Server comes
> back with error: 3624, Level 20, State 1.
> Can someone please decipher this error for me?
> Many thanks in advance.
> Akz
|||The 3624 is: "A system assertion check has failed. Check the SQL Server
error log for details."
You need to search your errorlog to find which assertion was fired. If you
could provide this assertion, then we probably will know better why index
creation failed.
Stephen Jiang [ MSFT]
Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"Akz" <Akz@.discussions.microsoft.com> wrote in message
news:897FA05B-5963-4D71-9AEE-153F58D53C5D@.microsoft.com...
> Hi
> I am trying to create an index on a large database (~8GB). SQL Server
comes
> back with error: 3624, Level 20, State 1.
> Can someone please decipher this error for me?
> Many thanks in advance.
> Akz
|||The error log show the following message:
Faild Assertion ='m_SizeRec>0 && m_SizeRec<=MAXDATAROW'
I forgot to mention that I have two files in the primary filegroup because
of the size of my db. Could this have anything to do with my error?
Many thanks
"Stephen Yuan Jiang [MSFT]" wrote:

> The 3624 is: "A system assertion check has failed. Check the SQL Server
> error log for details."
> You need to search your errorlog to find which assertion was fired. If you
> could provide this assertion, then we probably will know better why index
> creation failed.
> Stephen Jiang [ MSFT]
> Microsoft SQL Server Storage Engine
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
>
> "Akz" <Akz@.discussions.microsoft.com> wrote in message
> news:897FA05B-5963-4D71-9AEE-153F58D53C5D@.microsoft.com...
> comes
>
>

create index error

Hi
I am trying to create an index on a large database (~8GB). SQL Server comes
back with error: 3624, Level 20, State 1.
Can someone please decipher this error for me?
Many thanks in advance.
AkzI didn't find 3624 in the sysmessages table. What is the actual error messag
e?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Akz" <Akz@.discussions.microsoft.com> wrote in message
news:897FA05B-5963-4D71-9AEE-153F58D53C5D@.microsoft.com...
> Hi
> I am trying to create an index on a large database (~8GB). SQL Server com
es
> back with error: 3624, Level 20, State 1.
> Can someone please decipher this error for me?
> Many thanks in advance.
> Akz|||The 3624 is: "A system assertion check has failed. Check the SQL Server
error log for details."
You need to search your errorlog to find which assertion was fired. If you
could provide this assertion, then we probably will know better why index
creation failed.
Stephen Jiang [ MSFT]
Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"Akz" <Akz@.discussions.microsoft.com> wrote in message
news:897FA05B-5963-4D71-9AEE-153F58D53C5D@.microsoft.com...
> Hi
> I am trying to create an index on a large database (~8GB). SQL Server
comes
> back with error: 3624, Level 20, State 1.
> Can someone please decipher this error for me?
> Many thanks in advance.
> Akz|||The error log show the following message:
Faild Assertion ='m_SizeRec>0 && m_SizeRec<=MAXDATAROW'
I forgot to mention that I have two files in the primary filegroup because
of the size of my db. Could this have anything to do with my error?
Many thanks
"Stephen Yuan Jiang [MSFT]" wrote:

> The 3624 is: "A system assertion check has failed. Check the SQL Server
> error log for details."
> You need to search your errorlog to find which assertion was fired. If yo
u
> could provide this assertion, then we probably will know better why index
> creation failed.
> Stephen Jiang [ MSFT]
> Microsoft SQL Server Storage Engine
> This posting is provided "AS IS" with no warranties, and confers no rights
.
>
>
> "Akz" <Akz@.discussions.microsoft.com> wrote in message
> news:897FA05B-5963-4D71-9AEE-153F58D53C5D@.microsoft.com...
> comes
>
>

Friday, February 17, 2012

Create DB Role owned by public

I use the following script in order to create db role:

USE [MyDB]
GO
CREATE ROLE [myRole] AUTHORIZATION [public]
GO

It doesn't work:
Msg 15405, Level 16, State 1, Line 1
Cannot use the special principal 'public'.

However this code works fine:

USE [MyDB]
GO
CREATE ROLE [myRole] AUTHORIZATION [dbo]
GO
ALTER AUTHORIZATION ON ROLE::[myRole] TO [public]
GO

So the question is why?


Seems to me like a bug, please post it on http://connect.microsoft.com/SQLServer/Feedback

Jens K. Suessmeyer.

http://www.sqlserver2005.de
|||

Yes, as Jens said, it sounds like a bug; thanks a lot for reporting it.

Now my question, why would you like to make “public” the owner of the role? It is the equivalent of saying “everyone is the owner”, therefore anyone can do whatever they want on the role (add, drop member, drop it or even take complete ownership of the role).

I would strongly recommend against granting such an elevated privilege (CONTROL or own any object) to public.

Please, let us know what is the scenario you are trying to solve and we will be glad to give some alternative suggestions.

Thanks a lot,

-Raul Garcia

SDE/T

SQL Server Engine

|||

Thanks for answer,

Actually I'm creating an application for managing SQL Server security

and as far as I see now the best solution is not to give users ability to choose 'public' as owner for db roles at all, right?

|||

Correct. That’s why we think it is a bug that ALTER AUTHORIZATION allows it.

Once again thanks a lot for the feedback and for reporting the bug.

-Raul Garcia

SDE/T

SQL Server Engine

Create DB Role owned by public

I use the following script in order to create db role:

USE [MyDB]
GO
CREATE ROLE [myRole] AUTHORIZATION [public]
GO

It doesn't work:
Msg 15405, Level 16, State 1, Line 1
Cannot use the special principal 'public'.

However this code works fine:

USE [MyDB]
GO
CREATE ROLE [myRole] AUTHORIZATION [dbo]
GO
ALTER AUTHORIZATION ON ROLE::[myRole] TO [public]
GO

So the question is why?


Seems to me like a bug, please post it on http://connect.microsoft.com/SQLServer/Feedback

Jens K. Suessmeyer.

http://www.sqlserver2005.de
|||

Yes, as Jens said, it sounds like a bug; thanks a lot for reporting it.

Now my question, why would you like to make “public” the owner of the role? It is the equivalent of saying “everyone is the owner”, therefore anyone can do whatever they want on the role (add, drop member, drop it or even take complete ownership of the role).

I would strongly recommend against granting such an elevated privilege (CONTROL or own any object) to public.

Please, let us know what is the scenario you are trying to solve and we will be glad to give some alternative suggestions.

Thanks a lot,

-Raul Garcia

SDE/T

SQL Server Engine

|||

Thanks for answer,

Actually I'm creating an application for managing SQL Server security

and as far as I see now the best solution is not to give users ability to choose 'public' as owner for db roles at all, right?

|||

Correct. That’s why we think it is a bug that ALTER AUTHORIZATION allows it.

Once again thanks a lot for the feedback and for reporting the bug.

-Raul Garcia

SDE/T

SQL Server Engine