Showing posts with label existing. Show all posts
Showing posts with label existing. Show all posts

Thursday, March 29, 2012

Access Denied Error attaching an existing MDF

I guess I messed up somehow, but I am not sure how to fix this.

On Vista, with SQL Server 2005 Developer Edition, I created a 6GB database and loaded it up with data. I then decided that I wanted to burn a copy of the files, so I detached (no problem.) But when I wanted to copy the physical MDF and LOG file to another folder. Vista said I did not have access to the folder, but if I hit continue, no problem--it would correct the situation. I did. I copied the files (no problem), but now when I go to reattach to the MDF (that is still in the Data folder), I get a "CREATE FILE encountered operating system 5 (Access is denied)" error. I checked permissions and SQL Server has full rights. I am the only user on the system (Admin), and the files do not appear to have anything weird set (read only, advanced permissions, etc.)

What did I do wrong? And how do I fix this? Oh the joys of advanced Vista security features Smile Even the admin is locked out now.

Thank you for your help!

Michael

Usually the difference for Vista is that you do not get access simply by being a member of the Administrators group. You would need to grant explicit access to the account for the SQL service as well as your own account.|||

I want to understand what you are saying. Are you saying the error is occuring because my login was added to the permissions on the Data folder? MSSQLSERVER has full permissions to the folder and file. That doesn't appear to have changed. Or are you saying that I need to add permissions back for another service like the Agent?

I am trying to understand what Vista did that makes this operation fail.

Thanks!

|||

Attach will attempt to verify that your account has access to the file before attaching it to the server. This keeps random users from attaching random files that they would not normally have access to.

Check the file permissions for both the service account and your account.

|||

Check the NTFS permissions on the actual files. I have see time where after detaching a database from the SQL Server the only user account which has access to the files is the user who detached the database. All other accounts are removed including the SQL Server.

It can be a deceving problem becuase the NTFS permissions on the folder look fine (because they are), but the NTFS permissions of the data files are screwed up.

|||

I will check that out when I get in front of that PC -- thanks! I am still baffled by it. I was able to copy the file to another folder and attach, so I was able to move on. However, the copy that was in the original location still has the issue.

Thank you for replying -- that actually makes sense.

Michael

|||Permission on detach works differently in sql2k5 than sql2k (i.e. it does not preserve all acls like sql2k). This has caught many sql2k users off guard.
http://msdn2.microsoft.com/en-us/library/ms189128.aspx

Thursday, March 22, 2012

Access ADP - SQL server diagram conflicts!

I've run into an annoyance, if I create a new Access project from an
existing SQL database and open up diagrams created earlier with th
enterprise manager Access XP crashes. Creating new diagrams through Access
seems to work just fine. Anyone else run into this? Thanks all.
JonSounds like an Access bug. I'd ask on those newsgroups. It may be
fixed in newer versions of Access.
--Mary
On Thu, 24 Jun 2004 08:25:04 -0400, "Jon" <jonremovemewest@.msn.com>
wrote:
>I've run into an annoyance, if I create a new Access project from an
>existing SQL database and open up diagrams created earlier with th
>enterprise manager Access XP crashes. Creating new diagrams through Access
>seems to work just fine. Anyone else run into this? Thanks all.
>Jon
>

Tuesday, March 20, 2012

Access 2003 Linked Tables update

Hello,

I am trying to update some SQL-linked tables in my Access database by repoiting the existing linked tables to a new datasource. The problem is, when I go to select the machine data source where the table sits, I get an error message saying the MS Jet Database can't find the object. This is because when Access creates the linked table, it replaces the period in the <schema>.<table_name> with an underscore. So when I go to update the links, it is essentially looking for the new table with the wrong file name.

I have about 80 linked tables to update and I haven't been able to figure a work-around. HELP PLEASE!

Cheers,

Josh

According to http://www.microsoft.com/technet/archive/office/office97/reskit/office97/027.mspx

