Monday, March 26, 2012
problem with attaching mdf file
i installed sql server 2005 express on a windows xp prof. sp2 system.
i also installed the 2005 studio management tool.
I can connect to the sql server (sqlcmd -S), i can create a new database in
the 2005 studio management tool, but i can't attach a mdf file. I'm
administrator so have all rights. I have several mdf (and ldf) files on the
disc.
I did this:
rightclick on Databases, then Attach: i see right an empty windows with an
ADD button.
When i click on that button, i get the error:
c:\myapp\app_data\
cannot access the specified path or file. Verify that you have the necessary
privileges ...
If you know that the service account a specific file, type the path ...
The sevice account is NT AUTHORITY\NetworkService, but when i see the list
of the accounts, i can't find it into that list.
Any help would be appreciated.
Thanks
BobBob wrote:
> Hi,
> i installed sql server 2005 express on a windows xp prof. sp2 system.
> i also installed the 2005 studio management tool.
> I can connect to the sql server (sqlcmd -S), i can create a new database in
> the 2005 studio management tool, but i can't attach a mdf file. I'm
> administrator so have all rights. I have several mdf (and ldf) files on the
> disc.
> I did this:
> rightclick on Databases, then Attach: i see right an empty windows with an
> ADD button.
> When i click on that button, i get the error:
> c:\myapp\app_data\
> cannot access the specified path or file. Verify that you have the necessary
> privileges ...
> If you know that the service account a specific file, type the path ...
> The sevice account is NT AUTHORITY\NetworkService, but when i see the list
> of the accounts, i can't find it into that list.
>
> Any help would be appreciated.
> Thanks
> Bob
>
>
>
>
Create an actual user to be used as the service account, then make sure
that user has read/write permissions in your data directory.
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||Thanks for replying.
Can you tell me how to do that? Do you mean: a windows xp account? And how
to link it to NT AUTHORITY\Network? I can't even find it in the list of the
windows accounts.
"Tracy McKibben" <tracy@.realsqlguy.com> schreef in bericht
news:459BF31D.9050605@.realsqlguy.com...
> Bob wrote:
>> Hi,
>> i installed sql server 2005 express on a windows xp prof. sp2 system.
>> i also installed the 2005 studio management tool.
>> I can connect to the sql server (sqlcmd -S), i can create a new database
>> in the 2005 studio management tool, but i can't attach a mdf file. I'm
>> administrator so have all rights. I have several mdf (and ldf) files on
>> the disc.
>> I did this:
>> rightclick on Databases, then Attach: i see right an empty windows with
>> an ADD button.
>> When i click on that button, i get the error:
>> c:\myapp\app_data\
>> cannot access the specified path or file. Verify that you have the
>> necessary privileges ...
>> If you know that the service account a specific file, type the path ...
>> The sevice account is NT AUTHORITY\NetworkService, but when i see the
>> list of the accounts, i can't find it into that list.
>>
>> Any help would be appreciated.
>> Thanks
>> Bob
>>
>>
>>
> Create an actual user to be used as the service account, then make sure
> that user has read/write permissions in your data directory.
>
> --
> Tracy McKibben
> MCDBA
> http://www.realsqlguy.com|||Thanks for replying.
I copied mydb.mdf and .ldf to the directory where i created a new database,
but in Management Studio, it's the same: i don't see it in the list of the
databases and can't attach it.
"Hari Prasad" <HariPrasad@.discussions.microsoft.com> schreef in bericht
news:7601E1FD-2A85-496E-A92F-06189BC57855@.microsoft.com...
> Easy way is copy the required MDF and LDF files to the default data
> directory
> (The place where you create the new database)
> using the windows explorer and then try attaching the database. This will
> defenetely work out.
> The issue is you have full access to machine but once you login to SQL
> Server you will have access rights only belong to
> account "NT AUTHORITY\NetworkService". The account may not have access to
> folder c:\myapp\app_data\.
> My best suggestion is copy the file to the folder where the new database
> is
> created and attach it.
> Thanks
> Hari
> "Bob" wrote:
>> Hi,
>> i installed sql server 2005 express on a windows xp prof. sp2 system.
>> i also installed the 2005 studio management tool.
>> I can connect to the sql server (sqlcmd -S), i can create a new database
>> in
>> the 2005 studio management tool, but i can't attach a mdf file. I'm
>> administrator so have all rights. I have several mdf (and ldf) files on
>> the
>> disc.
>> I did this:
>> rightclick on Databases, then Attach: i see right an empty windows with
>> an
>> ADD button.
>> When i click on that button, i get the error:
>> c:\myapp\app_data\
>> cannot access the specified path or file. Verify that you have the
>> necessary
>> privileges ...
>> If you know that the service account a specific file, type the path ...
>> The sevice account is NT AUTHORITY\NetworkService, but when i see the
>> list
>> of the accounts, i can't find it into that list.
>>
>> Any help would be appreciated.
>> Thanks
>> Bob
>>
>>
>>
>>|||Bob wrote:
> Thanks for replying.
> Can you tell me how to do that? Do you mean: a windows xp account? And how
> to link it to NT AUTHORITY\Network? I can't even find it in the list of the
> windows accounts.
>
Yes, a Windows XP account or a domain account, whichever is appropriate
for your environment. You don't "link" this new user to NT
AUTHORITY\Network, you'll configure the SQL Server services to run as
the new user that you create. NT AUTHORITY\Network isn't a real user
account.
You could also configure the SQL Server services to run as "Local
System", which will give SQL system-level access to your machine.
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||Thanks it works now
"Tracy McKibben" <tracy@.realsqlguy.com> schreef in bericht
news:459C069B.5080403@.realsqlguy.com...
> Bob wrote:
>> Thanks for replying.
>> Can you tell me how to do that? Do you mean: a windows xp account? And
>> how to link it to NT AUTHORITY\Network? I can't even find it in the list
>> of the windows accounts.
> Yes, a Windows XP account or a domain account, whichever is appropriate
> for your environment. You don't "link" this new user to NT
> AUTHORITY\Network, you'll configure the SQL Server services to run as the
> new user that you create. NT AUTHORITY\Network isn't a real user account.
> You could also configure the SQL Server services to run as "Local System",
> which will give SQL system-level access to your machine.
>
> --
> Tracy McKibben
> MCDBA
> http://www.realsqlguy.com
problem with attaching mdf file
i installed sql server 2005 express on a Windows XP prof. sp2 system.
i also installed the 2005 studio management tool.
I can connect to the sql server (sqlcmd -S), i can create a new database in
the 2005 studio management tool, but i can't attach a mdf file. I'm
administrator so have all rights. I have several mdf (and ldf) files on the
disc.
I did this:
rightclick on Databases, then Attach: i see right an empty windows with an
ADD button.
When i click on that button, i get the error:
c:\myapp\app_data\
cannot access the specified path or file. Verify that you have the necessary
privileges ...
If you know that the service account a specific file, type the path ...
The sevice account is NT AUTHORITY\NetworkService, but when i see the list
of the accounts, i can't find it into that list.
Any help would be appreciated.
Thanks
BobBob wrote:
> Hi,
> i installed sql server 2005 express on a Windows XP prof. sp2 system.
> i also installed the 2005 studio management tool.
> I can connect to the sql server (sqlcmd -S), i can create a new database i
n
> the 2005 studio management tool, but i can't attach a mdf file. I'm
> administrator so have all rights. I have several mdf (and ldf) files on th
e
> disc.
> I did this:
> rightclick on Databases, then Attach: i see right an empty windows with an
> ADD button.
> When i click on that button, i get the error:
> c:\myapp\app_data\
> cannot access the specified path or file. Verify that you have the necessa
ry
> privileges ...
> If you know that the service account a specific file, type the path ...
> The sevice account is NT AUTHORITY\NetworkService, but when i see the list
> of the accounts, i can't find it into that list.
>
> Any help would be appreciated.
> Thanks
> Bob
>
>
>
>
Create an actual user to be used as the service account, then make sure
that user has read/write permissions in your data directory.
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||Easy way is copy the required MDF and LDF files to the default data director
y
(The place where you create the new database)
using the windows explorer and then try attaching the database. This will
defenetely work out.
The issue is you have full access to machine but once you login to SQL
Server you will have access rights only belong to
account "NT AUTHORITY\NetworkService". The account may not have access to
folder c:\myapp\app_data\.
My best suggestion is copy the file to the folder where the new database is
created and attach it.
Thanks
Hari
"Bob" wrote:
> Hi,
> i installed sql server 2005 express on a Windows XP prof. sp2 system.
> i also installed the 2005 studio management tool.
> I can connect to the sql server (sqlcmd -S), i can create a new database i
n
> the 2005 studio management tool, but i can't attach a mdf file. I'm
> administrator so have all rights. I have several mdf (and ldf) files on th
e
> disc.
> I did this:
> rightclick on Databases, then Attach: i see right an empty windows with an
> ADD button.
> When i click on that button, i get the error:
> c:\myapp\app_data\
> cannot access the specified path or file. Verify that you have the necessa
ry
> privileges ...
> If you know that the service account a specific file, type the path ...
> The sevice account is NT AUTHORITY\NetworkService, but when i see the list
> of the accounts, i can't find it into that list.
>
> Any help would be appreciated.
> Thanks
> Bob
>
>
>
>|||Thanks for replying.
Can you tell me how to do that? Do you mean: a Windows XP account? And how
to link it to NT AUTHORITY\Network? I can't even find it in the list of the
windows accounts.
"Tracy McKibben" <tracy@.realsqlguy.com> schreef in bericht
news:459BF31D.9050605@.realsqlguy.com...
> Bob wrote:
> Create an actual user to be used as the service account, then make sure
> that user has read/write permissions in your data directory.
>
> --
> Tracy McKibben
> MCDBA
> http://www.realsqlguy.com|||Thanks for replying.
I copied mydb.mdf and .ldf to the directory where i created a new database,
but in Management Studio, it's the same: i don't see it in the list of the
databases and can't attach it.
"Hari Prasad" <HariPrasad@.discussions.microsoft.com> schreef in bericht
news:7601E1FD-2A85-496E-A92F-06189BC57855@.microsoft.com...[vbcol=seagreen]
> Easy way is copy the required MDF and LDF files to the default data
> directory
> (The place where you create the new database)
> using the windows explorer and then try attaching the database. This will
> defenetely work out.
> The issue is you have full access to machine but once you login to SQL
> Server you will have access rights only belong to
> account "NT AUTHORITY\NetworkService". The account may not have access to
> folder c:\myapp\app_data\.
> My best suggestion is copy the file to the folder where the new database
> is
> created and attach it.
> Thanks
> Hari
> "Bob" wrote:
>|||Bob wrote:
> Thanks for replying.
> Can you tell me how to do that? Do you mean: a Windows XP account? And how
> to link it to NT AUTHORITY\Network? I can't even find it in the list of th
e
> windows accounts.
>
Yes, a Windows XP account or a domain account, whichever is appropriate
for your environment. You don't "link" this new user to NT
AUTHORITY\Network, you'll configure the SQL Server services to run as
the new user that you create. NT AUTHORITY\Network isn't a real user
account.
You could also configure the SQL Server services to run as "Local
System", which will give SQL system-level access to your machine.
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||Thanks it works now
"Tracy McKibben" <tracy@.realsqlguy.com> schreef in bericht
news:459C069B.5080403@.realsqlguy.com...
> Bob wrote:
> Yes, a Windows XP account or a domain account, whichever is appropriate
> for your environment. You don't "link" this new user to NT
> AUTHORITY\Network, you'll configure the SQL Server services to run as the
> new user that you create. NT AUTHORITY\Network isn't a real user account.
> You could also configure the SQL Server services to run as "Local System",
> which will give SQL system-level access to your machine.
>
> --
> Tracy McKibben
> MCDBA
> http://www.realsqlguy.com
Friday, March 23, 2012
problem with access to analysis services: repository structure cannot be created
Hello,
I have a problem with Analysis Services. We use this product because it's needed for NetIQ Analysis Center, our OLAP reporting tool.
When I try to open the Analysis Manager, I can see the server but when I try to access it, the following error message is displayed: "repository structure cannot be created on the target server: the specified object cannot be found. For more information, see the section 'service pack installation' in the service pack readme file."
I checked this service pack readme file, but couldn't find anything relevant to this problem.
The files for both the sample foodmart and the NetiQ Analysis Center databases are still on this server, so I suppose something happened with the configuration information of this server, not with the databases themselves.
Event entries in the system and application log files do not reveal anything, nothing points to a problem with OLAP/Analysis Services.
The connection string to this server seems to be ok as well.
Unregistering and reregistering this server does not resolve the problem: as soon as I try to register, the same error message is displayed.
SQl, sqlsrvagent, MSDTC and Olap services are all running.
Did anyone see this behaviour before? Or does anyone know how to resolve or how to at least troubleshoot this particular problem?
Help will be much appreciated!
Timur
This sounds like a corruption issue with your repository although possibly it's as simple as a permissions problem with the relational database the repostitory is stored in.
First check your access to the relational database (SQL or Jet) that the repository is stored in. If this is okay, you can restore the default msmdrep.mdb by resetting the repository connection strings. (provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Program Files\Microsoft Analysis services\Bin\msmdrep.mdb) Then you can migrate this to SQL if you wish. It is strongly recommended that you use the native format and not the Meta Data Services (previously named Microsoft Repository) format and the latest services packs will even enforce this during migration)
sqlWednesday, March 21, 2012
Problem with a foreing key
written for DB2 into SQLServer.
My problem is this: using a tool to translate the script for creating the
DB, I obtain the following code:
ALTER TABLE PROJECT.RSURETTA ADD FOREIGN KEY(VOCE )
REFERENCES PROJECT.RSANVOCE(VOCE ) ON DELETE SET NULL ON UPDATE NO ACTION
But, when I try to run the script the system says:
Incorrect syntax near the keyword 'SET'.
Can I assign a null value to an other table with a reference?
Thank you
Fede"Federica T" <fedina_chicca@.N_O_Spam_libero.it> wrote in message
news:cjbp73$h69$1@.atlantis.cu.mi.it...
> I'm a beginner in using SQLServer and I 'm trying to bring a db Schema
> written for DB2 into SQLServer.
> My problem is this: using a tool to translate the script for creating the
> DB, I obtain the following code:
> ALTER TABLE PROJECT.RSURETTA ADD FOREIGN KEY(VOCE )
> REFERENCES PROJECT.RSANVOCE(VOCE ) ON DELETE SET NULL ON UPDATE NO
> ACTION
> But, when I try to run the script the system says:
> Incorrect syntax near the keyword 'SET'.
> Can I assign a null value to an other table with a reference?
> Thank you
> Fede
No - SET NULL is not implemented in MSSQL 2000 (I think it will be in MSSQL
2005); the only options are NO ACTION or CASCADE. If you need this
functionality, then triggers would probably be the best way to go, or
perhaps a stored procedure which performs the DELETE and also sets the
values to NULL in the referencing table.
Simon|||"Simon Hayes" <sql@.hayes.ch> ha scritto nel messaggio
news:41596f8d_2@.news.bluewin.ch...
> No - SET NULL is not implemented in MSSQL 2000 (I think it will be in
MSSQL
> 2005); the only options are NO ACTION or CASCADE. If you need this
> functionality, then triggers would probably be the best way to go, or
> perhaps a stored procedure which performs the DELETE and also sets the
> values to NULL in the referencing table.
Thank you!
Fede