Viewing 15 posts - 1,471 through 1,485 (of 4,745 total)
use this command to see what an Os error means
open up a command prompt and type
net helpmsg errornumber
October 8, 2011 at 12:25 pm
you have OS error 5, thats a permissions error.
the account running the restore does not have permissions to that directory. you could also try repointing the restore so the .mdf...
October 8, 2011 at 12:24 pm
.and then reindex your database, it will be badly fragmented following the shrink.
October 8, 2011 at 12:15 pm
brandie, a bit late perhaps but as you ask in the code column level permissions are in the minor_id column in sys.database_permissions
If minor_id = 0 its not a column level...
October 7, 2011 at 10:29 am
ok, the final code taken as far as I need to. Use this to reverse engineer database permissions (SQL2005 and up) if you want to reapply them after a restore...
October 7, 2011 at 3:36 am
Hi, back again, sorry its been so long, been on holiday and generally very busy.
Remi, this code will reverse engineer application roles
select 'CREATE APPLICATION ROLE ['+ name + '] with...
October 6, 2011 at 2:50 pm
opc.three (10/5/2011)
george sibbald (10/4/2011)
declare @dbname sysnameset @dbname = db_name()
print @dbname
select backup_start_date,backup_finish_date,backup_size/1024 as 'size in MB'
from msdb..backupset
where database_name = @dbname and type = 'D'
I have just one tweak. backup_size...
October 6, 2011 at 3:51 am
......those with a status of 2 are active
October 4, 2011 at 3:39 pm
ok, now I am confused. Are you using a SQL authenticated account?
If I try and do this with a SQL account that does not have sysadmin rights I cannot break...
October 4, 2011 at 3:36 pm
you still need the -S option
October 4, 2011 at 2:22 pm
that would presume the default instance, is this a named instance?
October 4, 2011 at 2:14 pm
could you just post the results of sp_helpuser (run in the database) immediately after restoring\attaching it.
October 4, 2011 at 1:56 pm
I think you should be using the -A option with sqlcmd
October 4, 2011 at 1:47 pm
you don't need to create a database first before restoring.
October 4, 2011 at 9:15 am
Viewing 15 posts - 1,471 through 1,485 (of 4,745 total)