Showing posts with label weird. Show all posts
Showing posts with label weird. Show all posts

Monday, March 19, 2012

Cannot create new database

Hi There
Ok weird one.
Cannot create any new databases on Sql Server, i get the following error.
Msg 1807, Level 16, State 3, Line 1
Could not obtain exclusive lock on database 'MODEL'. Retry the operation
later.
Fair enough , but i have triple checked there are no connections or locks on
model database.
Please help ?
Thanx
SeanDL wrote:
> Hi There
> Ok weird one.
> Cannot create any new databases on Sql Server, i get the following
> error.
> Msg 1807, Level 16, State 3, Line 1
> Could not obtain exclusive lock on database 'MODEL'. Retry the
> operation later.
> Fair enough , but i have triple checked there are no connections or
> locks on model database.
> Please help ?
> Thanx
Run "sp_helpdb model" and make sure the status is reporting the correct
information.
David Gugick
Quest Software
www.imceda.com
www.quest.com
|||Could you run the following query and see if you get any rows? You should
get no rows returned, if nobody is accessing the model database:
SELECT spid
FROM master..sysprocesses
WHERE dbid = DB_ID('model')
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"SeanDL" <SeanDL@.discussions.microsoft.com> wrote in message
news:CF746EEF-DD80-417F-AB55-3B2E2FC751C0@.microsoft.com...
Hi There
Ok weird one.
Cannot create any new databases on Sql Server, i get the following error.
Msg 1807, Level 16, State 3, Line 1
Could not obtain exclusive lock on database 'MODEL'. Retry the operation
later.
Fair enough , but i have triple checked there are no connections or locks on
model database.
Please help ?
Thanx
|||Hi,
If Vyas query returns '0' records and if you still have issues then try
restarting the SQL Server service and try creating
the database. This is really some thing new if there is no connection to
Model database.
Do post the reply once the problem is solved.
Thanks
Hari
SQL Server MVP
"SeanDL" <SeanDL@.discussions.microsoft.com> wrote in message
news:CF746EEF-DD80-417F-AB55-3B2E2FC751C0@.microsoft.com...
> Hi There
> Ok weird one.
> Cannot create any new databases on Sql Server, i get the following error.
> Msg 1807, Level 16, State 3, Line 1
> Could not obtain exclusive lock on database 'MODEL'. Retry the operation
> later.
> Fair enough , but i have triple checked there are no connections or locks
> on
> model database.
> Please help ?
> Thanx
|||Yes i have checked all of this, status of model is online and ok.
Nothing in sysprocesses and syslocks for model.
I am running it as sysadmin, cannot create database from any database that
is it does not matter if i am in master, msdb, userdatabase etc when i try to
create it.
This is a production database, i dont want to shut it down unless i know it
will fix the problem, server was rebooted Friday anyway.
Rather urgent please help?
Thanx
|||Yes the status is ok.
Nothing in sysprocesses or syslocks for model.
Can one detach the model database (as there are no processes on it) and
re-attach a mdel database from another server (as they are identical) while
sql server is running. It is a system database so i have a feeling it can
only be done in single user mode ? Or at least i know this is the case for
master database, not sure about model as it is not used unless a new db is
created ?
|||Please ignore the question on model database , as i have found out it can
only be done done with trace flag 3608 and sql must be restarted.
Thanx
|||If it is production and critical, then you might want to open a case with
Microsoft PSS.
As a temporary measure, could you create a new database on another server,
back it up and restore it onto the production server?
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"SeanDL" <SeanDL@.discussions.microsoft.com> wrote in message
news:51A651AC-BE30-42F8-B8BA-13F3F0D5E43D@.microsoft.com...
Yes i have checked all of this, status of model is online and ok.
Nothing in sysprocesses and syslocks for model.
I am running it as sysadmin, cannot create database from any database that
is it does not matter if i am in master, msdb, userdatabase etc when i try
to
create it.
This is a production database, i dont want to shut it down unless i know it
will fix the problem, server was rebooted Friday anyway.
Rather urgent please help?
Thanx
|||Marayana, this what i ended up doing.
Made the database on another server, detached and re-attached on the problem
server.
Thanx

Cannot create new database

