Showing posts with label mode. Show all posts
Showing posts with label mode. Show all posts

Friday, March 23, 2012

How can I open an SQL database and be the only one who has access to it?

Hello,
I'm opening an ADODB connection to an SQL database in VB6 using the
adModeShareExclusive mode for the connection object. The connection opens
successfully, but I'm still able to modify records in the database using
Enterprise Manager. Why is this? I want to open the SQL database and lock
out all other connections, i.e. anyone who tries to connect to it after I
have a successful adModeShareExclusive mode connection established should
get an error when they try to connect. At least that's what I'm trying to
accomplish so that I can do a complete rebuild of the database. I don't
want to kick everyone out of their connections when I try to connect. I'll
just keep trying until I finally get a connection when no one else is
connected. Does anyone out there know how I can do this? Maybe I should
simply be using a different mode, but which one?
Thanks,
William Hildebrand
hi William,
"William Hildebrand" <wahilde@.cableone.net> ha scritto nel messaggio
news:10lr3gghg65f074@.corp.supernews.com
> Hello,
> I'm opening an ADODB connection to an SQL database in VB6 using the
> adModeShareExclusive mode for the connection object. The connection
> opens successfully, but I'm still able to modify records in the
> database using Enterprise Manager. Why is this? I want to open the
> SQL database and lock out all other connections, i.e. anyone who
> tries to connect to it after I have a successful adModeShareExclusive
> mode connection established should get an error when they try to
> connect. At least that's what I'm trying to accomplish so that I can
> do a complete rebuild of the database. I don't want to kick everyone
> out of their connections when I try to connect. I'll just keep
> trying until I finally get a connection when no one else is
> connected. Does anyone out there know how I can do this? Maybe I
> should simply be using a different mode, but which one?
> Thanks,
> William Hildebrand
you can perhaps try another way...
setting the database in single user mode
ALTER DATABASE db_name
SET SINGLE_USER
after you established your ADO connection... eventually trap errors that
could be raised and, before closing your connection, execute
ALTER DATABASE db_name
SET MULTI_USER
please see
http://msdn.microsoft.com/library/de...aa-az_4e5h.asp
for ALTER DATABASE statement's synopsis, and the "termination" options that
could grant you further granularity...
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.9.1 - DbaMgr ver 0.55.1
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply

Monday, March 12, 2012

How Can I Know What is the licensing mode that was installed for S

How Can I Know What is the licensing mode that was installed for SQLSERVER.
If the sqlserver was installed per processor Licensing for example, mi contract must be match with this installation type or isn't necessary?
select serverproperty('LicenseType')
and yes it should match the actual license you purchased :-)
HTH
Jasper Smith (SQL Server MVP)
http://www.sqldbatips.com
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"Lorena" <Lorena@.discussions.microsoft.com> wrote in message
news:46AA03FC-E4AE-4380-BA7E-B8847B1B74B6@.microsoft.com...
> How Can I Know What is the licensing mode that was installed for
SQLSERVER.
> If the sqlserver was installed per processor Licensing for example, mi
contract must be match with this installation type or isn't necessary?
>
|||Hi
If you get this!
http://support.microsoft.com/default...b;en-us;291332
John
"Lorena" <Lorena@.discussions.microsoft.com> wrote in message
news:46AA03FC-E4AE-4380-BA7E-B8847B1B74B6@.microsoft.com...
> How Can I Know What is the licensing mode that was installed for
SQLSERVER.
> If the sqlserver was installed per processor Licensing for example, mi
contract must be match with this installation type or isn't necessary?
>
|||In the article it says that the bug with showing "DIABLED" was first
corrected in SQL2K Sp2. I'm on SP3 on all of my servers, but I still get
result "DISABLED" when I run the select serverproperty('LicenseType'). Does
anyone know if this is an issue that has come back with SP3?
Regards
Steen
"John Bell" <jbellnewsposts@.hotmail.com> skrev i en meddelelse
news:%23uvr0btXEHA.2364@.TK2MSFTNGP12.phx.gbl...
> Hi
> If you get this!
> http://support.microsoft.com/default...b;en-us;291332
> John
> "Lorena" <Lorena@.discussions.microsoft.com> wrote in message
> news:46AA03FC-E4AE-4380-BA7E-B8847B1B74B6@.microsoft.com...
> SQLSERVER.
> contract must be match with this installation type or isn't necessary?
>

