Failed to run sql query: must be member of role "supabase_admin" showing in SQL editor - sql

How to get supabase admin role?
I am new to Sql editor So I don't know anything

Related

SQl injection getting current user and database priv

I am doing a tutorial a lab on SQL Injection.
I am stuck at retrieving the username of the current user and the priv it has.
I tried Select user FROM dual, select current_user. In SQLPlus, to get current user I will type
SQL> show user.
Question being asked:
1. Use a SQL Injection string in the Search field to get the name of the database user that the application is connecting to the database with.
2. Use a SQL Injection string in the Search field to get the system privileges granted to the user that the application is connecting to the database with.
Please help. Thanks

sql server base tables

I use SQL Server 2012.
How can select from sql server system base table such as below tables.
sys.sysschobjs
sys.sysbinobjs
sys.sysclsobjs
When I get query from base system table such as below query. get following error.
select * from sys.sysschobjs
Msg 208, Level 16, State 1, Line 1
Invalid object name 'sys.sysschobjs'.
It is doable if you used a "Database Engine Query", and an administrator user.
To do so, after you open the SQL Management Studio:
Click File Menu, "New" sub menu, and select "Database Engine Query".
In the server name, write "Admin:" before your server name (eg., if your server name is "localhost", then the full server name to be written is "admin:localhost")
Then write your credentials (for administrative account).
N.B.: Make sure that there are no other administrator logged in to the Database Engine Query other than you (I believe it is a single access point)
For more information:
http://technet.microsoft.com/en-us/library/ms178068(v=sql.105).aspx
http://zarez.net/?p=774
To query this system base tables needs a Dedicated Administrator Console (DAC).
First, connect to your database using the DAC. To do this from SQL
Server Management Studio, go to File -> New -> Database Engine Query.
Put ADMIN: in front of your instance name and click Connect.
Change to the your database using the USE [mydb]
Now you can query
select * from sys.sysschobjs
See this post for further info on this:
http://www.hackingsqlserver.com/
https://sqlblog.org/2011/11/08/t-sql-tuesday-24-dude-wheres-the-rest-of-my-procedure

Permissions in SQL Server 2008

I have created 10 database of 'Northwind' for training purpose. Suppose I have 10 students, so databases are Northwind_Student1,Northwind_Student2 etc. I would like to create separate login for each pupil, so that Student1 can only see(or can access) the data base 'Northwind_Student1'. How can I accomplish this using T-SQL or SSMS 2008 ?
You can create different users for different databases and assign permissions like below. It's for SQL 2008, but it will be same for 2005 also :
In SSMS, expand the Security tree of the server in Object Explorer and right-click Logins to choose New Login..., then add as many as needed.
Then in the Security tree of each individual database, add the login as a user of that db and grant appropriate rights.
Create 10 different logins and assign each to the database it can access.
CREATE LOGIN yourloginname WITH PASSWORD = 'yourpassword'

can not retrieve data from sql server

I can not retrieve data from db in sql server.
I use the c3p0 as the pool,this is the c3p0.properties:
c3p0.user=test
c3p0.password=123456
c3p0.jdbcUrl=jdbc:sqlserver://xxxxxx:1433;databaseName=TIMDB;SelectMethod=cursor
c3p0.driverClass=com.microsoft.sqlserver.jdbc.SQLServerDriver
c3p0.maxPoolSize=15
c3p0.testConnectionOnCheckin=true
c3p0.idleConnectionTestPeriod=3600
In the sql server,I have create a new user named test,and its default db is TIMDB,the server roles is public,and this is the user mapping:
But when I start the application,I can get nothing.
From the log created by log4j,I can get the sql used to retrieve data,but if I copy the sql to the sql management stutio and create a new query,I can retrieve some data.
I wonder why?
It looks like a permissions problem to me. If the generated SQl runs when you use it in management studio (i.e under your user account) then you know the code is good. What access have you given the user "test" from your post I see "user mapping: enter image description here"? he will need at least db_datareader and possibly more depending on what code is generated.
You could also try logging on to SQL Management studio under your "test" user and see if you can execute the code. That will eliminate the possibility that its something wrong with your application/network.

How do I create a user account in SQL Server 2000?

My project needs a SQL Server 2000 User Id and password created for an ASP.NET website. How do I create a user account in SQL Server 2000?
Basically, you'll have to run the system stored proc sp_addlogin.
See Example "A" in the link.
I've always used the SQL-Enterprise manager to create the user accounts and set the permissions for the databases and the access. See this intro tutorial.