Thursday, March 29, 2012
Database I/O error
1. I run a simple program that loops through all records
in a table. It works fine. (VBA Code in MS Access
accessing the SQL table via ADO if it matters.) I then
detach the database and copy the file, plus log file, to
Box 2.
I attach the database on Box 2 and run the same code to
loop through all records in the table. It fails with an
I/O error 998 (Invalid access to memory location)
detected during read at offset 0x00000b8f1e0000 in
file 'My DB File'
It does not always stop at the same point. When I check,
it shows EOF to be true - even though a counter shows I
am less than 30% of the way through the file.
Is there some form of utility to check the validity of
the DB? I ran a ShrinkDatabase on box 1. Then copied
the file to box 2 again. Same results.
Known differences:
- Hardware.
- OS. (Can that really matter?)
- Box1 = Win2003 Server.
- Box2 = Win XP Pro SP1
Both boxes are SQL 2000 Developers edition SP3.
I'm pulling my hair out on this. Any help is greatly
appreciated.
Thank you.
Sounds like a hardware issue, I have seen similar problems just prior to a
hard disk crapping out. Have you run any disk checking utilities against
the problem machine? Checked the event viewer for operating system and/or
Disk errors/warnings?
http://www.aspfaq.com/
(Reverse address to reply.)
"DB" <anonymous@.discussions.microsoft.com> wrote in message
news:180801c4d6fc$9cb189c0$a501280a@.phx.gbl...
> I am using SQL 2000 Dev edition. I create a DB on box
> 1. I run a simple program that loops through all records
> in a table. It works fine. (VBA Code in MS Access
> accessing the SQL table via ADO if it matters.) I then
> detach the database and copy the file, plus log file, to
> Box 2.
> I attach the database on Box 2 and run the same code to
> loop through all records in the table. It fails with an
> I/O error 998 (Invalid access to memory location)
> detected during read at offset 0x00000b8f1e0000 in
> file 'My DB File'
> It does not always stop at the same point. When I check,
> it shows EOF to be true - even though a counter shows I
> am less than 30% of the way through the file.
> Is there some form of utility to check the validity of
> the DB? I ran a ShrinkDatabase on box 1. Then copied
> the file to box 2 again. Same results.
> Known differences:
> - Hardware.
> - OS. (Can that really matter?)
> - Box1 = Win2003 Server.
> - Box2 = Win XP Pro SP1
> Both boxes are SQL 2000 Developers edition SP3.
> I'm pulling my hair out on this. Any help is greatly
> appreciated.
> Thank you.
>
sql
Database I/O error
1. I run a simple program that loops through all records
in a table. It works fine. (VBA Code in MS Access
accessing the SQL table via ADO if it matters.) I then
detach the database and copy the file, plus log file, to
Box 2.
I attach the database on Box 2 and run the same code to
loop through all records in the table. It fails with an
I/O error 998 (Invalid access to memory location)
detected during read at offset 0x00000b8f1e0000 in
file 'My DB File'
It does not always stop at the same point. When I check,
it shows EOF to be true - even though a counter shows I
am less than 30% of the way through the file.
Is there some form of utility to check the validity of
the DB? I ran a ShrinkDatabase on box 1. Then copied
the file to box 2 again. Same results.
Known differences:
- Hardware.
- OS. (Can that really matter?)
- Box1 = Win2003 Server.
- Box2 = Win XP Pro SP1
Both boxes are SQL 2000 Developers edition SP3.
I'm pulling my hair out on this. Any help is greatly
appreciated.
Thank you.Sounds like a hardware issue, I have seen similar problems just prior to a
hard disk crapping out. Have you run any disk checking utilities against
the problem machine? Checked the event viewer for operating system and/or
Disk errors/warnings?
--
http://www.aspfaq.com/
(Reverse address to reply.)
"DB" <anonymous@.discussions.microsoft.com> wrote in message
news:180801c4d6fc$9cb189c0$a501280a@.phx.gbl...
> I am using SQL 2000 Dev edition. I create a DB on box
> 1. I run a simple program that loops through all records
> in a table. It works fine. (VBA Code in MS Access
> accessing the SQL table via ADO if it matters.) I then
> detach the database and copy the file, plus log file, to
> Box 2.
> I attach the database on Box 2 and run the same code to
> loop through all records in the table. It fails with an
> I/O error 998 (Invalid access to memory location)
> detected during read at offset 0x00000b8f1e0000 in
> file 'My DB File'
> It does not always stop at the same point. When I check,
> it shows EOF to be true - even though a counter shows I
> am less than 30% of the way through the file.
> Is there some form of utility to check the validity of
> the DB? I ran a ShrinkDatabase on box 1. Then copied
> the file to box 2 again. Same results.
> Known differences:
> - Hardware.
> - OS. (Can that really matter?)
> - Box1 = Win2003 Server.
> - Box2 = Win XP Pro SP1
> Both boxes are SQL 2000 Developers edition SP3.
> I'm pulling my hair out on this. Any help is greatly
> appreciated.
> Thank you.
>
Tuesday, March 27, 2012
Database I/O error
1. I run a simple program that loops through all records
in a table. It works fine. (VBA Code in MS Access
accessing the SQL table via ADO if it matters.) I then
detach the database and copy the file, plus log file, to
Box 2.
I attach the database on Box 2 and run the same code to
loop through all records in the table. It fails with an
I/O error 998 (Invalid access to memory location)
detected during read at offset 0x00000b8f1e0000 in
file 'My DB File'
It does not always stop at the same point. When I check,
it shows EOF to be true - even though a counter shows I
am less than 30% of the way through the file.
Is there some form of utility to check the validity of
the DB? I ran a ShrinkDatabase on box 1. Then copied
the file to box 2 again. Same results.
Known differences:
- Hardware.
- OS. (Can that really matter?)
- Box1 = Win2003 Server.
- Box2 = Win XP Pro SP1
Both boxes are SQL 2000 Developers edition SP3.
I'm pulling my hair out on this. Any help is greatly
appreciated.
Thank you.Sounds like a hardware issue, I have seen similar problems just prior to a
hard disk crapping out. Have you run any disk checking utilities against
the problem machine? Checked the event viewer for operating system and/or
Disk errors/warnings?
http://www.aspfaq.com/
(Reverse address to reply.)
"DB" <anonymous@.discussions.microsoft.com> wrote in message
news:180801c4d6fc$9cb189c0$a501280a@.phx.gbl...
> I am using SQL 2000 Dev edition. I create a DB on box
> 1. I run a simple program that loops through all records
> in a table. It works fine. (VBA Code in MS Access
> accessing the SQL table via ADO if it matters.) I then
> detach the database and copy the file, plus log file, to
> Box 2.
> I attach the database on Box 2 and run the same code to
> loop through all records in the table. It fails with an
> I/O error 998 (Invalid access to memory location)
> detected during read at offset 0x00000b8f1e0000 in
> file 'My DB File'
> It does not always stop at the same point. When I check,
> it shows EOF to be true - even though a counter shows I
> am less than 30% of the way through the file.
> Is there some form of utility to check the validity of
> the DB? I ran a ShrinkDatabase on box 1. Then copied
> the file to box 2 again. Same results.
> Known differences:
> - Hardware.
> - OS. (Can that really matter?)
> - Box1 = Win2003 Server.
> - Box2 = Win XP Pro SP1
> Both boxes are SQL 2000 Developers edition SP3.
> I'm pulling my hair out on this. Any help is greatly
> appreciated.
> Thank you.
>
Monday, March 19, 2012
Database Documentation
of all the constraints, triggers, indexes, relationships, primary keys,
etc., on an entire database or table, so I don't ahve to go into each table
to find primary keys and indexes.? There are all kinds of tools for this. Any database modeling tool
(including Visio) will have a reverse engineering function to allow this.
You could also look at SQLScribe or something like that.
"Rock" <rockisland@.yahoo.com> wrote in message
news:OfD7$bstEHA.1272@.TK2MSFTNGP12.phx.gbl...
> Is there a way, or a program or utility out there, that would give me a
list
> of all the constraints, triggers, indexes, relationships, primary keys,
> etc., on an entire database or table, so I don't ahve to go into each
table
> to find primary keys and indexes.
>|||I guess I was looking for something free.
"Derrick Leggett" <derrickleggett@.yahoo.com> wrote in message
news:%23fcYsDutEHA.3016@.TK2MSFTNGP12.phx.gbl...
> ? There are all kinds of tools for this. Any database modeling tool
> (including Visio) will have a reverse engineering function to allow this.
> You could also look at SQLScribe or something like that.
>
> "Rock" <rockisland@.yahoo.com> wrote in message
> news:OfD7$bstEHA.1272@.TK2MSFTNGP12.phx.gbl...
> list
> table
>|||If very inexpensive will do...
Consider WT3 - one of the SQL Server Tools applications.
http://www.sqlservertools.us
One of the features is automated generation of database documentation.
"Rock" wrote:
> I guess I was looking for something free.
>
> "Derrick Leggett" <derrickleggett@.yahoo.com> wrote in message
> news:%23fcYsDutEHA.3016@.TK2MSFTNGP12.phx.gbl...
>
>
Database Documentation
of all the constraints, triggers, indexes, relationships, primary keys,
etc., on an entire database or table, so I don't ahve to go into each table
to find primary keys and indexes.? There are all kinds of tools for this. Any database modeling tool
(including Visio) will have a reverse engineering function to allow this.
You could also look at SQLScribe or something like that.
"Rock" <rockisland@.yahoo.com> wrote in message
news:OfD7$bstEHA.1272@.TK2MSFTNGP12.phx.gbl...
> Is there a way, or a program or utility out there, that would give me a
list
> of all the constraints, triggers, indexes, relationships, primary keys,
> etc., on an entire database or table, so I don't ahve to go into each
table
> to find primary keys and indexes.
>|||I guess I was looking for something free.
"Derrick Leggett" <derrickleggett@.yahoo.com> wrote in message
news:%23fcYsDutEHA.3016@.TK2MSFTNGP12.phx.gbl...
> ? There are all kinds of tools for this. Any database modeling tool
> (including Visio) will have a reverse engineering function to allow this.
> You could also look at SQLScribe or something like that.
>
> "Rock" <rockisland@.yahoo.com> wrote in message
> news:OfD7$bstEHA.1272@.TK2MSFTNGP12.phx.gbl...
> > Is there a way, or a program or utility out there, that would give me a
> list
> > of all the constraints, triggers, indexes, relationships, primary keys,
> > etc., on an entire database or table, so I don't ahve to go into each
> table
> > to find primary keys and indexes.
> >
> >
>|||If very inexpensive will do...
Consider WT3 - one of the SQL Server Tools applications.
http://www.sqlservertools.us
One of the features is automated generation of database documentation.
"Rock" wrote:
> I guess I was looking for something free.
>
> "Derrick Leggett" <derrickleggett@.yahoo.com> wrote in message
> news:%23fcYsDutEHA.3016@.TK2MSFTNGP12.phx.gbl...
> > ? There are all kinds of tools for this. Any database modeling tool
> > (including Visio) will have a reverse engineering function to allow this.
> > You could also look at SQLScribe or something like that.
> >
> >
> > "Rock" <rockisland@.yahoo.com> wrote in message
> > news:OfD7$bstEHA.1272@.TK2MSFTNGP12.phx.gbl...
> > > Is there a way, or a program or utility out there, that would give me a
> > list
> > > of all the constraints, triggers, indexes, relationships, primary keys,
> > > etc., on an entire database or table, so I don't ahve to go into each
> > table
> > > to find primary keys and indexes.
> > >
> > >
> >
> >
>
>
Database Documentation
of all the constraints, triggers, indexes, relationships, primary keys,
etc., on an entire database or table, so I don't ahve to go into each table
to find primary keys and indexes.
? There are all kinds of tools for this. Any database modeling tool
(including Visio) will have a reverse engineering function to allow this.
You could also look at SQLScribe or something like that.
"Rock" <rockisland@.yahoo.com> wrote in message
news:OfD7$bstEHA.1272@.TK2MSFTNGP12.phx.gbl...
> Is there a way, or a program or utility out there, that would give me a
list
> of all the constraints, triggers, indexes, relationships, primary keys,
> etc., on an entire database or table, so I don't ahve to go into each
table
> to find primary keys and indexes.
>
|||I guess I was looking for something free.
"Derrick Leggett" <derrickleggett@.yahoo.com> wrote in message
news:%23fcYsDutEHA.3016@.TK2MSFTNGP12.phx.gbl...
> ? There are all kinds of tools for this. Any database modeling tool
> (including Visio) will have a reverse engineering function to allow this.
> You could also look at SQLScribe or something like that.
>
> "Rock" <rockisland@.yahoo.com> wrote in message
> news:OfD7$bstEHA.1272@.TK2MSFTNGP12.phx.gbl...
> list
> table
>
|||If very inexpensive will do...
Consider WT3 - one of the SQL Server Tools applications.
http://www.sqlservertools.us
One of the features is automated generation of database documentation.
"Rock" wrote:
> I guess I was looking for something free.
>
> "Derrick Leggett" <derrickleggett@.yahoo.com> wrote in message
> news:%23fcYsDutEHA.3016@.TK2MSFTNGP12.phx.gbl...
>
>
Friday, February 17, 2012
Database create error due to folder access right.
However, when I try to do so, I get the following error:
System.ApplicationException: System.Data.SqlClient.SqlException: CREATE DATABASE failed. Some file names listed could not be created. Check related errors.CREATE FILE encountered operating system error 5(Access Denied) while attempting to open or create the physical file 'C:\Program Files\myApp\data\myDatabase.mdf'.
My window login already have administrator role.
The problem can be solved if I manually add full access right to my login in window exploder. However, how can I do this programmatically? Or what is the proper way to create database located under my application folder?The account that sql runs as needs to have the security privledge to access the directory or file.
thanks,
mark|||Sorry that I am using SQL authenication and provide the sa password in the connection string. How can I create database in my application folder?|||As Mark pointed out, you will need to grant write access to that directory to the SQL Server service account. The error is not related to the permissions of the account that you use to connect to SQL Server when you execute the CREATE DATABASE statement.
To find out the service account, execute Start->Run->services.msc and then look for the SQL Server service entry; you should find in it the name of the service account.
Thanks
Laurentiu|||I see. Thank you very much.
If I would like to include SQL Server Express as a pre-requirite of my application, can I grant my app folder write access right of the SQL Server service account during installation?
Thanks again.|||
Are you referring to the SQL Server Express (SSE) installation or to your application installation?
In the first case, I don't think there is a way to grant access at installation time, unless the data folder is the same as your app data folder. For the second case, you can determine the SSE service account and grant it permissions to your folder at the time you install your application.
Thanks
Laurentiu
Tuesday, February 14, 2012
Database create error due to folder access right.
However, when I try to do so, I get the following error:
System.ApplicationException: System.Data.SqlClient.SqlException: CREATE DATABASE failed. Some file names listed could not be created. Check related errors.CREATE FILE encountered operating system error 5(Access Denied) while attempting to open or create the physical file 'C:\Program Files\myApp\data\myDatabase.mdf'.
My window login already have administrator role.
The problem can be solved if I manually add full access right to my login in window exploder. However, how can I do this programmatically? Or what is the proper way to create database located under my application folder?The account that sql runs as needs to have the security privledge to access the directory or file.
thanks,
mark|||Sorry that I am using SQL authenication and provide the sa password in the connection string. How can I create database in my application folder?|||As Mark pointed out, you will need to grant write access to that directory to the SQL Server service account. The error is not related to the permissions of the account that you use to connect to SQL Server when you execute the CREATE DATABASE statement.
To find out the service account, execute Start->Run->services.msc and then look for the SQL Server service entry; you should find in it the name of the service account.
Thanks
Laurentiu|||I see. Thank you very much.
If I would like to include SQL Server Express as a pre-requirite of my application, can I grant my app folder write access right of the SQL Server service account during installation?
Thanks again.|||
Are you referring to the SQL Server Express (SSE) installation or to your application installation?
In the first case, I don't think there is a way to grant access at installation time, unless the data folder is the same as your app data folder. For the second case, you can determine the SSE service account and grant it permissions to your folder at the time you install your application.
Thanks
Laurentiu