VBS script + scheduled task to backup SQL Server databaseSQL Server 2008 RestoreSQL Server 2008 Database...

Is it possible to methodically find the total of ways to read a given phrase making a stack?

How unreachable are Jupiter's moons from Mars with the technology developed for going to Mars?

If we can’t finish all tasks, does this mean we are doing Scrum wrong?

Quick Way to Extrude Line to Make Ledges?

Why is it that Bernie Sanders is always called a "socialist"?

Do the speed limit reductions due to pollution also apply to electric cars in France?

How long can the stop in a stop-and-go be?

Boss asked me to sign a resignation paper without a date on it along with my new contract

Why did Ylvis use "go" instead of "say" in phrases like "Dog goes 'woof'"?

Players preemptively rolling, even though their rolls are useless or are checking the wrong skills

Color of alien seas

Did ancient Germans take pride in leaving the land untouched?

How can I prevent an oracle who can see into the past from knowing everything that has happened?

Is there a celebrity culture in academia and should we discourage it?

Is there any danger of my neighbor having my wife's signature?

Why does a single AND gate need 60 transistors?

Was there a pre-determined arrangment for division of Germany in case it surrendered before any Soviet forces entered its territory?

What if I miss a connection and don't have money to book next flight?

Expression for "unconsciously using words (or accents) used by a person you often talk with or listen to"?

How can I handle players killing my NPC outside of combat?

What is an efficient way to digitize a family photo collection?

How to wrap a figure in exam document?

Tikz: Perpendicular FROM a line

Select all columns except geometry using virtual layers



VBS script + scheduled task to backup SQL Server database


SQL Server 2008 RestoreSQL Server 2008 Database Restore Error - Cannot open backup device 15105Backup is getting failed with following errorError 3203 restoring SQL Server backup: The data is invalidSQL Server 2008 backup scriptRestore SQL Server 2008 database onto SQL Server 2014?SQL Operating system error 5(Access is denied.)Error when restoring up a database backup: Cannot find file ID 1 on deviceRestore SQL Server databaseThe backup is failing after few minutes/percent in two node SQL Server AlwaysOn













1















I was looking around since too long, without finding anything, so badly I decided to ask here my problem, all by myself :-P



So here it is:



I am working with a certain software which uses a SQL Server database. I'm at a point where I'd like to scheduled a task to backup certains files AND a precise DB on the SQL Server.



First problem is that the user logged in, don't have any access granted on the DB to backup it. Each time a get the message




Msg 916, Level 14, State 1, Server XXXXXXXXXX, Line 1

The server principal "domainusername" is not able to access the database "XXXX" under the current security context.



Msg 3013, Level 16, State 1, Server XXXXXXXXXX, Line 1

BACKUP DATABASE is terminating abnormally.




From this command line:



C:sqlcmd -E -S XXXXXXXXXX-Q "BACKUP DATABASE XXXX TO DISK='C:TEMPtoto.bak'"


Second problem is that I even don't have any access to the DB...



So I cannot GRANT acess at all, to anybody...



Does somebody know a workaround I could use to achieve what I'm trying to do?










share|improve this question
















bumped to the homepage by Community 11 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.











  • 1





    Your DBA should be configuring the backups for the development, test, and production DB needs, I'd talk with them about it. Otherwise, sign onto the SQL Server instance as SA or reset the SA password if you're able to and have access to the server to log into the server as the local or domain admin and look over these suggestions here: superuser.com/questions/1103850/…

    – Pimp Juice IT
    Jul 30 '16 at 2:48











  • Yeah, good suggestion !! I will give it a try !!

    – Louis-Alex
    Jul 30 '16 at 2:53













  • Was my suggestion of any use to you or have you given any a try yet?

    – Pimp Juice IT
    Jul 30 '16 at 23:04











  • @PIMP_JUICE_IT I will let you know for sure when i'll test on monday, at work...... :-)

    – Louis-Alex
    Jul 30 '16 at 23:34











  • As I thought, without any permission, I get that message : Msg 15151, Level 16, State 1, Server XXXXX/XXXXX, Line 1 Cannot alter the login 'sa', because it does not exist or you do not have permission. Another idea :-) ?

    – Louis-Alex
    Aug 1 '16 at 13:00


















