Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ORACLE TO SQL SERVER MIGRATION-Invoking Stored Procedures

Status
Not open for further replies.

vibhor

Programmer
May 19, 2003
1
IN
I am in the process of migrating a database from Oracle 8i to SQL Server. In Oracle, one does not need to give a fully qualified function name( eg. dbname.fnname(); ) for invoking a function whereas the SQL Server requires me to give a fully qualified name. The problem is that I hardcode the dbname because it can change. Is there a way to invoke a function/stored procedure in SQL Server without attaching dbname with it?
 
Stored procedures do not need to be called using the database name or owner name, nor do system functions. User-defined functions need to be called with the user name if they return a scalar value, but not if they return a table.

It is a good practice to make all objects owned by dbo, then you do not have permission problems and it is easy to qualify th user-functions or to use the full part name when calling a stored procedure, function, view or table from a different database than the one you are using.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top