Hi There
Ok weird one.
Cannot create any new databases on Sql Server, i get the following error.
Msg 1807, Level 16, State 3, Line 1
Could not obtain exclusive lock on database 'MODEL'. Retry the operation
later.
Fair enough , but i have triple checked there are no connections or locks on
model database.
Please help ?
ThanxSeanDL wrote:
> Hi There
> Ok weird one.
> Cannot create any new databases on Sql Server, i get the following
> error.
> Msg 1807, Level 16, State 3, Line 1
> Could not obtain exclusive lock on database 'MODEL'. Retry the
> operation later.
> Fair enough , but i have triple checked there are no connections or
> locks on model database.
> Please help ?
> Thanx
Run "sp_helpdb model" and make sure the status is reporting the correct
information.
David Gugick
Quest Software
www.imceda.com
www.quest.com|||Could you run the following query and see if you get any rows? You should
get no rows returned, if nobody is accessing the model database:
SELECT spid
FROM master..sysprocesses
WHERE dbid = DB_ID('model')
--
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"SeanDL" <SeanDL@.discussions.microsoft.com> wrote in message
news:CF746EEF-DD80-417F-AB55-3B2E2FC751C0@.microsoft.com...
Hi There
Ok weird one.
Cannot create any new databases on Sql Server, i get the following error.
Msg 1807, Level 16, State 3, Line 1
Could not obtain exclusive lock on database 'MODEL'. Retry the operation
later.
Fair enough , but i have triple checked there are no connections or locks on
model database.
Please help ?
Thanx|||Hi,
If Vyas query returns '0' records and if you still have issues then try
restarting the SQL Server service and try creating
the database. This is really some thing new if there is no connection to
Model database.
Do post the reply once the problem is solved.
Thanks
Hari
SQL Server MVP
"SeanDL" <SeanDL@.discussions.microsoft.com> wrote in message
news:CF746EEF-DD80-417F-AB55-3B2E2FC751C0@.microsoft.com...
> Hi There
> Ok weird one.
> Cannot create any new databases on Sql Server, i get the following error.
> Msg 1807, Level 16, State 3, Line 1
> Could not obtain exclusive lock on database 'MODEL'. Retry the operation
> later.
> Fair enough , but i have triple checked there are no connections or locks
> on
> model database.
> Please help ?
> Thanx|||Yes i have checked all of this, status of model is online and ok.
Nothing in sysprocesses and syslocks for model.
I am running it as sysadmin, cannot create database from any database that
is it does not matter if i am in master, msdb, userdatabase etc when i try t
o
create it.
This is a production database, i dont want to shut it down unless i know it
will fix the problem, server was rebooted Friday anyway.
Rather urgent please help?
Thanx|||Yes the status is ok.
Nothing in sysprocesses or syslocks for model.
Can one detach the model database (as there are no processes on it) and
re-attach a mdel database from another server (as they are identical) while
sql server is running. It is a system database so i have a feeling it can
only be done in single user mode ? Or at least i know this is the case for
master database, not sure about model as it is not used unless a new db is
created ?|||Please ignore the question on model database , as i have found out it can
only be done done with trace flag 3608 and sql must be restarted.
Thanx|||If it is production and critical, then you might want to open a case with
Microsoft PSS.
As a temporary measure, could you create a new database on another server,
back it up and restore it onto the production server?
--
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"SeanDL" <SeanDL@.discussions.microsoft.com> wrote in message
news:51A651AC-BE30-42F8-B8BA-13F3F0D5E43D@.microsoft.com...
Yes i have checked all of this, status of model is online and ok.
Nothing in sysprocesses and syslocks for model.
I am running it as sysadmin, cannot create database from any database that
is it does not matter if i am in master, msdb, userdatabase etc when i try
to
create it.
This is a production database, i dont want to shut it down unless i know it
will fix the problem, server was rebooted Friday anyway.
Rather urgent please help?
Thanx|||Marayana, this what i ended up doing.
Made the database on another server, detached and re-attached on the problem
server.
Thanx

Cannot create new database