1















I was looking around since too long, without finding anything, so badly I decided to ask here my problem, all by myself :-P



So here it is:



I am working with a certain software which uses a SQL Server database. I'm at a point where I'd like to scheduled a task to backup certains files AND a precise DB on the SQL Server.



First problem is that the user logged in, don't have any access granted on the DB to backup it. Each time a get the message




Msg 916, Level 14, State 1, Server XXXXXXXXXX, Line 1

The server principal "domainusername" is not able to access the database "XXXX" under the current security context.



Msg 3013, Level 16, State 1, Server XXXXXXXXXX, Line 1

BACKUP DATABASE is terminating abnormally.




From this command line:



C:sqlcmd -E -S XXXXXXXXXX-Q "BACKUP DATABASE XXXX TO DISK='C:TEMPtoto.bak'"


Second problem is that I even don't have any access to the DB...



So I cannot GRANT acess at all, to anybody...



Does somebody know a workaround I could use to achieve what I'm trying to do?










share|improve this question
















bumped to the homepage by Community 11 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.











  • 1





    Your DBA should be configuring the backups for the development, test, and production DB needs, I'd talk with them about it. Otherwise, sign onto the SQL Server instance as SA or reset the SA password if you're able to and have access to the server to log into the server as the local or domain admin and look over these suggestions here: superuser.com/questions/1103850/…

    – Pimp Juice IT
    Jul 30 '16 at 2:48











  • Yeah, good suggestion !! I will give it a try !!

    – Louis-Alex
    Jul 30 '16 at 2:53













  • Was my suggestion of any use to you or have you given any a try yet?

    – Pimp Juice IT
    Jul 30 '16 at 23:04











  • @PIMP_JUICE_IT I will let you know for sure when i'll test on monday, at work...... :-)

    – Louis-Alex
    Jul 30 '16 at 23:34











  • As I thought, without any permission, I get that message : Msg 15151, Level 16, State 1, Server XXXXX/XXXXX, Line 1 Cannot alter the login 'sa', because it does not exist or you do not have permission. Another idea :-) ?

    – Louis-Alex
    Aug 1 '16 at 13:00
















1












1








1


0






I was looking around since too long, without finding anything, so badly I decided to ask here my problem, all by myself :-P



So here it is:



I am working with a certain software which uses a SQL Server database. I'm at a point where I'd like to scheduled a task to backup certains files AND a precise DB on the SQL Server.



First problem is that the user logged in, don't have any access granted on the DB to backup it. Each time a get the message




Msg 916, Level 14, State 1, Server XXXXXXXXXX, Line 1

The server principal "domainusername" is not able to access the database "XXXX" under the current security context.



Msg 3013, Level 16, State 1, Server XXXXXXXXXX, Line 1

BACKUP DATABASE is terminating abnormally.




From this command line:



C:sqlcmd -E -S XXXXXXXXXX-Q "BACKUP DATABASE XXXX TO DISK='C:TEMPtoto.bak'"


Second problem is that I even don't have any access to the DB...



So I cannot GRANT acess at all, to anybody...



Does somebody know a workaround I could use to achieve what I'm trying to do?










share|improve this question
















I was looking around since too long, without finding anything, so badly I decided to ask here my problem, all by myself :-P



So here it is:



I am working with a certain software which uses a SQL Server database. I'm at a point where I'd like to scheduled a task to backup certains files AND a precise DB on the SQL Server.



First problem is that the user logged in, don't have any access granted on the DB to backup it. Each time a get the message




Msg 916, Level 14, State 1, Server XXXXXXXXXX, Line 1

The server principal "domainusername" is not able to access the database "XXXX" under the current security context.



Msg 3013, Level 16, State 1, Server XXXXXXXXXX, Line 1

