Friday, March 30, 2012
Is Truncating Log commiting data the the actual DB?
My last entry in the .mdb file was January and everything else has been
sitting in the Transaction log files. Everything works fine. I'm just
wondering if Truncating the logs mean I'm going to commit the data from the
log files to the .mdb file. So if I truncate and look in the .mdb file,
will I see all my entries up to the most current period?
Thanks!AFAIK you will not see the data in the datafile until it is commited. And SQ
L
Server will not truncate stuff that is not commited or saved (for example
with a log backup).
Truncating the log means, that you truncate the unused or unneccessary data
from the logfile that is not neccessary any more.
regards
Andreas
"Phillip Vong" wrote:
> Newbie question running SQL 2k
> My last entry in the .mdb file was January and everything else has been
> sitting in the Transaction log files. Everything works fine. I'm just
> wondering if Truncating the logs mean I'm going to commit the data from th
e
> log files to the .mdb file. So if I truncate and look in the .mdb file,
> will I see all my entries up to the most current period?
> Thanks!
>
>|||Phillip,
The data in the transaction log files is committed to the database files not
long after the transaction is written to the log. There are a number of
factors to consider, but if nobody has changed anything since January it all
should be in the database by now.
Truncating the log is throwing away the transaction records that could be
used to recover in case of a failure. Actually, you almost never should
truncate. If you do not want the logs, change to the SIMPLE recovery model.
And make sure that you backup the database regularly.
The behavior of transaction logs is discussed under the backup and restore
strategy portions of the Books Online, so you need to familiarize yourself
with those. It is not too complicated.
RLF
"Phillip Vong" <phillip_vong*at*yahoo*dot*com> wrote in message
news:eSU5ZElYHHA.3256@.TK2MSFTNGP04.phx.gbl...
> Newbie question running SQL 2k
> My last entry in the .mdb file was January and everything else has been
> sitting in the Transaction log files. Everything works fine. I'm just
> wondering if Truncating the logs mean I'm going to commit the data from
> the log files to the .mdb file. So if I truncate and look in the .mdb
> file, will I see all my entries up to the most current period?
> Thanks!
>|||Russell, thanks for the update.
Can you tell me why the data in my tranaction log files has not committed to
the db files? You said "Shortly", but the last entry was 1/18/2007 in the
db file. Things are added to this db everyday by my user. Why are they all
staying in the transaction log file and not being committed. Can I force it
to commit some how? There are 1027 records in the log files and I want to
commit them to the db file. Will changing db to SIMPLE force it to commit
the data? I'm not going to lose what I have in the Log files am I?
"Russell Fields" <russellfields@.nomail.com> wrote in message
news:%23Gnin2lYHHA.992@.TK2MSFTNGP02.phx.gbl...
> Phillip,
> The data in the transaction log files is committed to the database files
> not long after the transaction is written to the log. There are a number
> of factors to consider, but if nobody has changed anything since January
> it all should be in the database by now.
> Truncating the log is throwing away the transaction records that could be
> used to recover in case of a failure. Actually, you almost never should
> truncate. If you do not want the logs, change to the SIMPLE recovery
> model. And make sure that you backup the database regularly.
> The behavior of transaction logs is discussed under the backup and restore
> strategy portions of the Books Online, so you need to familiarize yourself
> with those. It is not too complicated.
> RLF
> "Phillip Vong" <phillip_vong*at*yahoo*dot*com> wrote in message
> news:eSU5ZElYHHA.3256@.TK2MSFTNGP04.phx.gbl...
>|||"Phillip Vong" <phillip_vong*at*yahoo*dot*com> wrote in message
news:uWxxX%23mYHHA.3984@.TK2MSFTNGP02.phx.gbl...
> Russell, thanks for the update.
> Can you tell me why the data in my tranaction log files has not committed
> to the db files? You said "Shortly", but the last entry was 1/18/2007 in
> the db file. Things are added to this db everyday by my user. Why are
> they all staying in the transaction log file and not being committed. Can
> I force it to commit some how? There are 1027 records in the log files and
> I want to commit them to the db file. Will changing db to SIMPLE force it
> to commit the data? I'm not going to lose what I have in the Log files am
> I?
Umm, how are you determining that things are NOT being committed?
If you do a select against inserted data, if you're seeing it, (and not
using read uncommitted) the data is definitely committed.
If you're basing your assumptions on FILE dates, then two things:
1) The file date on the file is the last time the file was OPENED or the
SIZE of it was changed.
So it sounds like you're looking at the file size of the MDF and assuming
nothing is committed since the data hasn't changed. This isn't really true.
2) If the size of the transaction log is GROWING, this means you're not
doing transaction log backups most likely. Which means your recovery plans
probably wont' be good.
>
Greg Moore
SQL Server DBA Consulting
sql (at) greenms.com http://www.greenms.com
Is Truncating Log commiting data the the actual DB?
My last entry in the .mdb file was January and everything else has been
sitting in the Transaction log files. Everything works fine. I'm just
wondering if Truncating the logs mean I'm going to commit the data from the
log files to the .mdb file. So if I truncate and look in the .mdb file,
will I see all my entries up to the most current period?
Thanks!
AFAIK you will not see the data in the datafile until it is commited. And SQL
Server will not truncate stuff that is not commited or saved (for example
with a log backup).
Truncating the log means, that you truncate the unused or unneccessary data
from the logfile that is not neccessary any more.
regards
Andreas
"Phillip Vong" wrote:
> Newbie question running SQL 2k
> My last entry in the .mdb file was January and everything else has been
> sitting in the Transaction log files. Everything works fine. I'm just
> wondering if Truncating the logs mean I'm going to commit the data from the
> log files to the .mdb file. So if I truncate and look in the .mdb file,
> will I see all my entries up to the most current period?
> Thanks!
>
>
|||Phillip,
The data in the transaction log files is committed to the database files not
long after the transaction is written to the log. There are a number of
factors to consider, but if nobody has changed anything since January it all
should be in the database by now.
Truncating the log is throwing away the transaction records that could be
used to recover in case of a failure. Actually, you almost never should
truncate. If you do not want the logs, change to the SIMPLE recovery model.
And make sure that you backup the database regularly.
The behavior of transaction logs is discussed under the backup and restore
strategy portions of the Books Online, so you need to familiarize yourself
with those. It is not too complicated.
RLF
"Phillip Vong" <phillip_vong*at*yahoo*dot*com> wrote in message
news:eSU5ZElYHHA.3256@.TK2MSFTNGP04.phx.gbl...
> Newbie question running SQL 2k
> My last entry in the .mdb file was January and everything else has been
> sitting in the Transaction log files. Everything works fine. I'm just
> wondering if Truncating the logs mean I'm going to commit the data from
> the log files to the .mdb file. So if I truncate and look in the .mdb
> file, will I see all my entries up to the most current period?
> Thanks!
>
|||Russell, thanks for the update.
Can you tell me why the data in my tranaction log files has not committed to
the db files? You said "Shortly", but the last entry was 1/18/2007 in the
db file. Things are added to this db everyday by my user. Why are they all
staying in the transaction log file and not being committed. Can I force it
to commit some how? There are 1027 records in the log files and I want to
commit them to the db file. Will changing db to SIMPLE force it to commit
the data? I'm not going to lose what I have in the Log files am I?
"Russell Fields" <russellfields@.nomail.com> wrote in message
news:%23Gnin2lYHHA.992@.TK2MSFTNGP02.phx.gbl...
> Phillip,
> The data in the transaction log files is committed to the database files
> not long after the transaction is written to the log. There are a number
> of factors to consider, but if nobody has changed anything since January
> it all should be in the database by now.
> Truncating the log is throwing away the transaction records that could be
> used to recover in case of a failure. Actually, you almost never should
> truncate. If you do not want the logs, change to the SIMPLE recovery
> model. And make sure that you backup the database regularly.
> The behavior of transaction logs is discussed under the backup and restore
> strategy portions of the Books Online, so you need to familiarize yourself
> with those. It is not too complicated.
> RLF
> "Phillip Vong" <phillip_vong*at*yahoo*dot*com> wrote in message
> news:eSU5ZElYHHA.3256@.TK2MSFTNGP04.phx.gbl...
>
|||"Phillip Vong" <phillip_vong*at*yahoo*dot*com> wrote in message
news:uWxxX%23mYHHA.3984@.TK2MSFTNGP02.phx.gbl...
> Russell, thanks for the update.
> Can you tell me why the data in my tranaction log files has not committed
> to the db files? You said "Shortly", but the last entry was 1/18/2007 in
> the db file. Things are added to this db everyday by my user. Why are
> they all staying in the transaction log file and not being committed. Can
> I force it to commit some how? There are 1027 records in the log files and
> I want to commit them to the db file. Will changing db to SIMPLE force it
> to commit the data? I'm not going to lose what I have in the Log files am
> I?
Umm, how are you determining that things are NOT being committed?
If you do a select against inserted data, if you're seeing it, (and not
using read uncommitted) the data is definitely committed.
If you're basing your assumptions on FILE dates, then two things:
1) The file date on the file is the last time the file was OPENED or the
SIZE of it was changed.
So it sounds like you're looking at the file size of the MDF and assuming
nothing is committed since the data hasn't changed. This isn't really true.
2) If the size of the transaction log is GROWING, this means you're not
doing transaction log backups most likely. Which means your recovery plans
probably wont' be good.
>
Greg Moore
SQL Server DBA Consulting
sql (at) greenms.com http://www.greenms.com
Is Truncating Log commiting data the the actual DB?
My last entry in the .mdb file was January and everything else has been
sitting in the Transaction log files. Everything works fine. I'm just
wondering if Truncating the logs mean I'm going to commit the data from the
log files to the .mdb file. So if I truncate and look in the .mdb file,
will I see all my entries up to the most current period?
Thanks!AFAIK you will not see the data in the datafile until it is commited. And SQL
Server will not truncate stuff that is not commited or saved (for example
with a log backup).
Truncating the log means, that you truncate the unused or unneccessary data
from the logfile that is not neccessary any more.
regards
Andreas
"Phillip Vong" wrote:
> Newbie question running SQL 2k
> My last entry in the .mdb file was January and everything else has been
> sitting in the Transaction log files. Everything works fine. I'm just
> wondering if Truncating the logs mean I'm going to commit the data from the
> log files to the .mdb file. So if I truncate and look in the .mdb file,
> will I see all my entries up to the most current period?
> Thanks!
>
>|||Phillip,
The data in the transaction log files is committed to the database files not
long after the transaction is written to the log. There are a number of
factors to consider, but if nobody has changed anything since January it all
should be in the database by now.
Truncating the log is throwing away the transaction records that could be
used to recover in case of a failure. Actually, you almost never should
truncate. If you do not want the logs, change to the SIMPLE recovery model.
And make sure that you backup the database regularly.
The behavior of transaction logs is discussed under the backup and restore
strategy portions of the Books Online, so you need to familiarize yourself
with those. It is not too complicated.
RLF
"Phillip Vong" <phillip_vong*at*yahoo*dot*com> wrote in message
news:eSU5ZElYHHA.3256@.TK2MSFTNGP04.phx.gbl...
> Newbie question running SQL 2k
> My last entry in the .mdb file was January and everything else has been
> sitting in the Transaction log files. Everything works fine. I'm just
> wondering if Truncating the logs mean I'm going to commit the data from
> the log files to the .mdb file. So if I truncate and look in the .mdb
> file, will I see all my entries up to the most current period?
> Thanks!
>|||Russell, thanks for the update.
Can you tell me why the data in my tranaction log files has not committed to
the db files? You said "Shortly", but the last entry was 1/18/2007 in the
db file. Things are added to this db everyday by my user. Why are they all
staying in the transaction log file and not being committed. Can I force it
to commit some how? There are 1027 records in the log files and I want to
commit them to the db file. Will changing db to SIMPLE force it to commit
the data? I'm not going to lose what I have in the Log files am I?
"Russell Fields" <russellfields@.nomail.com> wrote in message
news:%23Gnin2lYHHA.992@.TK2MSFTNGP02.phx.gbl...
> Phillip,
> The data in the transaction log files is committed to the database files
> not long after the transaction is written to the log. There are a number
> of factors to consider, but if nobody has changed anything since January
> it all should be in the database by now.
> Truncating the log is throwing away the transaction records that could be
> used to recover in case of a failure. Actually, you almost never should
> truncate. If you do not want the logs, change to the SIMPLE recovery
> model. And make sure that you backup the database regularly.
> The behavior of transaction logs is discussed under the backup and restore
> strategy portions of the Books Online, so you need to familiarize yourself
> with those. It is not too complicated.
> RLF
> "Phillip Vong" <phillip_vong*at*yahoo*dot*com> wrote in message
> news:eSU5ZElYHHA.3256@.TK2MSFTNGP04.phx.gbl...
>> Newbie question running SQL 2k
>> My last entry in the .mdb file was January and everything else has been
>> sitting in the Transaction log files. Everything works fine. I'm just
>> wondering if Truncating the logs mean I'm going to commit the data from
>> the log files to the .mdb file. So if I truncate and look in the .mdb
>> file, will I see all my entries up to the most current period?
>> Thanks!
>>
>|||"Phillip Vong" <phillip_vong*at*yahoo*dot*com> wrote in message
news:uWxxX%23mYHHA.3984@.TK2MSFTNGP02.phx.gbl...
> Russell, thanks for the update.
> Can you tell me why the data in my tranaction log files has not committed
> to the db files? You said "Shortly", but the last entry was 1/18/2007 in
> the db file. Things are added to this db everyday by my user. Why are
> they all staying in the transaction log file and not being committed. Can
> I force it to commit some how? There are 1027 records in the log files and
> I want to commit them to the db file. Will changing db to SIMPLE force it
> to commit the data? I'm not going to lose what I have in the Log files am
> I?
Umm, how are you determining that things are NOT being committed?
If you do a select against inserted data, if you're seeing it, (and not
using read uncommitted) the data is definitely committed.
If you're basing your assumptions on FILE dates, then two things:
1) The file date on the file is the last time the file was OPENED or the
SIZE of it was changed.
So it sounds like you're looking at the file size of the MDF and assuming
nothing is committed since the data hasn't changed. This isn't really true.
2) If the size of the transaction log is GROWING, this means you're not
doing transaction log backups most likely. Which means your recovery plans
probably wont' be good.
>
Greg Moore
SQL Server DBA Consulting
sql (at) greenms.com http://www.greenms.com
Is transaction name has to be unique?
I remember that once I had a problem when using a cursor in a sp and when several instances of the sp were running I had a problem when the first sp in the sequence deallocated the cursor and all the other who run in parallel had errors...
Well, this is not the problem now, but my question is, if I have a sp that has begin tran t1, and several instances of the sp are running in parallel, and each of course has begin tran t1, should I expect the same collision effect like with the cursor? Is every tran has to be with unique name? Or maybe the server knows how to manage this and when one tran has started and another sp tried to start another with the same name it makes it wait until the first one committed or rolled back?
Thanks,
Inon.I would think that this would be a particularly bad idea, though I have no specific experience in this area (transaction numbers). As I always understood it, the idea behind an explicitly identified transaction was to be able to roll back that specific transaction, particularly in an asynchronous environment. You have to ask yourself, what is the value in re-using the same transaction identifier? If you are just going to re-use the same identifier, then why bother with an identifier at all?
Regards,
hmscott
Monday, March 26, 2012
Is this possible? Monitor replication from VB 6.0
2000 (databse is about 13 gigabytes, this is _not_ MSDE). They have a
legacy application written in VB 6.0.
The decision has been made to change their replication model.
Replication between a "central" SQL Server database and the laptops
used to be triggered through the application whenever the laptop user
chose to. Now they are going to use a two-part method, so that the
user's logs are replicated whenever they connect to the central server,
and product data (which can be huge) will be scheduled in stages
overnight. The VB application will have no control over when they
replicate. The logs will use Merge replication and the product data
will use Transactional replication.
The problem is they expect the application to continue to monitor the
replication "progress" in both scenarios. I have gotten them to accept
that their progress bars will go away, that there will only be an item
in their status bars that it is running (or not).
I have figured out a way to monitor that Merge replication is going on
by watching the MSmerge_history and MSmerge_agents tables in the
Distribution database, but I am not sure that even this will continue
to work once the laptops stop using the ActiveX MS SQL Merge Control to
trigger replication, and it will not work at all for Transactional
replication.
Does anyone have a way (or have a suggestion that might lead to a way)
as to how I can tell from VB whether replication is in progress against
the local SQL Server database? If you believe this is impossible, I
would appreciate hearing that as well.
Thanks,
Austin
Have you looked at the status event?
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
"AustinMN" <tacooper260@.hotmail.com> wrote in message
news:1126531606.616225.228610@.g14g2000cwa.googlegr oups.com...
> I have a client with approximately 30 laptops all running SQL Server
> 2000 (databse is about 13 gigabytes, this is _not_ MSDE). They have a
> legacy application written in VB 6.0.
> The decision has been made to change their replication model.
> Replication between a "central" SQL Server database and the laptops
> used to be triggered through the application whenever the laptop user
> chose to. Now they are going to use a two-part method, so that the
> user's logs are replicated whenever they connect to the central server,
> and product data (which can be huge) will be scheduled in stages
> overnight. The VB application will have no control over when they
> replicate. The logs will use Merge replication and the product data
> will use Transactional replication.
> The problem is they expect the application to continue to monitor the
> replication "progress" in both scenarios. I have gotten them to accept
> that their progress bars will go away, that there will only be an item
> in their status bars that it is running (or not).
> I have figured out a way to monitor that Merge replication is going on
> by watching the MSmerge_history and MSmerge_agents tables in the
> Distribution database, but I am not sure that even this will continue
> to work once the laptops stop using the ActiveX MS SQL Merge Control to
> trigger replication, and it will not work at all for Transactional
> replication.
> Does anyone have a way (or have a suggestion that might lead to a way)
> as to how I can tell from VB whether replication is in progress against
> the local SQL Server database? If you believe this is impossible, I
> would appreciate hearing that as well.
> Thanks,
> Austin
>
|||Hilary Cotter wrote
> Have you looked at the status event?
Yes, I have. The Status event applies to the ActiveX replication
components, whicb are being removed from the application. It only reports
on replication started by the components, so is useless for replication
initiated by the Distributor/Publisher database.
Austin
You programmed with 1s and 0s? We only had 0s!
There are no X characters in my address
> --
> 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
> "AustinMN" <tacooper260@.hotmail.com> wrote in message
> news:1126531606.616225.228610@.g14g2000cwa.googlegr oups.com...
>
|||"AustinMN" <tacooper260@.hotmail.com> wrote in message
news:1126531606.616225.228610@.g14g2000cwa.googlegr oups.com...
>I have a client with approximately 30 laptops all running SQL Server
> The problem is they expect the application to continue to monitor the
> replication "progress" in both scenarios. I have gotten them to accept
> that their progress bars will go away, that there will only be an item
> in their status bars that it is running (or not).
> I have figured out a way to monitor that Merge replication is going on
> by watching the MSmerge_history and MSmerge_agents tables in the
> Distribution database, but I am not sure that even this will continue
> to work once the laptops stop using the ActiveX MS SQL Merge Control to
> trigger replication, and it will not work at all for Transactional
> replication.
> Does anyone have a way (or have a suggestion that might lead to a way)
> as to how I can tell from VB whether replication is in progress against
> the local SQL Server database? If you believe this is impossible, I
> would appreciate hearing that as well.
>
My experience is with Oracle. With Oracle Enterprise Manager, you can see a list
of current connections (which I do fairly often), and you can see lists or logs
of recent changes (which I don't do much). It seems like there would have to be
something similar in SQL Server. Activity at the level of replication can't be
completely hidden. It is just a matter of finding out which thing to look
for...Maybe you could even detect the running process on the laptop with an API
call?
Wednesday, March 21, 2012
Is this a limitation of Reporting Services...?
limitation of Reporting Services. This is related to exporting a report to
.pdf that contains an embedded image. I have seen some discussion on this,
but have been unable to glean a solution from the existing threads.
My problem is that when I embed an image into my reports, it looks ok
in Visual Studio, but when I export to .pdf, it is blocky and distorted. My
graphics guy has put the image into ten different formats with different
resolutions, but they all render the same way.
What is the Microsoft recommeded format and resolution for image rendering
to .pdf? He designed the logo and can put it in whatever format I need, I
just don't know what to tell him. I found something on Image Device
Information Settings,
that lists 96 dpi as the best, but we tried that with the same results. It
also said something about the tif format, but when I tried to import the .tif
file, .tif was not listed as an image format in the wizard.
And yes, I have upgraded to SP1.I have posted this same message 7 times and still have not received an
answer. I am beginning to think that I am either invisible, or I have found
a limitation of Reporting Services. If that is the case, I would love for
someone to tell me so. I have spent more hours than I can count trying to
resolve this...
PLEASE HELP ME!!!!!!!!!!!!!!!!!|||OK, so I read this to see if I can help. I don't have a clue what your
problem is. Either repost with the problem to this thread or better yet,
repost with a good description in the subject. Depending on the subject
people with different expertise will jump in.
--
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Lisa" <Lisa@.discussions.microsoft.com> wrote in message
news:9FB5F4A6-75FD-4DAD-9B73-B7F63CCE92F1@.microsoft.com...
> I have posted this same message 7 times and still have not received an
> answer. I am beginning to think that I am either invisible, or I have
found
> a limitation of Reporting Services. If that is the case, I would love for
> someone to tell me so. I have spent more hours than I can count trying to
> resolve this...
> PLEASE HELP ME!!!!!!!!!!!!!!!!!|||Here is my original post, which I was replying to in the one you saw...but
maybe you couldn't see the original...
My problem is that when I embed an image into my reports, it looks ok
in Visual Studio, but when I export to .pdf, it is blocky and distorted. My
graphics guy has put the image into ten different formats with different
resolutions, but they all render the same way.
What is the Microsoft recommeded format and resolution for image rendering
to .pdf? He designed the image and can put it in whatever format I need, I
just don't know what to tell him. I found something on Image Device
Information Settings, that lists 96 dpi as the best, but we tried that with
the same results. It also said something about the tif format, but when I
tried to import the .tif file, .tif was not listed as an image format in the
wizard.
And yes, I have upgraded to SP1.
Thanks so much for your help!
Lisa
"Bruce L-C [MVP]" wrote:
> OK, so I read this to see if I can help. I don't have a clue what your
> problem is. Either repost with the problem to this thread or better yet,
> repost with a good description in the subject. Depending on the subject
> people with different expertise will jump in.
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Lisa" <Lisa@.discussions.microsoft.com> wrote in message
> news:9FB5F4A6-75FD-4DAD-9B73-B7F63CCE92F1@.microsoft.com...
> > I have posted this same message 7 times and still have not received an
> > answer. I am beginning to think that I am either invisible, or I have
> found
> > a limitation of Reporting Services. If that is the case, I would love for
> > someone to tell me so. I have spent more hours than I can count trying to
> > resolve this...
> >
> > PLEASE HELP ME!!!!!!!!!!!!!!!!!
>
>
Monday, March 19, 2012
Is this a bug in SQL 2000/2005?
transaction is rolled back ...
Should be like this, or it should nicely give the error number and let me
decide what to do?
This is very usefull when using EXECUTE() or sp_executesql().
Here is hwo you can reproduce the problem:
CREATE TABLE xTest (IDCol int, xText varchar(100))
INSERT INTO xTest(IDCol,xText1) VALUES (1,'aaa')
SELECT @.@.ERROR --should be 207
DROP TABLE xTestSome errors terminates the batch. See the error handling articles at www.sommarsko
g.se for details.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Florin Lazar" <FlorinLazar@.discussions.microsoft.com> wrote in message
news:A436FCDD-B959-42C6-965F-4D40B47F6434@.microsoft.com...
> Running the script below the error number is not generated and the
> transaction is rolled back ...
> Should be like this, or it should nicely give the error number and let me
> decide what to do?
> This is very usefull when using EXECUTE() or sp_executesql().
> Here is hwo you can reproduce the problem:
> CREATE TABLE xTest (IDCol int, xText varchar(100))
> INSERT INTO xTest(IDCol,xText1) VALUES (1,'aaa')
> SELECT @.@.ERROR --should be 207
> DROP TABLE xTest|||The batch does not compile, and thus it is never executed. So the line
"SELECT @.@.ERROR" will never be executed.
Gert-Jan
Florin Lazar wrote:
> Running the script below the error number is not generated and the
> transaction is rolled back ...
> Should be like this, or it should nicely give the error number and let me
> decide what to do?
> This is very usefull when using EXECUTE() or sp_executesql().
> Here is hwo you can reproduce the problem:
> CREATE TABLE xTest (IDCol int, xText varchar(100))
> INSERT INTO xTest(IDCol,xText1) VALUES (1,'aaa')
> SELECT @.@.ERROR --should be 207
> DROP TABLE xTest
Is this a bug in SQL 2000/2005?
transaction is rolled back ...
Should be like this, or it should nicely give the error number and let me
decide what to do?
This is very usefull when using EXECUTE() or sp_executesql().
Here is hwo you can reproduce the problem:
CREATE TABLE xTest (IDCol int, xText varchar(100))
INSERT INTO xTest(IDCol,xText1) VALUES (1,'aaa')
SELECT @.@.ERROR --should be 207
DROP TABLE xTest
Some errors terminates the batch. See the error handling articles at www.sommarskog.se for details.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Florin Lazar" <FlorinLazar@.discussions.microsoft.com> wrote in message
news:A436FCDD-B959-42C6-965F-4D40B47F6434@.microsoft.com...
> Running the script below the error number is not generated and the
> transaction is rolled back ...
> Should be like this, or it should nicely give the error number and let me
> decide what to do?
> This is very usefull when using EXECUTE() or sp_executesql().
> Here is hwo you can reproduce the problem:
> CREATE TABLE xTest (IDCol int, xText varchar(100))
> INSERT INTO xTest(IDCol,xText1) VALUES (1,'aaa')
> SELECT @.@.ERROR --should be 207
> DROP TABLE xTest
|||The batch does not compile, and thus it is never executed. So the line
"SELECT @.@.ERROR" will never be executed.
Gert-Jan
Florin Lazar wrote:
> Running the script below the error number is not generated and the
> transaction is rolled back ...
> Should be like this, or it should nicely give the error number and let me
> decide what to do?
> This is very usefull when using EXECUTE() or sp_executesql().
> Here is hwo you can reproduce the problem:
> CREATE TABLE xTest (IDCol int, xText varchar(100))
> INSERT INTO xTest(IDCol,xText1) VALUES (1,'aaa')
> SELECT @.@.ERROR --should be 207
> DROP TABLE xTest
Is this a bug in SQL 2000/2005?
transaction is rolled back ...
Should be like this, or it should nicely give the error number and let me
decide what to do?
This is very usefull when using EXECUTE() or sp_executesql().
Here is hwo you can reproduce the problem:
CREATE TABLE xTest (IDCol int, xText varchar(100))
INSERT INTO xTest(IDCol,xText1) VALUES (1,'aaa')
SELECT @.@.ERROR --should be 207
DROP TABLE xTestSome errors terminates the batch. See the error handling articles at www.sommarskog.se for details.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Florin Lazar" <FlorinLazar@.discussions.microsoft.com> wrote in message
news:A436FCDD-B959-42C6-965F-4D40B47F6434@.microsoft.com...
> Running the script below the error number is not generated and the
> transaction is rolled back ...
> Should be like this, or it should nicely give the error number and let me
> decide what to do?
> This is very usefull when using EXECUTE() or sp_executesql().
> Here is hwo you can reproduce the problem:
> CREATE TABLE xTest (IDCol int, xText varchar(100))
> INSERT INTO xTest(IDCol,xText1) VALUES (1,'aaa')
> SELECT @.@.ERROR --should be 207
> DROP TABLE xTest|||The batch does not compile, and thus it is never executed. So the line
"SELECT @.@.ERROR" will never be executed.
Gert-Jan
Florin Lazar wrote:
> Running the script below the error number is not generated and the
> transaction is rolled back ...
> Should be like this, or it should nicely give the error number and let me
> decide what to do?
> This is very usefull when using EXECUTE() or sp_executesql().
> Here is hwo you can reproduce the problem:
> CREATE TABLE xTest (IDCol int, xText varchar(100))
> INSERT INTO xTest(IDCol,xText1) VALUES (1,'aaa')
> SELECT @.@.ERROR --should be 207
> DROP TABLE xTest
Friday, March 9, 2012
Is there any way to track LOGIN ID which stops the SQL Service?
Hello All,
I am running SQL Server 2000 Standard Edition on Windows 2000 Server... I believe Windows 2000 does not have an audit enabled by default like the one in Windows 2003 servers to capture the login ID's that is stopping the SQL Server...
I am getting N/A in user column in SQL Service Stop Event in Application Log... We need to track this event badly.. Is there any way to do this? Your Help on this is highly appreciated...
--Rajesh
What about
http://techrepublic.com.com/5208-11184-0.html?forumID=39&threadID=170891
HTH, Jens K. Suessmeyer.
http://www.sqlserver2005.de
Wednesday, March 7, 2012
is there any way to get isqlw running under sql 2005 install
I regulary would have 4 or 5 separate sessions of isqlw running.. and it is much less overhead than running multiple sql server managment sessions and also much better in the way the windows tile... the new interface sucks in my opinion ..
thanks in advance
ok to answer my own question
get the following files off of an old 2000 install and put them somewhere in your path
I put them in the winnt directory
1/30/2006 10:38a 352,828 isqlw.exe
1/30/2006 10:38a 401,984 sqlqry.dll
1/30/2006 10:38a 279,104 pfutil80.dll
1/30/2006 10:39a 414,272 pfclnt80.dll
1/30/2006 11:11a <DIR> ..
now put the following file in the directory as shown also from an existing 2000 install
Directory of E:\Program Files\Microsoft SQL Server\90\Tools\Binn\Resources\1033
10/14/2005 03:44a 16,088 PFCLNT90.rll
1 File(s) 16,088 bytes
(all should be ok as you are not replacing any files in 2005 these are all addition files pulled over from 2000)
now isqlw works on my machine...
if you want to get it working from external tools in the sql server managemtn window you also have to add the following rll's in
Directory of E:\WINNT\Resources\1033
01/30/2006 11:12a 28,672 pfclnt80.rll
01/30/2006 11:23a 147,456 pfutil80.rll
01/30/2006 11:23a 184,320 sqlqry.rll
01/30/2006 11:24a <DIR> ..
01/30/2006 11:24a <DIR> .
01/30/2006 11:24a 245,760 isqlw.rll
4 File(s) 606,208 bytes
still cannot figure out how to get it to pass the database and u/pw in so you don't have to enter those when launching isqlw from the sql server management studio there seems to be no option for thse parameters
Friday, February 24, 2012
Is there any simple or quick guides let me to study how to create reports, deloy and runni
deloy and running the reports services?Hi,
Best quide is Microsoft online help for reporting services. If you want a
quick guide best bet is "HOW TO's" in the online help. You can quickly learn
how to create, deploy and Manage.
Regards
Amarnath
"ABC" wrote:
> Is there any simple or quick guides let me to study how to create reports,
> deloy and running the reports services?
>
>
Is there any reported issues running SQL Server 2005 Enterprise 64bit Management Studio version?
At the moment I'm trying to find out if there are any reported issues with Management Studio running on a SQL Server 2005 Ent 64bit edition?
Can anyone help?
My reason for asking is really one of curiosity, one of my colleagues has said it doesn't work, I'm trying to research this claim as I do not have access to a 64 bit machine to try it on but would like to move my future project in this direction hence why I'm asking.
Many Thanks.
Dave
Hi Dave,
Technically, there aren't different versions of Management Studio, only 1 (client tools are distributed with all editions, except Express)...though, there are different platform builds (i.e. IA64,x64,x86)...
Management studio with Sql2k5 is fully 64bit compatible, and will run natively on an IA64 or x64 box...
HTH
|||There are issuses with SQL Server 2005 64 bit and the Management Studio that are explained here http://support.microsoft.com/default.aspx/kb/906892.The Management Studio will run on the 64 bit platform but it will be slow and tend to freeze, the reason being it's still a 32 bit application. MS solution is to run the Management Studio on a 32 bit computer and connect to the SQL server that way. Why they don't have a 64 bit version of the Management Studio is anyone's guess.
RLB
Is there any reported issues running SQL Server 2005 Enterprise 64bit Management Studio version?
At the moment I'm trying to find out if there are any reported issues with Management Studio running on a SQL Server 2005 Ent 64bit edition?
Can anyone help?
My reason for asking is really one of curiosity, one of my colleagues has said it doesn't work, I'm trying to research this claim as I do not have access to a 64 bit machine to try it on but would like to move my future project in this direction hence why I'm asking.
Many Thanks.
Dave
Hi Dave,
Technically, there aren't different versions of Management Studio, only 1 (client tools are distributed with all editions, except Express)...though, there are different platform builds (i.e. IA64,x64,x86)...
Management studio with Sql2k5 is fully 64bit compatible, and will run natively on an IA64 or x64 box...
HTH
|||There are issuses with SQL Server 2005 64 bit and the Management Studio that are explained here http://support.microsoft.com/default.aspx/kb/906892.The Management Studio will run on the 64 bit platform but it will be slow and tend to freeze, the reason being it's still a 32 bit application. MS solution is to run the Management Studio on a 32 bit computer and connect to the SQL server that way. Why they don't have a 64 bit version of the Management Studio is anyone's guess.
RLB
Monday, February 20, 2012
Is there any disadvantage to running a SQL Server in Windows Authentication mode only?
Is there any disadvantage to running a SQL Server in Windows Authentication
mode only?
--
SpinI actually prefer to run in Windows Only mode. I do switch down to mixed mode when I have to, though
(typically some darn app that doesn't support Windows login or Windows login cannot be used because
of firewall/domain reasons).
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Spin" <Spin@.invalid.com> wrote in message news:63v8k4F28datlU1@.mid.individual.net...
> Gurus,
> Is there any disadvantage to running a SQL Server in Windows Authentication mode only?
> --
> Spin
>|||"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:9DCDECEE-E65A-4244-B5D2-F3EBA33B12DE@.microsoft.com...
>I actually prefer to run in Windows Only mode. I do switch down to mixed
>mode when I have to, though (typically some darn app that doesn't support
>Windows login or Windows login cannot be used because of firewall/domain
>reasons).
Thanks TIbor. What makes you prefer to run in Windows Only mode?|||> Thanks TIbor. What makes you prefer to run in Windows Only mode?
One more set of accounts that cannot be used. I.e., even though SQL logins can exist when SQL Server
run in Windows Only mode, nobody can login using a SQL Server login. And since we've only recently
have the ability to specify password aging, complexity rules etc for SQL logins, I prefer if it
isn't possible to login at all using SQL logins - if the surroindings allow this.
Just imagne the nimber if times I've heard, when consuting "Yo! You have the password to sa?". ;-)
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Spin" <Spin@.invalid.com> wrote in message news:644iknF29vlr1U1@.mid.individual.net...
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in message
> news:9DCDECEE-E65A-4244-B5D2-F3EBA33B12DE@.microsoft.com...
>>I actually prefer to run in Windows Only mode. I do switch down to mixed mode when I have to,
>>though (typically some darn app that doesn't support Windows login or Windows login cannot be used
>>because of firewall/domain reasons).
> Thanks TIbor. What makes you prefer to run in Windows Only mode?|||Hello,
"Tibor Karaszi" wrote:
> I actually prefer to run in Windows Only mode. I do switch down to mixed mode when I have to, though
But what in bellow situation:
Two active directory domains CompanyA.local (NetworkA) and CompanyB.local
(NetworkB).
NetworkA and NetworkB connected by VPN.
NetworkA:
srvsql.CompanyA.local
NetworkB:
srvsql.CompanyB.local
All ports open between srvsql.CompanyA.local and srvsql.CompanyB.local, no
firewall.
I have DOMAIN ADMIN account on each domain CompanyA\me, CompanyB\me,
unfortunately I can't connect to srvsql.CompanyB.local from
srvsql.CompanyA.local by WindowsAuthentication, I'm using SQl Logins and this
works.
How use WindowsAuthentication in this situation, where is the problem?
Regards,
anxcomp|||I can think of one, because I have been limited by it before: consultants
cannot connect to the database with their laptop's, which in my case has 10+
years of acquired tools, scripts and knowledge stored on it. And no, I will
not ever connect my laptop up to another's domain.
--
Kevin G. Boles
Indicium Resources, Inc.
SQL Server MVP
kgboles a earthlink dt net
"Spin" <Spin@.invalid.com> wrote in message
news:63v8k4F28datlU1@.mid.individual.net...
> Gurus,
> Is there any disadvantage to running a SQL Server in Windows
> Authentication mode only?
> --
> Spin
>|||Good point, Kevin! I also recognize me so very more productive when I can work from my own machine
against customer instances.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"TheSQLGuru" <kgboles@.earthlink.net> wrote in message news:13u0cqrefkor83@.corp.supernews.com...
>I can think of one, because I have been limited by it before: consultants cannot connect to the
>database with their laptop's, which in my case has 10+ years of acquired tools, scripts and
>knowledge stored on it. And no, I will not ever connect my laptop up to another's domain.
> --
> Kevin G. Boles
> Indicium Resources, Inc.
> SQL Server MVP
> kgboles a earthlink dt net
>
> "Spin" <Spin@.invalid.com> wrote in message news:63v8k4F28datlU1@.mid.individual.net...
>> Gurus,
>> Is there any disadvantage to running a SQL Server in Windows Authentication mode only?
>> --
>> Spin
>
Is there any disadvantage to running a SQL Server in Windows Authentication mode only?
Is there any disadvantage to running a SQL Server in Windows Authentication
mode only?
Spin
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:9DCDECEE-E65A-4244-B5D2-F3EBA33B12DE@.microsoft.com...
>I actually prefer to run in Windows Only mode. I do switch down to mixed
>mode when I have to, though (typically some darn app that doesn't support
>Windows login or Windows login cannot be used because of firewall/domain
>reasons).
Thanks TIbor. What makes you prefer to run in Windows Only mode?
|||Hello,
"Tibor Karaszi" wrote:
> I actually prefer to run in Windows Only mode. I do switch down to mixed mode when I have to, though
But what in bellow situation:
Two active directory domains CompanyA.local (NetworkA) and CompanyB.local
(NetworkB).
NetworkA and NetworkB connected by VPN.
NetworkA:
srvsql.CompanyA.local
NetworkB:
srvsql.CompanyB.local
All ports open between srvsql.CompanyA.local and srvsql.CompanyB.local, no
firewall.
I have DOMAIN ADMIN account on each domain CompanyA\me, CompanyB\me,
unfortunately I can't connect to srvsql.CompanyB.local from
srvsql.CompanyA.local by WindowsAuthentication, I'm using SQl Logins and this
works.
How use WindowsAuthentication in this situation, where is the problem?
Regards,
anxcomp
|||I can think of one, because I have been limited by it before: consultants
cannot connect to the database with their laptop's, which in my case has 10+
years of acquired tools, scripts and knowledge stored on it. And no, I will
not ever connect my laptop up to another's domain.
Kevin G. Boles
Indicium Resources, Inc.
SQL Server MVP
kgboles a earthlink dt net
"Spin" <Spin@.invalid.com> wrote in message
news:63v8k4F28datlU1@.mid.individual.net...
> Gurus,
> Is there any disadvantage to running a SQL Server in Windows
> Authentication mode only?
> --
> Spin
>
Is there an issue running SQL 2000 on a 2003 R2 64 bit operating system?
file is valid but not for this machine type?
Are these just not compatible?I had SQL 2000 running under Windows 2003 R3 and it was fine. You have to force the setup NOT to check for machine type:
<cd drive/network drive>:\setup.exe /force
Before you install, run setup.exe /? and get the command line options and make sure that FORCE and DO NOT CHECK MACHINE TYPE options are available and used.
Also, check out the following link which gives information on SQL 2000 and the SP level needed to run under x64: http://www.sqlmanager.net/en/news/sql/mssql/683
Mark|||Here is another link from Microsoft concerning x64 support for SQL 2003 in SP4: http://www.microsoft.com/sql/prodinfo/previousversions/sp4.mspx
Mark
Is there an equivalent syntax to TOP IN SQL?
I have a database with the following fields:
IDNumber: sequential running from 1 to approx 50000
SURNAME: Surname
FNAME: Forename.
I want to return the last 100 IDNUmbers and return the surname and fname associated with the IDNumbers.
When I try TOP it gives me IDNumbers 1 to 100, is there an equilvant for the bottom 100 numbers.
Please help if you can.
Thanks
ScottReturn the top 100, but just order by IDNumbers DESC|||Thank you so much, I would never have worked that out.
And DESC stands for descending !? Fab!
Thanks again, I owe you a beer.
Scott