New answers tagged

0

The argument to callproc needs to be a list of parameters. Therefore, if you pass in abc=json.dumps(stringObject) cursor.callproc('insert_usr_details_in_all_tables', abc) It will split the string. Instead use: cursor.callproc('insert_usr_details_in_all_tables', [abc,])


0

Per the knowledge base, SELECT privileges on mysql.proc is sufficient.


0

When non sysadmins execute the SP everything works except for adding users to the database roles with error: Cannot alter the role 'db_datareader', because it does not exist or you do not have permission. According to the ALTER ROLE documentation: Additionally, to change the membership in a fixed database role you need: Membership in the db_owner fixed ...


2

You can't get the original source back. DBA_SOURCE, ALL_SOURCE, and USER_SOURCE are data dictionary views. So you can do something like select line, text from user_source where name = 'GET_OS_USER' and type = 'FUNCTION'; That will show you the wrapped text of the function. But the point of wrapping your source code is to prevent users that have ...


0

Check what the default database for that login is, and on the job, in which database the job is set to run. If it is a member of sysadmin, the only way it can fail to login is if the login is disabled, if the default database or database specified in the connection attempt does not exist (or is not online, or set to single user), or if rights to the default ...


1

Please add more details. I assume T-SQL job step type here. If you use something else (cmdexec, SSIS, Powershell), then let us know. Agent service account is always sysadmin with the connection it uses to SQL Server. A job owned by a sysadmin will result in that Agent by default will execute as itself, i.e., sysadmin. A sysadmin can do everything, everywhere....


1

The probable reason I can think is when u execute manually it might be because you are executing with login with privileges or access to execute that proc. However sql agent job might be using the account assigned to run sql agent services. Hence you see the error for login failed. Probably check the error log when failure happens to get more details on that ...


0

You can get information about the views from INFORMATION_SCHEMA.VIEWS SELECT TABLE_SCHEMA, TABLE_NAME, VIEW_DEFINITION FROM INFORMATION_SCHEMA.VIEWS If you want to place the view in another schema (database in MySQL), replace TABLE_SCHEMA above.


Top 50 recent answers are included