Hi There
Ok weird one.
Cannot create any new databases on Sql Server, i get the following error.
Msg 1807, Level 16, State 3, Line 1
Could not obtain exclusive lock on database 'MODEL'. Retry the operation
later.
Fair enough , but i have triple checked there are no connections or locks on
model database.
Please help ?
ThanxSeanDL wrote:
> Hi There
> Ok weird one.
> Cannot create any new databases on Sql Server, i get the following
> error.
> Msg 1807, Level 16, State 3, Line 1
> Could not obtain exclusive lock on database 'MODEL'. Retry the
> operation later.
> Fair enough , but i have triple checked there are no connections or
> locks on model database.
> Please help ?
> Thanx
Run "sp_helpdb model" and make sure the status is reporting the correct
information.
--
David Gugick
Quest Software
www.imceda.com
www.quest.com|||Could you run the following query and see if you get any rows? You should
get no rows returned, if nobody is accessing the model database:
SELECT spid
FROM master..sysprocesses
WHERE dbid = DB_ID('model')
--
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"SeanDL" <SeanDL@.discussions.microsoft.com> wrote in message
news:CF746EEF-DD80-417F-AB55-3B2E2FC751C0@.microsoft.com...
Hi There
Ok weird one.
Cannot create any new databases on Sql Server, i get the following error.
Msg 1807, Level 16, State 3, Line 1
Could not obtain exclusive lock on database 'MODEL'. Retry the operation
later.
Fair enough , but i have triple checked there are no connections or locks on
model database.
Please help ?
Thanx|||Hi,
If Vyas query returns '0' records and if you still have issues then try
restarting the SQL Server service and try creating
the database. This is really some thing new if there is no connection to
Model database.
Do post the reply once the problem is solved.
Thanks
Hari
SQL Server MVP
"SeanDL" <SeanDL@.discussions.microsoft.com> wrote in message
news:CF746EEF-DD80-417F-AB55-3B2E2FC751C0@.microsoft.com...
> Hi There
> Ok weird one.
> Cannot create any new databases on Sql Server, i get the following error.
> Msg 1807, Level 16, State 3, Line 1
> Could not obtain exclusive lock on database 'MODEL'. Retry the operation
> later.
> Fair enough , but i have triple checked there are no connections or locks
> on
> model database.
> Please help ?
> Thanx|||Yes i have checked all of this, status of model is online and ok.
Nothing in sysprocesses and syslocks for model.
I am running it as sysadmin, cannot create database from any database that
is it does not matter if i am in master, msdb, userdatabase etc when i try to
create it.
This is a production database, i dont want to shut it down unless i know it
will fix the problem, server was rebooted Friday anyway.
Rather urgent please help?
Thanx|||Yes the status is ok.
Nothing in sysprocesses or syslocks for model.
Can one detach the model database (as there are no processes on it) and
re-attach a mdel database from another server (as they are identical) while
sql server is running. It is a system database so i have a feeling it can
only be done in single user mode ? Or at least i know this is the case for
master database, not sure about model as it is not used unless a new db is
created ?|||Please ignore the question on model database , as i have found out it can
only be done done with trace flag 3608 and sql must be restarted.
Thanx|||If it is production and critical, then you might want to open a case with
Microsoft PSS.
As a temporary measure, could you create a new database on another server,
back it up and restore it onto the production server?
--
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"SeanDL" <SeanDL@.discussions.microsoft.com> wrote in message
news:51A651AC-BE30-42F8-B8BA-13F3F0D5E43D@.microsoft.com...
Yes i have checked all of this, status of model is online and ok.
Nothing in sysprocesses and syslocks for model.
I am running it as sysadmin, cannot create database from any database that
is it does not matter if i am in master, msdb, userdatabase etc when i try
to
create it.
This is a production database, i dont want to shut it down unless i know it
will fix the problem, server was rebooted Friday anyway.
Rather urgent please help?
Thanx|||Marayana, this what i ended up doing.
Made the database on another server, detached and re-attached on the problem
server.
Thanx

Wednesday, March 7, 2012

Cannot connect weird issue