How Can I Know What is the licensing mode that was installed for S

How Can I Know What is the licensing mode that was installed for SQLSERVER.
If the sqlserver was installed per processor Licensing for example, mi contr
act must be match with this installation type or isn't necessary?select serverproperty('LicenseType')
and yes it should match the actual license you purchased :-)
HTH
Jasper Smith (SQL Server MVP)
http://www.sqldbatips.com
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"Lorena" <Lorena@.discussions.microsoft.com> wrote in message
news:46AA03FC-E4AE-4380-BA7E-B8847B1B74B6@.microsoft.com...
> How Can I Know What is the licensing mode that was installed for
SQLSERVER.
> If the sqlserver was installed per processor Licensing for example, mi
contract must be match with this installation type or isn't necessary?
>|||Hi
If you get this!
http://support.microsoft.com/defaul...kb;en-us;291332
John
"Lorena" <Lorena@.discussions.microsoft.com> wrote in message
news:46AA03FC-E4AE-4380-BA7E-B8847B1B74B6@.microsoft.com...
> How Can I Know What is the licensing mode that was installed for
SQLSERVER.
> If the sqlserver was installed per processor Licensing for example, mi
contract must be match with this installation type or isn't necessary?
>|||In the article it says that the bug with showing "DIABLED" was first
corrected in SQL2K Sp2. I'm on SP3 on all of my servers, but I still get
result "DISABLED" when I run the select serverproperty('LicenseType'). Does
anyone know if this is an issue that has come back with SP3?
Regards
Steen
"John Bell" <jbellnewsposts@.hotmail.com> skrev i en meddelelse
news:%23uvr0btXEHA.2364@.TK2MSFTNGP12.phx.gbl...
> Hi
> If you get this!
> http://support.microsoft.com/defaul...kb;en-us;291332
> John
> "Lorena" <Lorena@.discussions.microsoft.com> wrote in message
> news:46AA03FC-E4AE-4380-BA7E-B8847B1B74B6@.microsoft.com...
> SQLSERVER.
> contract must be match with this installation type or isn't necessary?
>

How Can I Know What is the licensing mode that was installed for S

How Can I Know What is the licensing mode that was installed for SQLSERVER.
If the sqlserver was installed per processor Licensing for example, mi contract must be match with this installation type or isn't necessary?select serverproperty('LicenseType')
and yes it should match the actual license you purchased :-)
--
HTH
Jasper Smith (SQL Server MVP)
http://www.sqldbatips.com
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"Lorena" <Lorena@.discussions.microsoft.com> wrote in message
news:46AA03FC-E4AE-4380-BA7E-B8847B1B74B6@.microsoft.com...
> How Can I Know What is the licensing mode that was installed for
SQLSERVER.
> If the sqlserver was installed per processor Licensing for example, mi
contract must be match with this installation type or isn't necessary?
>|||Hi
If you get this!
http://support.microsoft.com/default.aspx?scid=kb;en-us;291332
John
"Lorena" <Lorena@.discussions.microsoft.com> wrote in message
news:46AA03FC-E4AE-4380-BA7E-B8847B1B74B6@.microsoft.com...
> How Can I Know What is the licensing mode that was installed for
SQLSERVER.
> If the sqlserver was installed per processor Licensing for example, mi
contract must be match with this installation type or isn't necessary?
>|||In the article it says that the bug with showing "DIABLED" was first
corrected in SQL2K Sp2. I'm on SP3 on all of my servers, but I still get
result "DISABLED" when I run the select serverproperty('LicenseType'). Does
anyone know if this is an issue that has come back with SP3?
Regards
Steen
"John Bell" <jbellnewsposts@.hotmail.com> skrev i en meddelelse
news:%23uvr0btXEHA.2364@.TK2MSFTNGP12.phx.gbl...
> Hi
> If you get this!
> http://support.microsoft.com/default.aspx?scid=kb;en-us;291332
> John
> "Lorena" <Lorena@.discussions.microsoft.com> wrote in message
> news:46AA03FC-E4AE-4380-BA7E-B8847B1B74B6@.microsoft.com...
> > How Can I Know What is the licensing mode that was installed for
> SQLSERVER.
> > If the sqlserver was installed per processor Licensing for example, mi
> contract must be match with this installation type or isn't necessary?
> >
> >
>