... I monkeyed around with the sysdatabases to detach and then to finally
attach.. Is it safe to do so ?
While this may work, its unsupported. I will probably break merge
replication.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:etX7OJkYFHA.4024@.TK2MSFTNGP10.phx.gbl...
> ... I monkeyed around with the sysdatabases to detach and then to finally
> attach.. Is it safe to do so ?
>
|||Im using it for transactional replication.. I intend to stop the log reader
and the distribution agent(s) tied to that database before i proceed ..
"Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
news:uUuZckkYFHA.2684@.TK2MSFTNGP09.phx.gbl...[vbcol=seagreen]
> While this may work, its unsupported. I will probably break merge
> replication.
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
> "Hassan" <fatima_ja@.hotmail.com> wrote in message
> news:etX7OJkYFHA.4024@.TK2MSFTNGP10.phx.gbl...
finally
>
|||What are you tryin to accomplish by doing this?
--
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:e3MDVClYFHA.1344@.TK2MSFTNGP15.phx.gbl...
> Im using it for transactional replication.. I intend to stop the log
> reader
> and the distribution agent(s) tied to that database before i proceed ..
>
> "Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
> news:uUuZckkYFHA.2684@.TK2MSFTNGP09.phx.gbl...
> finally
>
Showing posts with label sysdatabases. Show all posts
Showing posts with label sysdatabases. Show all posts
Friday, February 24, 2012
Can somebody explain what this is doing... select ...status & 4096 ...
Can somebody explain what "status & 4096" is doing in this SQL:
"select name, (status & 4096) as 'SingleUser' from sysdatabases.
In SQL Books, I find reference to "bitwise" operation. In my case, a databa
se has a status value of 4104 (which means "single user" and "trunc. log on
chkpt"). This statement returns a value of 4096 for this particular databas
e. I want to understand wh
y a 4096 (and 0 for ones that are not "single user") is being returned.
Thanks> I want to understand why a 4096 (and 0 for ones that are not "single
user") is being returned.
From the SQL 2000 Books Online:
<Excerpt href="http://links.10026.com/?link=tsqlref.chm::/ts_operator_7fax.htm">
The bitwise & operator performs a bitwise logical AND between the two
expressions, taking each corresponding bit for both expressions. The bits in
the result are set to 1 if and only if both bits (for the current bit being
resolved) in the input expressions have a value of 1; otherwise, the bit in
the result is set to 0.
<Excerpt>
Since the binary value of 4096 is 0001000000000000, a single bit is
evaluated and the expression 'status & 4096 will yeild either 0 or 4096.
This allows the single-user status bit to be examined independently of the
other bit values.
Hope this helps.
Dan Guzman
SQL Server MVP
"john lantz" <anonymous@.discussions.microsoft.com> wrote in message
news:060E090D-18F1-4649-980B-FF4FB64DB205@.microsoft.com...
> Can somebody explain what "status & 4096" is doing in this SQL:
> "select name, (status & 4096) as 'SingleUser' from sysdatabases.
> In SQL Books, I find reference to "bitwise" operation. In my case, a
database has a status value of 4104 (which means "single user" and "trunc.
log on chkpt"). This statement returns a value of 4096 for this particular
database. I want to understand why a 4096 (and 0 for ones that are not
"single user") is being returned.
> Thanks
"select name, (status & 4096) as 'SingleUser' from sysdatabases.
In SQL Books, I find reference to "bitwise" operation. In my case, a databa
se has a status value of 4104 (which means "single user" and "trunc. log on
chkpt"). This statement returns a value of 4096 for this particular databas
e. I want to understand wh
y a 4096 (and 0 for ones that are not "single user") is being returned.
Thanks> I want to understand why a 4096 (and 0 for ones that are not "single
user") is being returned.
From the SQL 2000 Books Online:
<Excerpt href="http://links.10026.com/?link=tsqlref.chm::/ts_operator_7fax.htm">
The bitwise & operator performs a bitwise logical AND between the two
expressions, taking each corresponding bit for both expressions. The bits in
the result are set to 1 if and only if both bits (for the current bit being
resolved) in the input expressions have a value of 1; otherwise, the bit in
the result is set to 0.
<Excerpt>
Since the binary value of 4096 is 0001000000000000, a single bit is
evaluated and the expression 'status & 4096 will yeild either 0 or 4096.
This allows the single-user status bit to be examined independently of the
other bit values.
Hope this helps.
Dan Guzman
SQL Server MVP
"john lantz" <anonymous@.discussions.microsoft.com> wrote in message
news:060E090D-18F1-4649-980B-FF4FB64DB205@.microsoft.com...
> Can somebody explain what "status & 4096" is doing in this SQL:
> "select name, (status & 4096) as 'SingleUser' from sysdatabases.
> In SQL Books, I find reference to "bitwise" operation. In my case, a
database has a status value of 4104 (which means "single user" and "trunc.
log on chkpt"). This statement returns a value of 4096 for this particular
database. I want to understand why a 4096 (and 0 for ones that are not
"single user") is being returned.
> Thanks
Can somebody explain what this is doing... select ...status & 4096 ...
Can somebody explain what "status & 4096" is doing in this SQL:
"select name, (status & 4096) as 'SingleUser' from sysdatabases.
In SQL Books, I find reference to "bitwise" operation. In my case, a database has a status value of 4104 (which means "single user" and "trunc. log on chkpt"). This statement returns a value of 4096 for this particular database. I want to understand wh
y a 4096 (and 0 for ones that are not "single user") is being returned.
Thanks
> I want to understand why a 4096 (and 0 for ones that are not "single
user") is being returned.
From the SQL 2000 Books Online:
<Excerpt href="http://links.10026.com/?link=tsqlref.chm::/ts_operator_7fax.htm">
The bitwise & operator performs a bitwise logical AND between the two
expressions, taking each corresponding bit for both expressions. The bits in
the result are set to 1 if and only if both bits (for the current bit being
resolved) in the input expressions have a value of 1; otherwise, the bit in
the result is set to 0.
<Excerpt>
Since the binary value of 4096 is 0001000000000000, a single bit is
evaluated and the expression 'status & 4096 will yeild either 0 or 4096.
This allows the single-user status bit to be examined independently of the
other bit values.
Hope this helps.
Dan Guzman
SQL Server MVP
"john lantz" <anonymous@.discussions.microsoft.com> wrote in message
news:060E090D-18F1-4649-980B-FF4FB64DB205@.microsoft.com...
> Can somebody explain what "status & 4096" is doing in this SQL:
> "select name, (status & 4096) as 'SingleUser' from sysdatabases.
> In SQL Books, I find reference to "bitwise" operation. In my case, a
database has a status value of 4104 (which means "single user" and "trunc.
log on chkpt"). This statement returns a value of 4096 for this particular
database. I want to understand why a 4096 (and 0 for ones that are not
"single user") is being returned.
> Thanks
"select name, (status & 4096) as 'SingleUser' from sysdatabases.
In SQL Books, I find reference to "bitwise" operation. In my case, a database has a status value of 4104 (which means "single user" and "trunc. log on chkpt"). This statement returns a value of 4096 for this particular database. I want to understand wh
y a 4096 (and 0 for ones that are not "single user") is being returned.
Thanks
> I want to understand why a 4096 (and 0 for ones that are not "single
user") is being returned.
From the SQL 2000 Books Online:
<Excerpt href="http://links.10026.com/?link=tsqlref.chm::/ts_operator_7fax.htm">
The bitwise & operator performs a bitwise logical AND between the two
expressions, taking each corresponding bit for both expressions. The bits in
the result are set to 1 if and only if both bits (for the current bit being
resolved) in the input expressions have a value of 1; otherwise, the bit in
the result is set to 0.
<Excerpt>
Since the binary value of 4096 is 0001000000000000, a single bit is
evaluated and the expression 'status & 4096 will yeild either 0 or 4096.
This allows the single-user status bit to be examined independently of the
other bit values.
Hope this helps.
Dan Guzman
SQL Server MVP
"john lantz" <anonymous@.discussions.microsoft.com> wrote in message
news:060E090D-18F1-4649-980B-FF4FB64DB205@.microsoft.com...
> Can somebody explain what "status & 4096" is doing in this SQL:
> "select name, (status & 4096) as 'SingleUser' from sysdatabases.
> In SQL Books, I find reference to "bitwise" operation. In my case, a
database has a status value of 4104 (which means "single user" and "trunc.
log on chkpt"). This statement returns a value of 4096 for this particular
database. I want to understand why a 4096 (and 0 for ones that are not
"single user") is being returned.
> Thanks
Subscribe to:
Posts (Atom)