Renaming Linked Tables

When Access links a remote table, it prefixes the default table owner ID of the SQL Server to each table name. The period separator between the owner ID and the table name is replaced by an underscore because periods in table names are not permitted by Access. Thus, the names of linked tables no longer correspond to the original table names in your MDB file. The simplest way to correct this is to rename your tables to their original names after linking.

Monday, March 19, 2012

Access - SQL 2005

Hi Guys/Girls...
I'm using SQL 2005 integration services to copy data from an existing access
database. The access datbase contains a field, with the type of NTEXT. I am
trying to write the corresponding data to a table with a nvarchar(8000)
field.
I'm also trying to use the 'Data Conversion' data flow transformation,
however I am unsure what to convert the NTEXT to? I've tried a variety of
supported types, however I always seem to get an error stipulating that the
output stream stipulated does not support the NTEXT conversion.
Has anybody tried anything like this yet?
Thanks,
Justin> I'm using SQL 2005 integration services to copy data from an existing
> access database. The access datbase contains a field, with the type of
> NTEXT.
Access does not have a data type called NTEXT. This is gong to be MEMO in
Access, and I think Integration Services is telling you to use NTEXT in SQL
Server. I am going to suggest you use NVARCHAR(MAX) as the destination data
type.
A|||Hi Aaron,
I do not wish to import into a NTEXT field in my SQL2005 database, but would
prefer that Integration Services do the implicit conversion to a
Varchar(8000) using the 'Data Conversion' data flow transformation.
Thanks,
Justin
"Aaron Bertrand [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:enxdpaq%23FHA.984@.tk2msftngp13.phx.gbl...
> Access does not have a data type called NTEXT. This is gong to be MEMO in
> Access, and I think Integration Services is telling you to use NTEXT in
> SQL Server. I am going to suggest you use NVARCHAR(MAX) as the
> destination data type.
> A
>

Sunday, March 11, 2012

Accelerate Sql Express?

Hi,

we're planning to migrate an existing dataset cache mechanism to Sql Server Express. The dataset isn't really able to handle and search one million recordsets any more :-)

Once a day the Cache Sql Database wil be filled with fresh data. In comparison with the dataset takes up to fourty times longer to build the cache on the same machine!! Ok, I expected that i will take longer than creating the objects in a database with all its "overhead" like atomic transactions etc. But not so much.

The current throughput on SQL Server ist nearly 400 inserted records per second in the same table. The dataset stores up to 17.000 of the same data.

I'm wondering about the the following fact. Allthough I'm testing the Mass-Inserts with generating synthetic records in a unlimited for-loop, the server CPU load is allways less than 3 %. For all I care it could be much higher while the nightly process of initilializing the cache. Could there be a unnecessary throttle that limits the amount of inserts per second?

Any ideas how to accelerate the database engine or optimizing bulk-inserts?

P.S. I tested some different options and played around with connection string options like packekt size, Named Pipes connections, recycling the last commando and parameters and so on. Without any significant effects..

Marcus

Could you post how you are doing the inserts are the moment? Are you using BULK INSERT or bcp, or are you doing regular inserts? Also, what is the transaction size you are using, and what are the specifications or your machine, disks, etc.|||Im inserting each record in a single regular insert statement via ADO.NET (2.0) ExecuteComand. As far as I know, buldinsert are only for files available, right?

The Maschine is a 4 x XEON 3,6 Ghz, 32 bit Win2003 Server Sp1, 4GB Ram and a fast SCSI Raid

What is the transaction size? Is this a configurable value? At the moment all values are unchanged
installation defaults.

Thanks
Marcus|||There are several ways to speedup:

1) Use a SqlTransaction in your ADO.NET code, and issue a commit after every N rows that you insert. If you don't do this, a commit will be done for each row, which is very expensive.

2) To get big perf improvements, you should use BulkInsert or BCP to bulk load your data in your database. These methods are much faster than doing individual inserts.

Thanks,