Hello,
I am getting the following errors when I try to connect to SQL from a XP
workstation:
Connection Failed.
SQL State '01000'
SQL Server Error:10061
[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]
ConnectionOpen(COnnect()).
Connection Failed.
SQL State '08001'
SQL Server Error:17
[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]SQL Server does not exist
or access denied.
But when I connect from a different PC I can connect fine. I have changed
network cables and switch ports for this PC but still the same errors appear.
I can bring a laptop over to where the PC is that is having the problem,
unplug the pc from the network and plug the la[top in using same line and the
laptop will connect right up to the SQL server no problem.
TIA
Phil Andersen
There are some issues with Windows XP, you have to open the appropiate
ports:
841252 How to manually enable TCP/IP on Windows XP Service Pack 2 for SQL
Server 2000
839980 How to use a script to programmatically open ports for SQL Server to
use on systems that are running Windows XP Service Pack 2
839269 You may not be able to connect to an instance of SQL Server that is
configured to use the Named Pipes server network library on a computer that
is running Windows XP Service Pack 2
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
"Phil Andersen" <PhilAndersen@.discussions.microsoft.com> schrieb im
Newsbeitrag news:F546FC62-5C16-4ED3-889A-E4F541FC0953@.microsoft.com...
> Hello,
> I am getting the following errors when I try to connect to SQL from a XP
> workstation:
> Connection Failed.
> SQL State '01000'
> SQL Server Error:10061
> [Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]
> ConnectionOpen(COnnect()).
> Connection Failed.
> SQL State '08001'
> SQL Server Error:17
> [Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]SQL Server does not
> exist
> or access denied.
> But when I connect from a different PC I can connect fine. I have changed
> network cables and switch ports for this PC but still the same errors
> appear.
> I can bring a laptop over to where the PC is that is having the problem,
> unplug the pc from the network and plug the la[top in using same line and
> the
> laptop will connect right up to the SQL server no problem.
> TIA
> Phil Andersen
>
|||I am using service pack 1
"Jens Sü?meyer" wrote:

> There are some issues with Windows XP, you have to open the appropiate
> ports:
> 841252 How to manually enable TCP/IP on Windows XP Service Pack 2 for SQL
> Server 2000
>
> 839980 How to use a script to programmatically open ports for SQL Server to
> use on systems that are running Windows XP Service Pack 2
>
> 839269 You may not be able to connect to an instance of SQL Server that is
> configured to use the Named Pipes server network library on a computer that
> is running Windows XP Service Pack 2
>
> --
> HTH, Jens Suessmeyer.
> --
> http://www.sqlserver2005.de
> --
> "Phil Andersen" <PhilAndersen@.discussions.microsoft.com> schrieb im
> Newsbeitrag news:F546FC62-5C16-4ED3-889A-E4F541FC0953@.microsoft.com...
>
>
|||ARe you sure you are using the same connection string ? Or with what kind of
program are you connecting ? If you have installed the client components yo
could try to make a broadcast for SQL Servers via OSL -L on the commandline.
There wasnt much information about your client components...
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
"Phil Andersen" <PhilAndersen@.discussions.microsoft.com> schrieb im
Newsbeitrag news:D324055E-80BD-40B7-9928-4E5C434E547D@.microsoft.com...[vbcol=seagreen]
>I am using service pack 1
>
> "Jens Smeyer" wrote:
|||OK in ODBC I switched from using TCP/IP to using NAMED PIPE and that made it
work. Still can't figure out why it all of the sudden needed this change and
only on like 5 machines out of 50
"Jens Sü?meyer" wrote:

> ARe you sure you are using the same connection string ? Or with what kind of
> program are you connecting ? If you have installed the client components yo
> could try to make a broadcast for SQL Servers via OSL -L on the commandline.
> There wasn′t much information about your client components...
> --
> HTH, Jens Suessmeyer.
> --
> http://www.sqlserver2005.de
> --
> "Phil Andersen" <PhilAndersen@.discussions.microsoft.com> schrieb im
> Newsbeitrag news:D324055E-80BD-40B7-9928-4E5C434E547D@.microsoft.com...
>
>
|||Hi Phil,
There was a issue on that on the newsgroups, so i post it here (Thanks to
Ashwin Kowtha for that):
1)Ping the SQL Server by name. See if it returns an IP address
2)If the IP returned by Ping is not the same IP as should be, you have a
problem right there.
3) Check if you have any static entries for your SQL Server in your LMHOSTS
or HOSTS file on the
client.
4) If you do, make sure that the IP is mapped to the correct name and vice
versa.
5) Connections going through by IP and named pipes, so you have basic NT and
SQL connectivity.
Check with your NT network admins to see if Name Resolution is working well.
6) run Select @.@.servername on the SQL server and see if the correct name is
being returned.
7) Instead of using Dynamically determine port, if connecting to a default
instance, try giving
the actual port number SQL is listening on.
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
"Phil Andersen" <PhilAndersen@.discussions.microsoft.com> schrieb im
Newsbeitrag news:248A248F-1D75-4837-B2C0-B1B362F62619@.microsoft.com...[vbcol=seagreen]
> OK in ODBC I switched from using TCP/IP to using NAMED PIPE and that made
> it
> work. Still can't figure out why it all of the sudden needed this change
> and
> only on like 5 machines out of 50
> "Jens Smeyer" wrote:

Cannot connect weird issue