BACKUP DATABASE is terminating abnormally.




From this command line:



C:sqlcmd -E -S XXXXXXXXXX-Q "BACKUP DATABASE XXXX TO DISK='C:TEMPtoto.bak'"


Second problem is that I even don't have any access to the DB...



So I cannot GRANT acess at all, to anybody...



Does somebody know a workaround I could use to achieve what I'm trying to do?







sql-server






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 1 '17 at 15:32









marc_s

7,09053849




7,09053849










asked Jul 29 '16 at 19:15









Louis-AlexLouis-Alex

61




61





bumped to the homepage by Community 11 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community 11 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.










  • 1





    Your DBA should be configuring the backups for the development, test, and production DB needs, I'd talk with them about it. Otherwise, sign onto the SQL Server instance as SA or reset the SA password if you're able to and have access to the server to log into the server as the local or domain admin and look over these suggestions here: superuser.com/questions/1103850/…

    – Pimp Juice IT
    Jul 30 '16 at 2:48











  • Yeah, good suggestion !! I will give it a try !!

    – Louis-Alex
    Jul 30 '16 at 2:53













  • Was my suggestion of any use to you or have you given any a try yet?

    – Pimp Juice IT
    Jul 30 '16 at 23:04











  • @PIMP_JUICE_IT I will let you know for sure when i'll test on monday, at work...... :-)

    – Louis-Alex
    Jul 30 '16 at 23:34











  • As I thought, without any permission, I get that message : Msg 15151, Level 16, State 1, Server XXXXX/XXXXX, Line 1 Cannot alter the login 'sa', because it does not exist or you do not have permission. Another idea :-) ?

    – Louis-Alex
    Aug 1 '16 at 13:00
















  • 1





    Your DBA should be configuring the backups for the development, test, and production DB needs, I'd talk with them about it. Otherwise, sign onto the SQL Server instance as SA or reset the SA password if you're able to and have access to the server to log into the server as the local or domain admin and look over these suggestions here: superuser.com/questions/1103850/…

    – Pimp Juice IT
    Jul 30 '16 at 2:48











  • Yeah, good suggestion !! I will give it a try !!

    – Louis-Alex
    Jul 30 '16 at 2:53













  • Was my suggestion of any use to you or have you given any a try yet?

    – Pimp Juice IT
    Jul 30 '16 at 23:04











  • @PIMP_JUICE_IT I will let you know for sure when i'll test on monday, at work...... :-)

    – Louis-Alex
    Jul 30 '16 at 23:34











  • As I thought, without any permission, I get that message : Msg 15151, Level 16, State 1, Server XXXXX/XXXXX, Line 1 Cannot alter the login 'sa', because it does not exist or you do not have permission. Another idea :-) ?

    – Louis-Alex
    Aug 1 '16 at 13:00










1




1





Your DBA should be configuring the backups for the development, test, and production DB needs, I'd talk with them about it. Otherwise, sign onto the SQL Server instance as SA or reset the SA password if you're able to and have access to the server to log into the server as the local or domain admin and look over these suggestions here: superuser.com/questions/1103850/…

– Pimp Juice IT
Jul 30 '16 at 2:48





Your DBA should be configuring the backups for the development, test, and production DB needs, I'd talk with them about it. Otherwise, sign onto the SQL Server instance as SA or reset the SA password if you're able to and have access to the server to log into the server as the local or domain admin and look over these suggestions here: superuser.com/questions/1103850/…

– Pimp Juice IT
Jul 30 '16 at 2:48













Yeah, good suggestion !! I will give it a try !!

– Louis-Alex
Jul 30 '16 at 2:53







Yeah, good suggestion !! I will give it a try !!

– Louis-Alex
Jul 30 '16 at 2:53















Was my suggestion of any use to you or have you given any a try yet?

– Pimp Juice IT
Jul 30 '16 at 23:04





Was my suggestion of any use to you or have you given any a try yet?

– Pimp Juice IT
Jul 30 '16 at 23:04













