Showing posts with label perform. Show all posts
Showing posts with label perform. Show all posts

Monday, March 19, 2012

[SqlException (0x80131904): User does not have permission to perform this action.]

Folks,

This is driving me nuts. I posted the other day on a related issue, which I belive turned out to be a file permission. I am trying to test my asp.net site under IIS before deploying it. I am now getting the above message which breaks on the opening page on opening a connection to the sql server database. I have permissions set on the database for MachineName\ASPNET and NT AUTHORITY\NETWORK SERVICE as Ken Tucker suggested. Still getting the message. This certainly looks like a sqlserver permission issue but I am at a loss as to how to grant IIS or the specific web app permission to access the database.


Any assistance is truely appreciated. I have spent way to many hours on this. If you don't have the answer but can suggest a resource where I can research it that would help also.


Thanks

What permissions have you set for the ASPNET user?

bullpit

|||ASPNET user has connect permission.|||

I asked because I had a similar situation and what I did was to go to SQL Server Enterprise Manager, navigate down to the database I was using, and then to its "users" tab, and for the ASPNET user, I right clicked and set the all the permissions to Insert, Update, Delete, Select and Execute. I dont know if you already done this or not. If not, you can give this a try.

Good luck,

bullpit

|||

Also, if you know your application is not going to do any inserts or updates to the database then I would suggest you try with minimal permissions (probably only Select). This will make your database less vulnerable.

good luck...

bullpit

Tuesday, March 6, 2012

[MSSQL7] Backup on network drive

Hi there,
Does anyone know if it's possible to perform a MSSQL7 database backup on a network drive instead of the local drives ?
...and if yes, how to proceed ?
It seems to be possible under MSSQL2000.
Many thanks for your help in advance,
MattEach MS-SQL device must be know as a local disk to control the IO writes, and a dump device follow this rule|||many thanks for this answer ;o)|||Originally posted by fadace
Each MS-SQL device must be know as a local disk to control the IO writes, and a dump device follow this rule

It is not a true:

backup DATABASE database
to disk ='\\networkserver\BACKUP\database.bak'|||hu interresting, gonna have a try with this !! thanks !! :)

is there no read/write error risks ? I mean, if we exclude the network transmission problems, of course.|||Originally posted by mattoo
hu interresting, gonna have a try with this !! thanks !! :)

is there no read/write error risks ? I mean, if we exclude the network transmission problems, of course.

If someone cuts a network cable it should be a problem but no more.|||Fine. Many thanks again for your help ;)

Monday, February 13, 2012

[?]Restore and Backup problem

I've a program with VB6 working with SQLServer 2000.
I have a Central Station with the program runnin with full prvileges and
that can perform all the actions on the DB.
There are also some clients that cannot be connected via LAN or internet
that need to use the same DB.
The way I solved this with Aces was to copy the Access file from the Central
Station ot the disconnected clients.
Then to update the central Staton I used to save the recordset of new data
entered from there onto files and then copy them into the Central Station.
Now I'm upgrading the program to run with SQLServer.
I can do everything but the Backup and restore of the DB.
Actually I perform the DB Backup to file with the command line

BACKUP DATABASE myDB TO DISK = 'TempFileName.bak'

This way I can save the file on a USB key or send it via email

Then I restore it on the disconnected clients using the command line

RESTORE DATABASE myDB FROM DISK ='TempFileName.bak' WITH REPLACE

Everything looks fine and seems to work, but on my testing machine I'm
having this strange behavior:

I create new datas into the DataBase, then I execute the backup and quit the
application.
I open EM and delete the just entered datas
I open the application simulating the disconnected clinet (just a string
option, the program is the same)
I execute the RESTORE
I expect hte cancelled datas to be back online, but...... the cancelled
datas is not restored.
I then open EM and execute a backup from the file I created with Backup and
..... the data goes in.
Why?
Is the problem raised only becouse the SQLServer is the same in both cases?

What I need is just to copy one DB and inserting it into a different Server.
Any idea why this is appening?
Any idea on how to do this operation?

I tryed already the RECOVERY, NORECOVERY and quite everything, but ......

Thanks in advance for your helpPerhaps you are inadvertently appending to the backup file instead of
overwriting. Try

BACKUP DATABASE myDB TO DISK = 'TempFileName.bak' WITH INIT

--
Hope this helps.

Dan Guzman
SQL Server MVP

"Spieg" <spiegator@.tiscali.it> wrote in message
news:WgQUc.120173$OR2.6141961@.news3.tin.it...
> I've a program with VB6 working with SQLServer 2000.
> I have a Central Station with the program runnin with full prvileges and
> that can perform all the actions on the DB.
> There are also some clients that cannot be connected via LAN or internet
> that need to use the same DB.
> The way I solved this with Aces was to copy the Access file from the
Central
> Station ot the disconnected clients.
> Then to update the central Staton I used to save the recordset of new data
> entered from there onto files and then copy them into the Central Station.
> Now I'm upgrading the program to run with SQLServer.
> I can do everything but the Backup and restore of the DB.
> Actually I perform the DB Backup to file with the command line
> BACKUP DATABASE myDB TO DISK = 'TempFileName.bak'
> This way I can save the file on a USB key or send it via email
> Then I restore it on the disconnected clients using the command line
> RESTORE DATABASE myDB FROM DISK ='TempFileName.bak' WITH REPLACE
> Everything looks fine and seems to work, but on my testing machine I'm
> having this strange behavior:
> I create new datas into the DataBase, then I execute the backup and quit
the
> application.
> I open EM and delete the just entered datas
> I open the application simulating the disconnected clinet (just a string
> option, the program is the same)
> I execute the RESTORE
> I expect hte cancelled datas to be back online, but...... the cancelled
> datas is not restored.
> I then open EM and execute a backup from the file I created with Backup
and
> .... the data goes in.
> Why?
> Is the problem raised only becouse the SQLServer is the same in both
cases?
> What I need is just to copy one DB and inserting it into a different
Server.
> Any idea why this is appening?
> Any idea on how to do this operation?
> I tryed already the RECOVERY, NORECOVERY and quite everything, but ......
> Thanks in advance for your help|||Right, the WITH INIT Worked, damn I read it, but ...
Thanks

"Dan Guzman" <danguzman@.nospam-earthlink.net> ha scritto nel messaggio
news:c3UUc.6485$3O3.6087@.newsread2.news.pas.earthl ink.net...
> Perhaps you are inadvertently appending to the backup file instead of
> overwriting. Try
> BACKUP DATABASE myDB TO DISK = 'TempFileName.bak' WITH INIT
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP