Hi,
I have a cursor that reads a table. During the reading of the table I want
to read e "field" directly (Not usign FETCH NEXT FROM authors_cursors INTO
@.col1, @.col2).
Thanks!claude81 wrote:
> Hi,
> I have a cursor that reads a table. During the reading of the table I
> want to read e "field" directly (Not usign FETCH NEXT FROM
> authors_cursors INTO @.col1, @.col2).
>
You have to FETCH NEXT INTO. There is no other way.
Cursors should be a last resort.
Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.|||Thaks!!
"Bob Barrows [MVP]" wrote:
> claude81 wrote:
> You have to FETCH NEXT INTO. There is no other way.
> Cursors should be a last resort.
> Bob Barrows
> --
> Microsoft MVP -- ASP/ASP.NET
> Please reply to the newsgroup. The email account listed in my From
> header is my spam trap, so I don't check it very often. You will get a
> quicker response by posting to the newsgroup.
>
>
Showing posts with label wantto. Show all posts
Showing posts with label wantto. Show all posts
Friday, March 30, 2012
Monday, March 26, 2012
Read only database to read-write
I have MSSQL 2000 database wich I made read only for some reason. Now I want
to make it writeable again.
I right click on the database in EM, go to options, remove the checkmark
near the 'read only', and when I click OK i get an error message wich says
that I can't take the database offline because database is in use.
How can a ReadOnly database be in use in such manner that I can't change
that? And, whas is ment by 'taking the database offline'?
Mike
"I can do it quick. I can do it cheap. I can do it well. Pick any two."
Mario Splivalo
msplival@.jagor.srce.hrI suggest you use the ALTER DATABASE command to change database options. One
of the possibilities it has is to throw out current users, for instance.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Mario Splivalo" <majk@.fly.srk.fer.hr> wrote in message
news:slrnc5vrd4.j1r.majk@.fly.srk.fer.hr...
> I have MSSQL 2000 database wich I made read only for some reason. Now I
want
> to make it writeable again.
> I right click on the database in EM, go to options, remove the checkmark
> near the 'read only', and when I click OK i get an error message wich says
> that I can't take the database offline because database is in use.
> How can a ReadOnly database be in use in such manner that I can't change
> that? And, whas is ment by 'taking the database offline'?
> Mike
> --
> "I can do it quick. I can do it cheap. I can do it well. Pick any two."
> Mario Splivalo
> msplival@.jagor.srce.hr|||Hi,
Yes, I agree with tiber on this, Issue the below command from Query analyzer
to make database READ_WRITE.
Alter database pubs1 set read_write with rollback immediate
(Replace pubs1 with actual database name.)
Note:
Rollback immediate option is equalent to Kill statement, it just closes all
the connected sessions. Otherwise even a read only session connected to the
database will create a block and will not allow you to change the database
options even if the database is read only.
Thanks
Hari
MCDBA
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:uANAkFLEEHA.3716@.TK2MSFTNGP10.phx.gbl...
> I suggest you use the ALTER DATABASE command to change database options.
One
> of the possibilities it has is to throw out current users, for instance.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
>
> "Mario Splivalo" <majk@.fly.srk.fer.hr> wrote in message
> news:slrnc5vrd4.j1r.majk@.fly.srk.fer.hr...
> want
says
>
to make it writeable again.
I right click on the database in EM, go to options, remove the checkmark
near the 'read only', and when I click OK i get an error message wich says
that I can't take the database offline because database is in use.
How can a ReadOnly database be in use in such manner that I can't change
that? And, whas is ment by 'taking the database offline'?
Mike
"I can do it quick. I can do it cheap. I can do it well. Pick any two."
Mario Splivalo
msplival@.jagor.srce.hrI suggest you use the ALTER DATABASE command to change database options. One
of the possibilities it has is to throw out current users, for instance.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Mario Splivalo" <majk@.fly.srk.fer.hr> wrote in message
news:slrnc5vrd4.j1r.majk@.fly.srk.fer.hr...
> I have MSSQL 2000 database wich I made read only for some reason. Now I
want
> to make it writeable again.
> I right click on the database in EM, go to options, remove the checkmark
> near the 'read only', and when I click OK i get an error message wich says
> that I can't take the database offline because database is in use.
> How can a ReadOnly database be in use in such manner that I can't change
> that? And, whas is ment by 'taking the database offline'?
> Mike
> --
> "I can do it quick. I can do it cheap. I can do it well. Pick any two."
> Mario Splivalo
> msplival@.jagor.srce.hr|||Hi,
Yes, I agree with tiber on this, Issue the below command from Query analyzer
to make database READ_WRITE.
Alter database pubs1 set read_write with rollback immediate
(Replace pubs1 with actual database name.)
Note:
Rollback immediate option is equalent to Kill statement, it just closes all
the connected sessions. Otherwise even a read only session connected to the
database will create a block and will not allow you to change the database
options even if the database is read only.
Thanks
Hari
MCDBA
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:uANAkFLEEHA.3716@.TK2MSFTNGP10.phx.gbl...
> I suggest you use the ALTER DATABASE command to change database options.
One
> of the possibilities it has is to throw out current users, for instance.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
>
> "Mario Splivalo" <majk@.fly.srk.fer.hr> wrote in message
> news:slrnc5vrd4.j1r.majk@.fly.srk.fer.hr...
> want
says
>
Subscribe to:
Comments (Atom)