Showing posts with label novice. Show all posts
Showing posts with label novice. Show all posts

Wednesday, March 21, 2012

May I have your purmisshun?


Hi;

I'm a novice, and I need to set permissions in SQL Server 2005 (with Server Mgmt Studio)
so that I can create, modify, and delete tables in a database through my ASP.NET application.
I can't seem to find anything that spells this out - step-by-step - so that any idiot can follow it.

This is my error message:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
### Exception Number : 262
### (CREATE TABLE permission denied in database "MyDBase''.)
### Message: CREATE TABLE permission denied in database "MyDBase''. Number: 262
### Procedure: Server: SYS-EML8V3\SQL2005D01
### Source: .Net SqlClient Data Provider State: 1 Severity: 14 LineNumber: 1
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Does anyone have a link to something that might give me a clue?

THANKS!

Well, use some kind of tool, for example,Microsoft SQL Server Management Studio Express, and give to your user used in connection string appropriate right:

(under Databases -> Your Database -> Security -> Users)

|||

Dejan Vesic:

Well, use some kind of tool, for example,Microsoft SQL Server Management Studio Express, and give to your user used in connection string appropriate right:

(under Databases -> Your Database -> Security -> Users)

Hi Dejan;

I tried this with the ASPNET user, but it didn't work - I got the same error.

I must be missing something. Is there another user that I'm supposed to be setting this for?

THANKS!

|||

wASP:

Dejan Vesic:

Well, use some kind of tool, for example,Microsoft SQL Server Management Studio Express, and give to your user used in connection string appropriate right:


(under Databases -> Your Database -> Security -> Users)

Hi Dejan;

I tried this with the ASPNET user, but it didn't work - I got the same error.

I must be missing something. Is there another user that I'm supposed to be setting this for?

THANKS!

UPDATE ...

I've given the ASPNET user the "sysadmin" Server role - and it seems to have worked.

My next question is: Have I done something stupid (in terms of compromising security)?

THANKS!

|||

The answer is yes you can use either DBO(database owner) which is still risky but less so than Sysdamin or DDL admin. Try the link below for details. Hope this helps.

http://msdn2.microsoft.com/en-us/library/ms189612.aspx

|||

Caddre:

The answer is yes you can use either DBO(database owner) which is still risky but less so than Sysdamin or DDL admin. Try the link below for details. Hope this helps.

http://msdn2.microsoft.com/en-us/library/ms189612.aspx

Hi Caddre;

I think I've gotten everything set OK now - thanks to yourself and Dejan - and the link to that article (which I will save).

THANKS AGAIN!


|||

wASP:

Caddre:

The answer is yes you can use either DBO(database owner) which is still risky but less so than Sysdamin or DDL admin. Try the link below for details. Hope this helps.

http://msdn2.microsoft.com/en-us/library/ms189612.aspx

Hi Caddre;

I think I've gotten everything set OK now - thanks to yourself and Dejan - and the link to that article (which I will save).

THANKS AGAIN!

I am glad I could help.

Friday, March 9, 2012

Maximum length of a select statement??

Hi there,
I am a novice. I need some information regarding what could be the maximum length of a select statement, esp the where clause.there is no actual limit. Possible limit would be what your programming language can store in a string.|||A limit that I ran into was using stored procedures where you pass a variable.

If you need to pass a variable or use a declared variable in the procedure you will be limitted by the 8000 character variable limit.

I have had times when I was passing a "WHERE" clause as a variable and reached the 8000 character limit. I haven't found another way to do it within a stored procedure yet, so I have been passing the SQL statement directly to the database. This was an ASP application pulling historical records. I had to use OR rather than Between becuase of some other criteria.

Otherwise the SQL statement passed directly to the database has no hard limit as far as I know.

Wednesday, March 7, 2012

maximum allowed size for any data type

Hi,
I am a bit of a novice so please excuse any blinding ignorance
I recieve the following error using mssqlserver v7_1:
the size (32672) given to the type 'varchar' exceeds the maximum allowed for any data type
so how can I find out what this maximum is?search books online for data types