Tuesday, March 27, 2012
Error when running sp_helpdb query
Server: Msg 515, Level 16, State 2, Procedure sp_helpdb, Line 53 Cannot
insert the value NULL into column 'owner', table
'tempdb.dbo.#spdbdesc___________________________________________________________________________________________________________000100371F02';
column does not allow nulls. INSERT fails.
The statement has been terminated.Kush
use master
go
sp_helptext 'sp_helpdb'
I think it fails to find suser_sname of the current session
"Kush" <Kush@.discussions.microsoft.com> wrote in message
news:44DAF4E9-9DCA-47FC-85A3-79234F68EFF3@.microsoft.com...
>I get the following error when running command "sp_helpdb" in Query
>Analyzer.
> Server: Msg 515, Level 16, State 2, Procedure sp_helpdb, Line 53 Cannot
> insert the value NULL into column 'owner', table
> 'tempdb.dbo.#spdbdesc___________________________________________________________________________________________________________000100371F02';
> column does not allow nulls. INSERT fails.
> The statement has been terminated.|||Here's an URL that might explain it. Google is your friend :-)
http://groups.google.com/group/microsoft.public.sqlserver.server/browse_thread/thread/bc6f4659bb8dd60c/50f0170456dd13b5?q=sp_helpdb+insert+NULL&rnum=3#50f0170456dd13b5
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Kush" <Kush@.discussions.microsoft.com> wrote in message
news:44DAF4E9-9DCA-47FC-85A3-79234F68EFF3@.microsoft.com...
>I get the following error when running command "sp_helpdb" in Query Analyzer.
> Server: Msg 515, Level 16, State 2, Procedure sp_helpdb, Line 53 Cannot
> insert the value NULL into column 'owner', table
> 'tempdb.dbo.#spdbdesc___________________________________________________________________________________________________________000100371F02';
> column does not allow nulls. INSERT fails.
> The statement has been terminated.|||I will try that and let you know what happens!
"Tibor Karaszi" wrote:
> Here's an URL that might explain it. Google is your friend :-)
> http://groups.google.com/group/microsoft.public.sqlserver.server/browse_thread/thread/bc6f4659bb8dd60c/50f0170456dd13b5?q=sp_helpdb+insert+NULL&rnum=3#50f0170456dd13b5
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Kush" <Kush@.discussions.microsoft.com> wrote in message
> news:44DAF4E9-9DCA-47FC-85A3-79234F68EFF3@.microsoft.com...
> >I get the following error when running command "sp_helpdb" in Query Analyzer.
> >
> > Server: Msg 515, Level 16, State 2, Procedure sp_helpdb, Line 53 Cannot
> > insert the value NULL into column 'owner', table
> > 'tempdb.dbo.#spdbdesc___________________________________________________________________________________________________________000100371F02';
> > column does not allow nulls. INSERT fails.
> > The statement has been terminated.
>
Friday, March 23, 2012
Error when Logging on - Error: 18456, Severity: 14, State: 16
I am getting the following error in the ERRORLOG File when I am
trying
to connect to SQL Server 2005 Express Edition from the command line.
2007-03-23 07:30:05.54 Logon Error: 18456, Severity: 14, State:
16.
2007-03-23 07:30:05.54 Logon Login failed for user 'sa'.
[CLIENT: xx.xx.xx.xx]
I have a fresh install of SQL Server on my local machine, which is
probably the source of my angst, but I am trying to create a database
from scratch through using a batch file that is run from the command
line, the batch file looks like this:
<snip>
SQLCMD -U %USR% -P %PWD% -S %SVR% -d %DBF% -i CreateDatabase.sql
<snip>
The values of %USR% and %PWD% are correct as I frequently log into
Management Studio with the details, %SVR% is "<ComputerName>
\SQLEXPRESS,1433" and %DBF% is <DatabaseName>. The contents of
CreateDatabase.sql when run in Management Studio successfully creates
the database that I require so I know the error doesn't lie there.
The command line error that is showing reads as the following:
Msg 4060, Level 11, State 1, Server <ComputerName>\SQLEXPRESS, Line 1
Cannot open database "<DatabaseName>" requested by the login. The
login failed.
Msg 18456, Level 14, State 1, Server <ComputerName>\SQLEXPRESS, Line
1
Login failed for user 'sa'.
I have a feeling that it is related to 'sa' not having the correct
permissions with regards to logging into or creating a database from
scratch, but I find it odd that I can login as 'sa' in Management
Studio and create the database from there, but when I try it from the
command-line (despite having TCP/IP enabled) it won't let me connect
to create a database.
Is there something I am missing here? I have been banging my head off
of walls for days over this and am unsure of the next steps to take.
If any of this screams "why the hell are you doing this?" then please
let me know as at the moment I am punching in the dark with this
problem, I have searched Usenet, Google Groups, the Web and although
I
have found potential solutions to this particular problem I am
having,
nothing I have done so far has actually managed to fix the issue.
Related articles I have followed are:
Login failed for user 'x'
http://msdn2.microsoft.com/en-us/library/ms366351.aspx
Change Server Authentication Mode
http://msdn2.microsoft.com/en-us/library/ms188670.aspx
Upgrading MSDE 2000 to SQL Server 2005 Express [Enabling network
protocols section]
http://www.microsoft.com/technet/pr...e2sqlexpress...
NOTE: I just listed these articles to show what path I am currently
looking at with regards to this problem, but again I stress I have
found nothing yet to get round this problem, and any further articles
or direction would be much appreciated.
Yours Distressingly
AlastairI'm still not clear on what database is used for -d
<DatabaseName> and this could be one of the problems. If you
are trying to log in using the database you are about to
create, then that's likely the issue as it doesn't exist
when logging in. Try specifying master for the initial login
database.
-Sue
On 23 Mar 2007 08:48:10 -0700, "Alastair"
<alastair_anderson@.hotmail.com> wrote:
>Hi All,
>I am getting the following error in the ERRORLOG File when I am
>trying
>to connect to SQL Server 2005 Express Edition from the command line.
>
>2007-03-23 07:30:05.54 Logon Error: 18456, Severity: 14, State:
>16.
>2007-03-23 07:30:05.54 Logon Login failed for user 'sa'.
>[CLIENT: xx.xx.xx.xx]
>
>I have a fresh install of SQL Server on my local machine, which is
>probably the source of my angst, but I am trying to create a database
>from scratch through using a batch file that is run from the command
>line, the batch file looks like this:
>
><snip>
>SQLCMD -U %USR% -P %PWD% -S %SVR% -d %DBF% -i CreateDatabase.sql
><snip>
>
>The values of %USR% and %PWD% are correct as I frequently log into
>Management Studio with the details, %SVR% is "<ComputerName>
>\SQLEXPRESS,1433" and %DBF% is <DatabaseName>. The contents of
>CreateDatabase.sql when run in Management Studio successfully creates
>the database that I require so I know the error doesn't lie there.
>
>The command line error that is showing reads as the following:
>
>Msg 4060, Level 11, State 1, Server <ComputerName>\SQLEXPRESS, Line 1
>Cannot open database "<DatabaseName>" requested by the login. The
>login failed.
>Msg 18456, Level 14, State 1, Server <ComputerName>\SQLEXPRESS, Line
>1
>Login failed for user 'sa'.
>
>I have a feeling that it is related to 'sa' not having the correct
>permissions with regards to logging into or creating a database from
>scratch, but I find it odd that I can login as 'sa' in Management
>Studio and create the database from there, but when I try it from the
>command-line (despite having TCP/IP enabled) it won't let me connect
>to create a database.
>
>Is there something I am missing here? I have been banging my head off
>of walls for days over this and am unsure of the next steps to take.
>
>If any of this screams "why the hell are you doing this?" then please
>let me know as at the moment I am punching in the dark with this
>problem, I have searched Usenet, Google Groups, the Web and although
>I
>have found potential solutions to this particular problem I am
>having,
>nothing I have done so far has actually managed to fix the issue.
>
>Related articles I have followed are:
>
>Login failed for user 'x'
>http://msdn2.microsoft.com/en-us/library/ms366351.aspx
>
>Change Server Authentication Mode
>http://msdn2.microsoft.com/en-us/library/ms188670.aspx
>
>Upgrading MSDE 2000 to SQL Server 2005 Express [Enabling network
>protocols section]
>http://www.microsoft.com/technet/pr...e2sqlexpress...
>
>NOTE: I just listed these articles to show what path I am currently
>looking at with regards to this problem, but again I stress I have
>found nothing yet to get round this problem, and any further articles
>or direction would be much appreciated.
>
>Yours Distressingly
>
>Alastair|||On 25 Mar, 16:17, Sue Hoegemeier <S...@.nomail.please> wrote:
> I'm still not clear on what database is used for -d
> <DatabaseName> and this could be one of the problems. If you
> are trying to log in using the database you are about to
> create, then that's likely the issue as it doesn't exist
> when logging in. Try specifying master for the initial login
> database.
> -Sue
> On 23 Mar 2007 08:48:10 -0700, "Alastair"
>
> <alastair_ander...@.hotmail.com> wrote:
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> - Show quoted text -
You managed to hit the nail on the head.
Running my current script when the new database already exists it
works fine, however for a fresh install of SQL Server, when it doesn't
currently exist then it doesn't work.
Thanks for your help
Alastair
Wednesday, March 21, 2012
error when I run script
I can't not run the query to update data but it raice an error as below:
"Server: Msg 1101, Level 17, State 10, Line 1
Could not allocate new page for database 'TEMPDB'. There are no more pages available in filegroup DEFAULT. Space can be created by dropping objects, adding additional files, or allowing file growth."
HDD free space: 5GB
RAM: 1GB
CPU: 2.8MHz
What should I do?
Please advice me on this.
Thanks in advance,
TNLooks like your TempDb is running out of space.
Are you the database administrator?
The Fonzi approach (not reccomended) would be to restart the SQL Server Service on the server because the tempdb is recreated each time SQL Server is restarted.
In the Enterprise Manager you can right click on the tempdb and check the file growth propeties and adjust them as necessary.
Finally, I wonder what your query might be doing to fill up the tempdb. Do you want to post your script or tell us what you are trying to do?
Friday, March 9, 2012
error when attaching DB
Could not open new database 'Asset5'. CREATE DATABASE is aborted.
Msg 602, Level 21, State 50, Line 1
Could not find row in sysindexes for database ID 9, object ID 1, index ID 1. Run DBCC CHECKTABLE on sysindexes.
I am just starting with a book sql server 2005 stored proc programming in tsql & .net and cant get the db to attach, any help pls
I find most publishers of SQL Server books are not careful but Microsoft is changing with their SQL Server books by posting mile long errata for a very respected writer. Their documentation however is the best in the business and their samples AdventureWorks is good size database easy to attach and play with. Try the link below for the samples it also comes with reporting services sample. Install it then go to Managment Studio right click and attach it. Download X86 case insensitive. Hope this helps.
http://www.microsoft.com/downloads/details.aspx?familyid=E719ECF7-9F46-4312-AF89-6AD8702E4E6E&displaylang=en
|||thanks allot, but... all the sprocs in this book are related to this asset5 db. can anyone help me with this error?|||I already did could not find a solution so the questions is did you put the MDF and LDF in the location below before trying to attach it in Management Studio? Try deleting every thing and starting new put the MDF and LDF in the location below and go to Managment Studio and attach.
C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data
|||it was in the right place, when i try to install adventure works i get the same error. I havent used this install in 1yr, could it be an issue with needed service pack?|||I have installed AdventureWorks with service packs and without all without problems, I am using the developer edition. I remember getting problems with AdventureWorks install in with install.sql in 2000 but I looked in that location and found MDF and LDF created without a database so I deleted both files and the install was completed.Friday, February 17, 2012
Error SQL server when try to select or delete or add new
when i try to get data or insert new from some table.
SQL show this message error
Server: Msg 3624, Level 20, State 1, Line 1
Location: q:\SPHINX\NTDBMS\storeng\drs\include\record.inl:1447
Expression: m_SizeRec > 0 && m_SizeRec <= MAXDATAROW
SPID: 52
Process ID: 2116
Connection Broken
-
how to fix this problem ? These table have around 2,900,000 records.
thanks.
Unfortunately, that seems like some form of data corruption. Try running DBCC CHECKDB and DBCC CHECKTABLE to see if you can locate the inconsistency errors. It may be that you'll have to perform a restore from a backup or perhaps a REPAIR_REBUILD will solve the problem.
Check Books Online for further information on the commands.
HTH!
error sql 2000
Line 53
Cannot insert the value NULL into column '', table '';
column does not allow nulls. INSERT fails.
The statement has been terminated.HI,
You might get this error if you have an invalid database owner. Execute the
below script to verify,
SELECT name, SUSER_SNAME(sid)
FROM master..sysdatabases
WHERE SUSER_SNAME(sid) IS NULL
Incase if you have any invalid users , execute sp_changedbowner (refer books
online) stored procedure.
Thanks
Hari
MCDBA
"harold apolinar" <anonymous@.discussions.microsoft.com> wrote in message
news:f7b201c40cf5$533b69e0$a501280a@.phx.gbl...
> Server: Msg 515, Level 16, State 2, Procedure sp_helpdb,
> Line 53
> Cannot insert the value NULL into column '', table '';
> column does not allow nulls. INSERT fails.
> The statement has been terminated.|||Are you running sp_helpdb with a database name or without? If the latter,
does it work if you explicitly set a database name that you have access to?
"harold apolinar" <anonymous@.discussions.microsoft.com> wrote in message
news:f7b201c40cf5$533b69e0$a501280a@.phx.gbl...
> Server: Msg 515, Level 16, State 2, Procedure sp_helpdb,
> Line 53
> Cannot insert the value NULL into column '', table '';
> column does not allow nulls. INSERT fails.
> The statement has been terminated.
Error security level explanation please.
Why would this error stop the execution of my Stored procedure.
Server: Msg 8501, Level 16, State 3, Line 1
[Microsoft][ODBC SQL Server Driver][SQL Server]MSDTC on server '
Server1' is
unavailable.
I thought that only errors with level 20 to 25 did that.
IanHi,
Read these about error handling:
http://www.sommarskog.se/error-handling-I.html
http://www.sommarskog.se/error-handling-II.html
Check XACT_ABORT setting...
"Ian" <ian@.NoWhere.com> wrote in message
news:%23ZcyUFpiEHA.4092@.TK2MSFTNGP10.phx.gbl...
> Hi
>
> Why would this error stop the execution of my Stored procedure.
> Server: Msg 8501, Level 16, State 3, Line 1
> [Microsoft][ODBC SQL Server Driver][SQL Server]MSDTC on server 'Server
1'
is
> unavailable.
> I thought that only errors with level 20 to 25 did that.
>
> Ian
>|||You had batch abort... There is not much documentation from MS on these
kinds of things, but Erland Sommerskog's articles that the previous
respondent points to is the best information available anywhere on the
subject. (Thanks Erland.)
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Ian" <ian@.NoWhere.com> wrote in message
news:%23ZcyUFpiEHA.4092@.TK2MSFTNGP10.phx.gbl...
> Hi
>
> Why would this error stop the execution of my Stored procedure.
> Server: Msg 8501, Level 16, State 3, Line 1
> [Microsoft][ODBC SQL Server Driver][SQL Server]MSDTC on server 'Server
1'
is
> unavailable.
> I thought that only errors with level 20 to 25 did that.
>
> Ian
>|||Thanks heaps.
"Ian" <ian@.NoWhere.com> wrote in message
news:%23ZcyUFpiEHA.4092@.TK2MSFTNGP10.phx.gbl...
> Hi
>
> Why would this error stop the execution of my Stored procedure.
> Server: Msg 8501, Level 16, State 3, Line 1
> [Microsoft][ODBC SQL Server Driver][SQL Server]MSDTC on server 'Server
1'
is
> unavailable.
> I thought that only errors with level 20 to 25 did that.
>
> Ian
>
Wednesday, February 15, 2012
Error security level explanation please.
Why would this error stop the execution of my Stored procedure.
Server: Msg 8501, Level 16, State 3, Line 1
[Microsoft][ODBC SQL Server Driver][SQL Server]MSDTC on server 'Server1' is
unavailable.
I thought that only errors with level 20 to 25 did that.
Ian
Hi,
Read these about error handling:
http://www.sommarskog.se/error-handling-I.html
http://www.sommarskog.se/error-handling-II.html
Check XACT_ABORT setting...
"Ian" <ian@.NoWhere.com> wrote in message
news:%23ZcyUFpiEHA.4092@.TK2MSFTNGP10.phx.gbl...
> Hi
>
> Why would this error stop the execution of my Stored procedure.
> Server: Msg 8501, Level 16, State 3, Line 1
> [Microsoft][ODBC SQL Server Driver][SQL Server]MSDTC on server 'Server1'
is
> unavailable.
> I thought that only errors with level 20 to 25 did that.
>
> Ian
>
|||You had batch abort... There is not much documentation from MS on these
kinds of things, but Erland Sommerskog's articles that the previous
respondent points to is the best information available anywhere on the
subject. (Thanks Erland.)
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Ian" <ian@.NoWhere.com> wrote in message
news:%23ZcyUFpiEHA.4092@.TK2MSFTNGP10.phx.gbl...
> Hi
>
> Why would this error stop the execution of my Stored procedure.
> Server: Msg 8501, Level 16, State 3, Line 1
> [Microsoft][ODBC SQL Server Driver][SQL Server]MSDTC on server 'Server1'
is
> unavailable.
> I thought that only errors with level 20 to 25 did that.
>
> Ian
>
|||Thanks heaps.
"Ian" <ian@.NoWhere.com> wrote in message
news:%23ZcyUFpiEHA.4092@.TK2MSFTNGP10.phx.gbl...
> Hi
>
> Why would this error stop the execution of my Stored procedure.
> Server: Msg 8501, Level 16, State 3, Line 1
> [Microsoft][ODBC SQL Server Driver][SQL Server]MSDTC on server 'Server1'
is
> unavailable.
> I thought that only errors with level 20 to 25 did that.
>
> Ian
>
Error security level explanation please.
Why would this error stop the execution of my Stored procedure.
Server: Msg 8501, Level 16, State 3, Line 1
[Microsoft][ODBC SQL Server Driver][SQL Server]MSDTC on server 'Server1' is
unavailable.
I thought that only errors with level 20 to 25 did that.
IanHi,
Read these about error handling:
http://www.sommarskog.se/error-handling-I.html
http://www.sommarskog.se/error-handling-II.html
Check XACT_ABORT setting...
"Ian" <ian@.NoWhere.com> wrote in message
news:%23ZcyUFpiEHA.4092@.TK2MSFTNGP10.phx.gbl...
> Hi
>
> Why would this error stop the execution of my Stored procedure.
> Server: Msg 8501, Level 16, State 3, Line 1
> [Microsoft][ODBC SQL Server Driver][SQL Server]MSDTC on server 'Server1'
is
> unavailable.
> I thought that only errors with level 20 to 25 did that.
>
> Ian
>|||You had batch abort... There is not much documentation from MS on these
kinds of things, but Erland Sommerskog's articles that the previous
respondent points to is the best information available anywhere on the
subject. (Thanks Erland.)
--
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Ian" <ian@.NoWhere.com> wrote in message
news:%23ZcyUFpiEHA.4092@.TK2MSFTNGP10.phx.gbl...
> Hi
>
> Why would this error stop the execution of my Stored procedure.
> Server: Msg 8501, Level 16, State 3, Line 1
> [Microsoft][ODBC SQL Server Driver][SQL Server]MSDTC on server 'Server1'
is
> unavailable.
> I thought that only errors with level 20 to 25 did that.
>
> Ian
>|||Thanks heaps.
"Ian" <ian@.NoWhere.com> wrote in message
news:%23ZcyUFpiEHA.4092@.TK2MSFTNGP10.phx.gbl...
> Hi
>
> Why would this error stop the execution of my Stored procedure.
> Server: Msg 8501, Level 16, State 3, Line 1
> [Microsoft][ODBC SQL Server Driver][SQL Server]MSDTC on server 'Server1'
is
> unavailable.
> I thought that only errors with level 20 to 25 did that.
>
> Ian
>
Error running sp_helpdb
Server: Msg 515, Level 16, State 2, Procedure sp_helpdb, Line 53
Cannot insert the value NULL into column 'owner', table 'tempdb.dbo.#spdbdesc_ 0010001A6EF'; column does not allow nulls. INSERT fails. The statement has been terminated.
I have about 20 DBs on a SQL Server 2000 Standard Edition Instance with sp3a .
There have been no changes made to the Server or the SQL Server Instance in quite some time. Can anyone tell me how I should proceed??I think spid is null in master.dbo.sysdatabases,
check that first.
select spid from master.dbo.sysdatabases
u can use sp, sp_changedbowner 'ownername' if it is null .
And check that link,it may help u.
http://dbforums.com/t554105.html|||I did check select * from master.dbo.sysdatabases and I don't see anything unusual. and thanks.. but that other post wasn't very helpful... : (
I did some poking around and noticed that when I look at the properties of my Model and msdb databases in Enterprise Manager, they BOTH have {unknown} for Owner !!?? that CAN'T be a good thing !!
I checked BOL for sp_changedbowner and it says that you can't change the owner on master, msdb and ,model - so I'm a little leary to try it... Anyone have an suggestions? ... please..
Can I use sp_changdbowner on model and msdb if they are already Null or as Enterprise Manager puts it... UNKNOWN ? ?|||Yes u cannot chage owner of master,msdb and model db,Onlyway is,
eg:this will will change model db owner to 'sa'
exec sp_configure 'allow updates', 1
RECONFIGURE WITH OVERRIDE
go
update sysdatabases
set sid = 0x01
where name = 'model'
go
sp_configure 'allow updates', 0
RECONFIGURE WITH OVERRIDE|||Can I ask a dumb question??
How does that code change the owner? I see where it sets the SID. and, should the SID be set the same for model and msdb?|||0x01 is the sid of sa user,msdb,model db's owner should be under sa.
u can see that in,
select name, suser_sname(sid),sid
from master.dbo.sysdatabases|||Told you it was a dumb question. Thanks much!