Showing posts with label sql2000. Show all posts
Showing posts with label sql2000. Show all posts

Sunday, March 11, 2012

Bad error message

I just spent 4 hours of frustration, trying to debug a problem with SQL
2000. It was self-inflicted, as it turned out, but I could have fixed
the problem in 5 minutes instead of 4 hours if the @.#%@.#$% error
message:
"String or binary data would be truncated"
would give some CLUES! How about a field name, or even the data that
it's trying to put into the mystery field in some mystery table? And
why not tell me whether it's actually a string or binary data, not
lumping them both together. (I envision a mythical error message that
says "You have caused a numeric overflow, or underflow, or divide by
zero, or there's a key violation, or a trigger is not defined, or the
statement syntax is wrong." Which might be a perfectly correct but not-
helpful error message.)
I was convinced that I was trying to put a single character 'C' into a
field defined as Char(2), and I was tearing my hair out. Aaargh.
The actual Update statement was buried in the guts of a DTS transform,
but this isn't a DTS complaint, it's a SQL error message complaint.
When you try to put a null into a field that can't accept nulls, at
least the error message gives you the name of the field that you're
trying to update. That is infinitely more helpful than this stupid
truncation message. (And I don't want to turn warnings off; in this
case, I was trying to put the wrong value into a different field, so the
error was important -- but I wasn't being pointed to the right place.)
A little help from the error message would be nice.
Hmmm. I wonder if the new upcoming SQL does a better job. I'll have to
ask someone over there.
David Walker
YOu sure have to give us some mistery SQL Query or magic DDL to understand
whats going on, seems that one column is truncated.
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
"DWalker" <none@.none.com> schrieb im Newsbeitrag
news:OUBF6SnSFHA.3356@.TK2MSFTNGP12.phx.gbl...
>I just spent 4 hours of frustration, trying to debug a problem with SQL
> 2000. It was self-inflicted, as it turned out, but I could have fixed
> the problem in 5 minutes instead of 4 hours if the @.#%@.#$% error
> message:
> "String or binary data would be truncated"
> would give some CLUES! How about a field name, or even the data that
> it's trying to put into the mystery field in some mystery table? And
> why not tell me whether it's actually a string or binary data, not
> lumping them both together. (I envision a mythical error message that
> says "You have caused a numeric overflow, or underflow, or divide by
> zero, or there's a key violation, or a trigger is not defined, or the
> statement syntax is wrong." Which might be a perfectly correct but not-
> helpful error message.)
> I was convinced that I was trying to put a single character 'C' into a
> field defined as Char(2), and I was tearing my hair out. Aaargh.
> The actual Update statement was buried in the guts of a DTS transform,
> but this isn't a DTS complaint, it's a SQL error message complaint.
> When you try to put a null into a field that can't accept nulls, at
> least the error message gives you the name of the field that you're
> trying to update. That is infinitely more helpful than this stupid
> truncation message. (And I don't want to turn warnings off; in this
> case, I was trying to put the wrong value into a different field, so the
> error was important -- but I wasn't being pointed to the right place.)
> A little help from the error message would be nice.
> Hmmm. I wonder if the new upcoming SQL does a better job. I'll have to
> ask someone over there.
>
> David Walker
|||David,
I agree that error less-informative messages as a pain to work with. Did you consider posting to
sqlwish@.microsoft.com on this case?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
|||I figured out my problem, the complaint is that the error message is not
very helpful. I was not looking for more assistance, I was just
complaining about the error message... But thanks!
David
"Jens Smeyer" <Jens@.Remove_this_For_Contacting.sqlserver2005.de> wrote
in news:#QWpPWnSFHA.1312@.TK2MSFTNGP14.phx.gbl:

> YOu sure have to give us some mistery SQL Query or magic DDL to
> understand whats going on, seems that one column is truncated.
> HTH, Jens Suessmeyer.
> --
> http://www.sqlserver2005.de
> --
> "DWalker" <none@.none.com> schrieb im Newsbeitrag
> news:OUBF6SnSFHA.3356@.TK2MSFTNGP12.phx.gbl...
>
|||"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote
in news:uzUDsVnSFHA.3712@.TK2MSFTNGP10.phx.gbl:

> David,
> I agree that error less-informative messages as a pain to work with.
> Did you consider posting to sqlwish@.microsoft.com on this case?
>
I will do that, thanks.
David
|||ok. Gotit. :-)
"DWalker" <none@.none.com> schrieb im Newsbeitrag
news:O763lynSFHA.3176@.TK2MSFTNGP09.phx.gbl...
>I figured out my problem, the complaint is that the error message is not
> very helpful. I was not looking for more assistance, I was just
> complaining about the error message... But thanks!
> David
>
> "Jens Smeyer" <Jens@.Remove_this_For_Contacting.sqlserver2005.de> wrote
> in news:#QWpPWnSFHA.1312@.TK2MSFTNGP14.phx.gbl:
>

Bad error message

I just spent 4 hours of frustration, trying to debug a problem with SQL
2000. It was self-inflicted, as it turned out, but I could have fixed
the problem in 5 minutes instead of 4 hours if the @.#%@.#$% error
message:
"String or binary data would be truncated"
would give some CLUES! How about a field name, or even the data that
it's trying to put into the mystery field in some mystery table? And
why not tell me whether it's actually a string or binary data, not
lumping them both together. (I envision a mythical error message that
says "You have caused a numeric overflow, or underflow, or divide by
zero, or there's a key violation, or a trigger is not defined, or the
statement syntax is wrong." Which might be a perfectly correct but not-
helpful error message.)
I was convinced that I was trying to put a single character 'C' into a
field defined as Char(2), and I was tearing my hair out. Aaargh.
The actual Update statement was buried in the guts of a DTS transform,
but this isn't a DTS complaint, it's a SQL error message complaint.
When you try to put a null into a field that can't accept nulls, at
least the error message gives you the name of the field that you're
trying to update. That is infinitely more helpful than this stupid
truncation message. (And I don't want to turn warnings off; in this
case, I was trying to put the wrong value into a different field, so the
error was important -- but I wasn't being pointed to the right place.)
A little help from the error message would be nice.
Hmmm. I wonder if the new upcoming SQL does a better job. I'll have to
ask someone over there.
David WalkerYOu sure have to give us some mistery SQL Query or magic DDL to understand
whats going on, seems that one column is truncated.
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
--
"DWalker" <none@.none.com> schrieb im Newsbeitrag
news:OUBF6SnSFHA.3356@.TK2MSFTNGP12.phx.gbl...
>I just spent 4 hours of frustration, trying to debug a problem with SQL
> 2000. It was self-inflicted, as it turned out, but I could have fixed
> the problem in 5 minutes instead of 4 hours if the @.#%@.#$% error
> message:
> "String or binary data would be truncated"
> would give some CLUES! How about a field name, or even the data that
> it's trying to put into the mystery field in some mystery table? And
> why not tell me whether it's actually a string or binary data, not
> lumping them both together. (I envision a mythical error message that
> says "You have caused a numeric overflow, or underflow, or divide by
> zero, or there's a key violation, or a trigger is not defined, or the
> statement syntax is wrong." Which might be a perfectly correct but not-
> helpful error message.)
> I was convinced that I was trying to put a single character 'C' into a
> field defined as Char(2), and I was tearing my hair out. Aaargh.
> The actual Update statement was buried in the guts of a DTS transform,
> but this isn't a DTS complaint, it's a SQL error message complaint.
> When you try to put a null into a field that can't accept nulls, at
> least the error message gives you the name of the field that you're
> trying to update. That is infinitely more helpful than this stupid
> truncation message. (And I don't want to turn warnings off; in this
> case, I was trying to put the wrong value into a different field, so the
> error was important -- but I wasn't being pointed to the right place.)
> A little help from the error message would be nice.
> Hmmm. I wonder if the new upcoming SQL does a better job. I'll have to
> ask someone over there.
>
> David Walker|||David,
I agree that error less-informative messages as a pain to work with. Did you
consider posting to
sqlwish@.microsoft.com on this case?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/|||I figured out my problem, the complaint is that the error message is not
very helpful. I was not looking for more assistance, I was just
complaining about the error message... But thanks!
David
"Jens Smeyer" <Jens@.Remove_this_For_Contacting.sqlserver2005.de> wrote
in news:#QWpPWnSFHA.1312@.TK2MSFTNGP14.phx.gbl:

> YOu sure have to give us some mistery SQL Query or magic DDL to
> understand whats going on, seems that one column is truncated.
> HTH, Jens Suessmeyer.
> --
> http://www.sqlserver2005.de
> --
> "DWalker" <none@.none.com> schrieb im Newsbeitrag
> news:OUBF6SnSFHA.3356@.TK2MSFTNGP12.phx.gbl...
>|||"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote
in news:uzUDsVnSFHA.3712@.TK2MSFTNGP10.phx.gbl:

> David,
> I agree that error less-informative messages as a pain to work with.
> Did you consider posting to sqlwish@.microsoft.com on this case?
>
I will do that, thanks.
David|||ok. Gotit. :-)
"DWalker" <none@.none.com> schrieb im Newsbeitrag
news:O763lynSFHA.3176@.TK2MSFTNGP09.phx.gbl...
>I figured out my problem, the complaint is that the error message is not
> very helpful. I was not looking for more assistance, I was just
> complaining about the error message... But thanks!
> David
>
> "Jens Smeyer" <Jens@.Remove_this_For_Contacting.sqlserver2005.de> wrote
> in news:#QWpPWnSFHA.1312@.TK2MSFTNGP14.phx.gbl:
>
>

Backward Coompatibility

We have two different machines in different locations running SQL2000. One was upgraded to SQL2005. The problem is we can't upgrade the other at the moment cause it is running SBS2003 (requires alot more planning), But we would like to get information from the computer running SQL2005. Is there a patch that can be obtained so that we can open the database created using SQL2005 in SQL2000? We desperately need the database and upgrading to SQL2005 with SBS2003 is not straight forward.
Database files or backups created in SQL Server 2005 cannot be opened using SQL Server 2000. YOu sure can connect to the SQL Server 2005 server and get data but you are not able to use the physical files for restore or attaching.

Jens K. Suessmeyer.

http://www.sqlserver2005.de
|||If you have the Sql2000 backup in tape \ disk before upgrading. Use the backup and restore the db in Sql2000, Use Import\Export to move all the data's from Sql2005 to Sql2000 for that db. Since you don't have any option for using Sql2005 physical or backup files in sql2000.

Thursday, February 16, 2012

Backup with SQL2000

With SQL 2000 I am aware that a transaction log backup cannot be done while
a
transaction log backup of the same database is already in progress. Instead
of starting a transaction log backup and having it fail, is there some statu
s
to check somewhere (say in the SQL catalog) that indicates that a backup is
in progress?
Thank-you!"Howard" wrote:

> With SQL 2000 I am aware that a transaction log backup cannot be done whil
e a
> transaction log backup of the same database is already in progress. Instea
d
> of starting a transaction log backup and having it fail, is there some sta
tus
> to check somewhere (say in the SQL catalog) that indicates that a backup i
s
> in progress?
> Thank-you!
Oops, I didn't state this quite right. I meant to say that the transaction
log backup would fail if their were a FULL backup in progress. So again, is
there anyway to detect that the full backup is currently in progress. Thanks
again.|||Howard,
I use this script to check if a job is executing, and if it is to stop it.
You could adapt it for your own purposes:
http://www.replicationanswers.com/D...RunningJobs.txt
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)|||I already know how to stop a job. What I need to know is whether a backup fo
r
database X is currently in progress. E.g., I know if a restore is in progres
s
because loading state would be set in the 'status' field of sysdatabases. I
s
there any way to know that a backup is in progress? (Again, I want to know
this because I will not start a transaction log backup if there is a full in
progress).
Thanks again.
"Paul Ibison" wrote:

> Howard,
> I use this script to check if a job is executing, and if it is to stop it.
> You could adapt it for your own purposes:
> http://www.replicationanswers.com/D...RunningJobs.txt
> Cheers,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
> (recommended sql server 2000 replication book:
> http://www.nwsu.com/0974973602p.html)
>
>|||Howard,
this script doesn't just stop a job - the stored procedure call checks to
see if the job is currently executing. As long as your database backup is
done in a job and you know the job name it should be ok.
Paul Ibison|||Paul,
Unfortunately, I wouldn't know the job name of the executing backup or the
jobid. I just need to know that particular database is currently being backe
d
up.
Thanks.
"Paul Ibison" wrote:

> Howard,
> this script doesn't just stop a job - the stored procedure call checks to
> see if the job is currently executing. As long as your database backup is
> done in a job and you know the job name it should be ok.
> Paul Ibison
>
>|||Howard,
please try this:
select cmd, db_name(dbid) as DatabaseName from sysprocesses
where cmd = 'Backup Database' and db_name(dbid) = 'yourdatabasename'
Cheers,
Paul Ibison, SQL Server MVP|||Beautiful!
Thank-you, Howard
"Paul Ibison" wrote:

> Howard,
> please try this:
> select cmd, db_name(dbid) as DatabaseName from sysprocesses
> where cmd = 'Backup Database' and db_name(dbid) = 'yourdatabasename'
> Cheers,
> Paul Ibison, SQL Server MVP
>
>

Backup with SQL2000

With SQL 2000 I am aware that a transaction log backup cannot be done while a
transaction log backup of the same database is already in progress. Instead
of starting a transaction log backup and having it fail, is there some status
to check somewhere (say in the SQL catalog) that indicates that a backup is
in progress?
Thank-you!"Howard" wrote:
> With SQL 2000 I am aware that a transaction log backup cannot be done while a
> transaction log backup of the same database is already in progress. Instead
> of starting a transaction log backup and having it fail, is there some status
> to check somewhere (say in the SQL catalog) that indicates that a backup is
> in progress?
> Thank-you!
Oops, I didn't state this quite right. I meant to say that the transaction
log backup would fail if their were a FULL backup in progress. So again, is
there anyway to detect that the full backup is currently in progress. Thanks
again.|||Howard,
I use this script to check if a job is executing, and if it is to stop it.
You could adapt it for your own purposes:
http://www.replicationanswers.com/Downloads/KillRunningJobs.txt
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)|||I already know how to stop a job. What I need to know is whether a backup for
database X is currently in progress. E.g., I know if a restore is in progress
because loading state would be set in the 'status' field of sysdatabases. Is
there any way to know that a backup is in progress? (Again, I want to know
this because I will not start a transaction log backup if there is a full in
progress).
Thanks again.
"Paul Ibison" wrote:
> Howard,
> I use this script to check if a job is executing, and if it is to stop it.
> You could adapt it for your own purposes:
> http://www.replicationanswers.com/Downloads/KillRunningJobs.txt
> Cheers,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
> (recommended sql server 2000 replication book:
> http://www.nwsu.com/0974973602p.html)
>
>|||Howard,
this script doesn't just stop a job - the stored procedure call checks to
see if the job is currently executing. As long as your database backup is
done in a job and you know the job name it should be ok.
Paul Ibison|||Paul,
Unfortunately, I wouldn't know the job name of the executing backup or the
jobid. I just need to know that particular database is currently being backed
up.
Thanks.
"Paul Ibison" wrote:
> Howard,
> this script doesn't just stop a job - the stored procedure call checks to
> see if the job is currently executing. As long as your database backup is
> done in a job and you know the job name it should be ok.
> Paul Ibison
>
>|||Howard,
please try this:
select cmd, db_name(dbid) as DatabaseName from sysprocesses
where cmd = 'Backup Database' and db_name(dbid) = 'yourdatabasename'
Cheers,
Paul Ibison, SQL Server MVP|||Beautiful!
Thank-you, Howard
"Paul Ibison" wrote:
> Howard,
> please try this:
> select cmd, db_name(dbid) as DatabaseName from sysprocesses
> where cmd = 'Backup Database' and db_name(dbid) = 'yourdatabasename'
> Cheers,
> Paul Ibison, SQL Server MVP
>
>

Monday, February 13, 2012

Backup with SQL2000

With SQL 2000 I am aware that a transaction log backup cannot be done while a
transaction log backup of the same database is already in progress. Instead
of starting a transaction log backup and having it fail, is there some status
to check somewhere (say in the SQL catalog) that indicates that a backup is
in progress?
Thank-you!
"Howard" wrote:

> With SQL 2000 I am aware that a transaction log backup cannot be done while a
> transaction log backup of the same database is already in progress. Instead
> of starting a transaction log backup and having it fail, is there some status
> to check somewhere (say in the SQL catalog) that indicates that a backup is
> in progress?
> Thank-you!
Oops, I didn't state this quite right. I meant to say that the transaction
log backup would fail if their were a FULL backup in progress. So again, is
there anyway to detect that the full backup is currently in progress. Thanks
again.
|||Howard,
I use this script to check if a job is executing, and if it is to stop it.
You could adapt it for your own purposes:
http://www.replicationanswers.com/Do...unningJobs.txt
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
|||I already know how to stop a job. What I need to know is whether a backup for
database X is currently in progress. E.g., I know if a restore is in progress
because loading state would be set in the 'status' field of sysdatabases. Is
there any way to know that a backup is in progress? (Again, I want to know
this because I will not start a transaction log backup if there is a full in
progress).
Thanks again.
"Paul Ibison" wrote:

> Howard,
> I use this script to check if a job is executing, and if it is to stop it.
> You could adapt it for your own purposes:
> http://www.replicationanswers.com/Do...unningJobs.txt
> Cheers,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
> (recommended sql server 2000 replication book:
> http://www.nwsu.com/0974973602p.html)
>
>
|||Howard,
this script doesn't just stop a job - the stored procedure call checks to
see if the job is currently executing. As long as your database backup is
done in a job and you know the job name it should be ok.
Paul Ibison
|||Paul,
Unfortunately, I wouldn't know the job name of the executing backup or the
jobid. I just need to know that particular database is currently being backed
up.
Thanks.
"Paul Ibison" wrote:

> Howard,
> this script doesn't just stop a job - the stored procedure call checks to
> see if the job is currently executing. As long as your database backup is
> done in a job and you know the job name it should be ok.
> Paul Ibison
>
>
|||Howard,
please try this:
select cmd, db_name(dbid) as DatabaseName from sysprocesses
where cmd = 'Backup Database' and db_name(dbid) = 'yourdatabasename'
Cheers,
Paul Ibison, SQL Server MVP
|||Beautiful!
Thank-you, Howard
"Paul Ibison" wrote:

> Howard,
> please try this:
> select cmd, db_name(dbid) as DatabaseName from sysprocesses
> where cmd = 'Backup Database' and db_name(dbid) = 'yourdatabasename'
> Cheers,
> Paul Ibison, SQL Server MVP
>
>

Sunday, February 12, 2012

Backup to UNC or Share?

Hi All,

Hopefully a painless and quick question to answer:

Am backing up the SQL2000 database(s) using the maintenance plan's under management in the Enterprise Manager.
All is fine however, we are running out of diskspace as the database grows, which is causing the backup to fail if I don't manually remove the nights before.

I have selected to delete old backup files however these files are deleted after the new file is generated and due to the lack of space the new one is not being generated...so in effect the older ones never get a chance to be deleted.

So I was wanting to know if it is at all possible to backup to a UNC path or share . I have tried however it raises an error saying it is not a valid path.

Any assistance here is hugly appreciated (asides from getting new disk - as this isn't a short term option at the moment)...

Cheers all
TroyMake sure the SQL Server Startup account has permissions to access the share.|||To backup a database over network use:
backup database database_name
to DISK = '\\machineName\FolderName\filename.dat'
remember the login with which slq server service is logged on should have rights on this network path.

but taking backup across the network will slow down the whole process.
Instead taking the backup locally and then copying the files would be a better idea, you can have your custom procedures to copy the files and delete them etc.|||Righto - thanks guys. So what I am thinking is because I am logged onto the local machine, and not an administrator on the remote machine - this is the reason why the warning is being raised when setting it up.
I know the service has the permissions to that share - so in theory all should work well...

Well thanks for the confirmation - I will post back if it fails...hopefully you won't hear from me again :)

Cheers
Troy