The method that all user tables in the Sybase database are authorized to assign to a specified user

Source: Internet
Author: User
Tags sybase sybase database

The method that all user tables in the Sybase database are authorized to assign to a specified user

Scenario: The Sybase database is backed up from the server and restored to the local development computer, and the login account SA has object permissions for all tables in the database, but there are no user table queries, modifications, deletions, and so on, so a re-authorization is required.

Example Description: Set the default database login account sa password is 123456, the operation of the database named Jscms, login account sa corresponding to the JSCMS user name is dbo, the user group is public, the role is sa_role. So the volume licensing script can give users, groups, roles. In this example, the public group is authorized.

Operation Steps:

1. Start-run-open DOS operation interface


2. Log in to the Sybase database and switch to the specified database:

c:\users\administrator>isql-usa-p123456

1> Use Jscms

2> Go


3. Generate Volume Authorization script

1> Select ' Grant Select,insert,delete,update on ' + name + ' to public ' from sysobjects where type = ' U ' ORDER by name

2> Go


4. Volume Licensing script Processing


Repeat two times by right-clicking the Select All menu and then using CTRL + V to copy the text in the DOS window into Notepad


Process the script in Notepad and add a line of go to each authorization statement


5. Copy the processed script into the DOS window and execute


6. Inspection authorization Result



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.