SQL Server 2005 Express other users can't see stored procedures - sql-server

I added a couple of stored procedures to a SQL Server 2005 database at our company. The database uses Windows Authentication. Other users cannot see the procedures, although they can view the database/tables/stored procedures using SQL Server Management Express. What am I missing?

Make sure you grant execute permissions to the SPs:
GRANT EXECUTE ON [sp name] TO [user/role]

Related

Only members of the sysadmin fixed server role can perform this operation. Azure SQL Server Database vs SQL Server Database

I am moving from the "Classic" SQL Server Database On-Premise to Azure SQL Server Database, Unfortunately, One of the procedures that I used to execute is not working for Azure SQL Server Database:
EXEC sp_removedbreplication "Database Name"
Got the following error using the SQL ADMIN user:
Only members of the sysadmin fixed server role can perform this
operation.
However, I tried grant the "sysadmin" role via proc, but no success.
EXEC sp_addrolemember 'sysadmin', 'sqladmin';
Cannot alter the role 'sysadmin', because it does not exist or you do
not have permission.
I could not find any Server Role directory via SQL SERVER Management studio
If you check out the docs for sp_removedbreplication you will see that only boxed SQL Server editions and Azure SQL Managed Instance supports that stored procedure, not Azure SQL Database.
You can see in this table what types of replications Azure SQL Database supports.

Create view in Oracle SQL Developer from Microsoft SQL Server Management Studio

I have two databases; SQL Server uses SSMS to connect and Oracle DB uses Oracle SQL Developer to connect.
I want to create a view in Oracle database from SSMS.
I tried this code in SSMS:
CREATE VIEW LINKDB_ORACLE..user_oracle.ViewCreate_OnOracle
AS
SELECT UserId, UserName
FROM [dbo].[Users]
When I run this query, I get this error:
The object name 'LINKDB_ORACLE..user_oracle.ViewCreate_OnOracle' contains more than the maximum number of prefixes. The maximum is 2.
How to I can query data from SQL Server use Oracle SQL Developer, if not use view method above.
I use SQL Server 2012 and Oracle 12c
You can't use this syntax, it will be easier to create all views using Oracle Tools.
From Microsoft documentation:
A view can be created only in the current database. The CREATE VIEW must be the first statement in a query batch.
Create-view-transact-sql
If you have to use SSMS, you can try syntax:
EXEC ('CREATE VIEV...') AT linked_server
If you want to see SQL Server data from Oracle database, then check this post:
Oracle equivalent for linked server

Backup and restore database along with user/group/roles and permissions in sql server 2005

We are having some problem in server hosting SQL server 2005. We are required to take backup of all the databases and restore the same once the
window 2003 server and sql server 2005
is reinstalled.
We also need to restore all the users/groups/roles and permissions as it is which were there earlier.
Please guide the steps.
The database securables are backed up with the database.
What you will have to do is to script and recreate the logins. If the logins are SQL Server logins (not the windows logins, ie), the trick is to create them with the same SIDs as before to avoid orphaned database users (this can bi fixed manually, but it's much easier to recreate the same-SID logins).
Here's the article on MS support describing the procedure in detail:
https://support.microsoft.com/en-us/kb/918992

Connect to MS SQL server from PL/SQL Developer

I have PL/SQL Developer installed on my machine.
Version:-7.1.2
I want to connect to MS sql server from PL/SQL Developer. I have SQL server address, username and password with me.
I tried to search for the solution every possible way.
Can anybody help me with this?
You cannot. Directly from their web page (emphasis mine):
PL/SQL Developer is an Integrated Development Environment that is specifically targeted at the development of stored program units for Oracle Databases.
To connect to MS SQL Server from your desktop you need SQL Server Management Studio (free), Azure Data Studio (free), Toad for SQL Server ($$$), or another client that advertises connectivity to SQL Server.
open sql server from server objects add a linked servers to oracle
add stored procedure that will insert into the table in oracle and reads from sql table.
example:
INSERT INTO OPENQUERY (ERPTEST, 'SELECT EMPLOYEE_ID,FIRST_NAME FROM EMPLOYEE')
select Employee_Number,Full_Name_1 from [EmpDB].[dbo].[EMPLOYEES];

SQL Server: Is there a way to grant execute using GUI?

Is there a way to grant execute permissions for a role or a user using GUI (not T-SQL)? I'm using SQL Server 2008 SP1.
Yes, there is a way. Use Permissions page of Database Properties window.
Once database properties windows is displayed, follow steps 1-4 and press OK.
Using steps A, B you can verify it is creating exactly the expected GRANT EXECUTE TO command.
Check out Microsoft SQL Server Management Studio.
It is part of the SQL Server Client Tools package but there's also a free version called Microsoft SQL Server Management Studio Express.
Related resources:
How to grant Permissions on a Stored Procedure (SQL Server Management Studio)
Permissions (SQL Server Database Engine)

Resources