Hello,
I am getting the following errors when I try to connect to SQL from a XP
workstation:
Connection Failed.
SQL State '01000'
SQL Server Error:10061
[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]
ConnectionOpen(COnnect()).
Connection Failed.
SQL State '08001'
SQL Server Error:17
[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]SQL Server do
es not exist
or access denied.
But when I connect from a different PC I can connect fine. I have changed
network cables and switch ports for this PC but still the same errors appear
.
I can bring a laptop over to where the PC is that is having the problem,
unplug the pc from the network and plug the la[top in using same line an
d the
laptop will connect right up to the SQL server no problem.
TIA
Phil AndersenThere are some issues with Windows XP, you have to open the appropiate
ports:
841252 How to manually enable TCP/IP on Windows XP Service Pack 2 for SQL
Server 2000
839980 How to use a script to programmatically open ports for SQL Server to
use on systems that are running Windows XP Service Pack 2
839269 You may not be able to connect to an instance of SQL Server that is
configured to use the Named Pipes server network library on a computer that
is running Windows XP Service Pack 2
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
--
"Phil Andersen" <PhilAndersen@.discussions.microsoft.com> schrieb im
Newsbeitrag news:F546FC62-5C16-4ED3-889A-E4F541FC0953@.microsoft.com...
> Hello,
> I am getting the following errors when I try to connect to SQL from a XP
> workstation:
> Connection Failed.
> SQL State '01000'
> SQL Server Error:10061
> [Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]
> ConnectionOpen(COnnect()).
> Connection Failed.
> SQL State '08001'
> SQL Server Error:17
> [Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]SQL Server
does not
> exist
> or access denied.
> But when I connect from a different PC I can connect fine. I have changed
> network cables and switch ports for this PC but still the same errors
> appear.
> I can bring a laptop over to where the PC is that is having the problem,
> unplug the pc from the network and plug the la[top in using same line
and
> the
> laptop will connect right up to the SQL server no problem.
> TIA
> Phil Andersen
>|||I am using service pack 1
"Jens Sü?meyer" wrote:

> There are some issues with Windows XP, you have to open the appropiate
> ports:
> 841252 How to manually enable TCP/IP on Windows XP Service Pack 2 for SQL
> Server 2000
>
> 839980 How to use a script to programmatically open ports for SQL Server t
o
> use on systems that are running Windows XP Service Pack 2
>
> 839269 You may not be able to connect to an instance of SQL Server that is
> configured to use the Named Pipes server network library on a computer tha
t
> is running Windows XP Service Pack 2
>
> --
> HTH, Jens Suessmeyer.
> --
> http://www.sqlserver2005.de
> --
> "Phil Andersen" <PhilAndersen@.discussions.microsoft.com> schrieb im
> Newsbeitrag news:F546FC62-5C16-4ED3-889A-E4F541FC0953@.microsoft.com...
>
>|||ARe you sure you are using the same connection string ? Or with what kind of
program are you connecting ? If you have installed the client components yo
could try to make a broadcast for SQL Servers via OSL -L on the commandline.
There wasnt much information about your client components...
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
--
"Phil Andersen" <PhilAndersen@.discussions.microsoft.com> schrieb im
Newsbeitrag news:D324055E-80BD-40B7-9928-4E5C434E547D@.microsoft.com...[vbcol=seagreen]
>I am using service pack 1
>
> "Jens Smeyer" wrote:
>|||OK in ODBC I switched from using TCP/IP to using NAMED PIPE and that made it
work. Still can't figure out why it all of the sudden needed this change and
only on like 5 machines out of 50
"Jens Sü?meyer" wrote:

> ARe you sure you are using the same connection string ? Or with what kind
of
> program are you connecting ? If you have installed the client components y
o
> could try to make a broadcast for SQL Servers via OSL -L on the commandlin
e.
> There wasn′t much information about your client components...
> --
> HTH, Jens Suessmeyer.
> --
> http://www.sqlserver2005.de
> --
> "Phil Andersen" <PhilAndersen@.discussions.microsoft.com> schrieb im
> Newsbeitrag news:D324055E-80BD-40B7-9928-4E5C434E547D@.microsoft.com...
>
>|||Hi Phil,
There was a issue on that on the newsgroups, so i post it here (Thanks to
Ashwin Kowtha for that):
1)Ping the SQL Server by name. See if it returns an IP address
2)If the IP returned by Ping is not the same IP as should be, you have a
problem right there.
3) Check if you have any static entries for your SQL Server in your LMHOSTS
or HOSTS file on the
client.
4) If you do, make sure that the IP is mapped to the correct name and vice
versa.
5) Connections going through by IP and named pipes, so you have basic NT and
SQL connectivity.
Check with your NT network admins to see if Name Resolution is working well.
6) run Select @.@.servername on the SQL server and see if the correct name is
being returned.
7) Instead of using Dynamically determine port, if connecting to a default
instance, try giving
the actual port number SQL is listening on.
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
--
"Phil Andersen" <PhilAndersen@.discussions.microsoft.com> schrieb im
Newsbeitrag news:248A248F-1D75-4837-B2C0-B1B362F62619@.microsoft.com...[vbcol=seagreen]
> OK in ODBC I switched from using TCP/IP to using NAMED PIPE and that made
> it
> work. Still can't figure out why it all of the sudden needed this change
> and
> only on like 5 machines out of 50
> "Jens Smeyer" wrote:
>