@PIMP_JUICE_IT I will let you know for sure when i'll test on monday, at work...... :-)

– Louis-Alex
Jul 30 '16 at 23:34





@PIMP_JUICE_IT I will let you know for sure when i'll test on monday, at work...... :-)

– Louis-Alex
Jul 30 '16 at 23:34













As I thought, without any permission, I get that message : Msg 15151, Level 16, State 1, Server XXXXX/XXXXX, Line 1 Cannot alter the login 'sa', because it does not exist or you do not have permission. Another idea :-) ?

– Louis-Alex
Aug 1 '16 at 13:00







As I thought, without any permission, I get that message : Msg 15151, Level 16, State 1, Server XXXXX/XXXXX, Line 1 Cannot alter the login 'sa', because it does not exist or you do not have permission. Another idea :-) ?

– Louis-Alex
Aug 1 '16 at 13:00












1 Answer
1






active

oldest

votes


















0














From BOL:




BACKUP DATABASE and BACKUP LOG permissions default to members of the
sysadmin fixed server role and the db_owner and db_backupoperator
fixed database roles




The user account you are using needs to have, at a minimum, one of those permissions. db_backupoperator being the least intrusive as far as security. db_owner means you can do anything to the DB, including dropping it. Sysadmin gives you, well, control to everything on the SQL server (and more than likely the underlying server itself via xp_cmdshell, etc)






share|improve this answer























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "182"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f145380%2fvbs-script-scheduled-task-to-backup-sql-server-database%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    From BOL:




    BACKUP DATABASE and BACKUP LOG permissions default to members of the
    sysadmin fixed server role and the db_owner and db_backupoperator
    fixed database roles




    The user account you are using needs to have, at a minimum, one of those permissions. db_backupoperator being the least intrusive as far as security. db_owner means you can do anything to the DB, including dropping it. Sysadmin gives you, well, control to everything on the SQL server (and more than likely the underlying server itself via xp_cmdshell, etc)






    share|improve this answer




























      0














      From BOL:




      BACKUP DATABASE and BACKUP LOG permissions default to members of the
      sysadmin fixed server role and the db_owner and db_backupoperator
      fixed database roles




      The user account you are using needs to have, at a minimum, one of those permissions. db_backupoperator being the least intrusive as far as security. db_owner means you can do anything to the DB, including dropping it. Sysadmin gives you, well, control to everything on the SQL server (and more than likely the underlying server itself via xp_cmdshell, etc)






      share|improve this answer


























        0












        0








        0







        From BOL:




        BACKUP DATABASE and BACKUP LOG permissions default to members of the
        sysadmin fixed server role and the db_owner and db_backupoperator
        fixed database roles




        The user account you are using needs to have, at a minimum, one of those permissions. db_backupoperator being the least intrusive as far as security. db_owner means you can do anything to the DB, including dropping it. Sysadmin gives you, well, control to everything on the SQL server (and more than likely the underlying server itself via xp_cmdshell, etc)






        share|improve this answer













        From BOL:




        BACKUP DATABASE and BACKUP LOG permissions default to members of the
        sysadmin fixed server role and the db_owner and db_backupoperator
        fixed database roles




        The user account you are using needs to have, at a minimum, one of those permissions. db_backupoperator being the least intrusive as far as security. db_owner means you can do anything to the DB, including dropping it. Sysadmin gives you, well, control to everything on the SQL server (and more than likely the underlying server itself via xp_cmdshell, etc)







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jul 29 '16 at 20:27









        Kris GruttemeyerKris Gruttemeyer

        3,14311238




        3,14311238






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Database Administrators Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f145380%2fvbs-script-scheduled-task-to-backup-sql-server-database%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Discografia di Klaus Schulze Indice Album in studio | Album dal vivo | Singoli | Antologie | Colonne...

            Lupi Siderali Indice Storia | Organizzazione | La Tredicesima Compagnia | Aspetto | Membri Importanti...

            Armoriale delle famiglie italiane (Car) Indice Armi | Bibliografia | Menu di navigazioneBlasone...