f



Stored procedure in database X, executes stored procedure in database Y, wrapped in transaction?

Is it possible to execute a stored procedure in one database, which then
itself executes a stored procedure from another database?  We have decide to
split our data into a tree structure (DB1) and data blobs (DB2) (we are
using MSDE and we have a 2gb limit with each DB so we've done it this way
for that reason).  I would like to, say, execute a stored procedure in DB1,
passing in the data blob and other details, DB1 will create a tree node in
DB1 and then add the blob record to DB2.  DB1 will wrap in a transaction of
course, as will DB2 when it adds the blob.   Is this possible?


0
r.tucker (10)
9/18/2003 3:25:09 PM
comp.databases.ms-sqlserver 14567 articles. 1 followers. janinepelletier (108) is leader. Post Follow

1 Replies
716 Views

Similar Articles

[PageSpeed] 43

[posted and mailed, please reply in news]

Robin Tucker (r.tucker@thermoteknix.com) writes:
> Is it possible to execute a stored procedure in one database, which then 
> itself executes a stored procedure from another database?  We have
> decide to split our data into a tree structure (DB1) and data blobs
> (DB2) (we are using MSDE and we have a 2gb limit with each DB so we've
> done it this way for that reason).  I would like to, say, execute a
> stored procedure in DB1, passing in the data blob and other details, DB1
> will create a tree node in DB1 and then add the blob record to DB2.  DB1
> will wrap in a transaction of course, as will DB2 when it adds the blob.
>   Is this possible? 

Yes. You just call the second procedure using three-part notation:

   EXEC DB2..that_other_sp

However, if you are smart, you don't hard-code the DB name, but you
read it from some configuration table. Then you do like this:

   SELECT @sp_name = @db + '..that_other_sp'
   EXEC @sp_name

The point is that if you need a test environment on the same server, 
you don't have to change all stored procedures.


-- 
Erland Sommarskog, SQL Server MVP, sommar@algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp
0
sommar (1290)
9/18/2003 9:01:29 PM
Reply:

Similar Artilces:

Trigger: To fill another Database with using Stored Procedures of the other Database
Hello everyone, I face currently a problem where I could need some input for searching the source of the Problem System: SQL Server 9.0 I fill from Database A with triggers Database B, everything works fine. On Database B there is a Stored Procedures that checks the records and add additional information accordingly, this Stored Procedures is normally called by the application on "update and insert" in the according table. When I try to call this Stored Procedures from the Database A, the trigger does not work anymore, even if I do a try catch over the whole trigger, he never reach the Catch and the insert I try to do there to get the error message. On both Databases the user, that is taken to execute the trigger is existent and DB-Owner of both Databases. If I go and execute the Stored Procedures manually after an insert or update to Database B everything works fine. I also already tried to check on Database B if there is an insert or update from Database A and if, to execute the Stored Procedures, with the same result, nothing and all happens anymore, neither update on Database A and also not on Database B. And also I cant catch the error as the Try/Catch is not working. Hope I could explain it understandable and maybe someone remembers already having the same problem. Thanks & Best regards Pascal (pascal.baetscher@gmail.com) writes: > I face currently a problem where I could need some input for searching > the source of the Problem > >...

Database Database Database Database Software Cheap
Database Database Database Database Software Cheap Great Datase Software See Website Below. Ultra Easy to Learn (Typically 30 Seconds) Professional Programmable Database Ver. 2.3 2.1 Million Record Capacity, (New cond). Search Rate: 2000 / Records / Second. DataBase Type: Random Access. Can Create Unlimited Databases. Programmable fields for any Application. Has Six Seperate Field Sets All Programmable. Build Time One Second, (Auto Creates DB). Setup Time: Instantly, Just Enter DB Name. Ultra Cheap Price, Special $20, Paypal Accepted. Application Mailed Instantly (file Attached Email). http://www.vehiclerepair.org/dbPro/dbpro.html ...

Database Database Database Database Software Cheap
Database Database Database Database Great Datase Software See Website Below. Ultra Easy to Learn (Typically 30 Seconds) Professional Programmable Database Ver. 2.3 2.1 Million Record Capacity, (New cond). Search Rate: 2000 / Records / Second. DataBase Type: Random Access. Can Create Unlimited Databases. Programmable fields for any Application. Has Six Seperate Field Sets All Programmable. Build Time One Second, (Auto Creates DB). Setup Time: Instantly, Just Enter DB Name. Ultra Cheap Price, Special $20, Paypal Accepted. Application Mailed Instantly (file Attached Email). http://www.vehiclerepair.org/dbPro/dbpro.html ...

Storing all stored procedures in one database to minimize different connection strings
In order to minimize the number of connection strings I have to use to access different databases on the same Sql Server, I was considering storing all stored procedures in just one database. I want to do this because connection pooling in my application - ASP.NET is based on this connection string. So if I need to access 6 different databases on one sql server & set 6 different connection strings, I end up creating 6 different connection pools. Other than it might create more management work for the DBA, are there any performance implications with implementing this scheme? Do stored procedures run any slower if they access tables that are stored in different databases within the same server? Any comments/suggestions are appreciated. TIA, Minh Tran Minh Tran (minhtran_01@yahoo.com) writes: > In order to minimize the number of connection strings I have to use to > access different databases on the same Sql Server, I was considering > storing all stored procedures in just one database. I want to do this > because connection pooling in my application - ASP.NET is based on > this connection string. So if I need to access 6 different databases > on one sql server & set 6 different connection strings, I end up > creating 6 different connection pools. > > Other than it might create more management work for the DBA, are there > any performance implications with implementing this scheme? Do stored > procedures run any slower if they ...

a database, is a database, is a err database
How many times can we see the same request from someone who wants to access data from a 'pick' database through what has come to be 'standard' practices (odbc, oledb) and still get the same old sloppy ' buy this proprietary utility (and above all, my services)' answer. I think most of these pick flavors should have some sort of layer (by now!) to handle this; If someone needs to do this, the service is really 'education' i.e to show them how. Lets cut the shit now and stop with this tired and silly BS and sad marketing schlock. Regards, -Jim Jim wrote: > How many times can we see the same request from someone who wants to > access data from a 'pick' database through what has come to be > 'standard' practices (odbc, oledb) > and still get the same old sloppy ' buy this proprietary utility (and > above all, my services)' answer. I think most of these pick flavors > should have some sort of layer (by now!) to handle this; If someone > needs to do this, the service is really 'education' i.e to show them > how. Lets cut the shit now and stop with this tired and silly BS and > sad marketing schlock. > > Regards, > > -Jim Jim who? I wonder? What is this? An attack on capitalism? Providing services for those who perhaps lack the time, skill, or knowledge to perform such tasks is hardly a crime. Maybe "standard" odbc and...

Execute database to Excel exportation stored procedure from VB
Hi, I have created two stored procedures via VB using this code: sql =3D "CREATE PROC " & nombre_proc & " AS SELECT *" & _ " From MBM_PUNTOS_SCE_SIN_COINCIDIR_SIEGE_FALTA_PM_NE_" & mes & _ " WHERE (((IDU) Like 'czz*' Or (IDU) Like 'cam*' Or (IDU) _ Like 'szz*' Or (IDU) Like 'J*' Or (IDU) Like 'G*' Or (IDU) _ Like 'U*'))" & " ORDER BY IDU;" conexion.Execute sql sql =3D "CREATE PROC " & nombre_proc & " AS SELECT *" & _ " From MBM_PUNTOS_SCE_SIN_COINCIDIR_SIEGE_FALTA_PM_NE_" & mes & _ " WHERE (((IDU) Like 'czz*' Or (IDU) Like 'cam*' Or (IDU) _ Like 'szz*' Or (IDU) Like 'J*' Or (IDU) Like 'G*' Or (IDU) _ Like 'U*')=3DFALSE)" & " ORDER BY 1;" conexion.Execute sql If I open the Access database, the first stored procedure returns 123 records and the second returns 2 records, so both procedures seem to work fine. I then try to export the records to an Excel sheet via VB: origen =3D nombre_proc conexion.Execute _ "SELECT * INTO [Excel 8.0;DATABASE=3D" & NombreArchivo & _ "].[" & NombrePesta=F1a & "] FROM " & "[" & origen & "]" The result is the following: - When I run the above code for the...

How to FAST and EASY ENCRYPTION ALL Stored Procedure in my MS-SQL Database ?
My MS-SQL 2000 Database have 50 more Stored Procedure . How to FAST and EASY ENCRYPTION ALL Stored Procedure in my MS-SQL Database? (mickyang@gmail.com) writes: > My MS-SQL 2000 Database have 50 more Stored Procedure . > > How to FAST and EASY ENCRYPTION ALL Stored Procedure in my MS-SQL > Database? I assume that you have the source code in files. Use a text editor that supports Find/Replace with regular expressions. Open all files in the editor. The change " AS *$" to " WITH RECOMPILE AS" in all files. Good text editor to use is TextPad, http://www.textpad.com. I would also recommend that you keep a backup directory, and use a compare merge/tool that permits you easily undo false positives. An excellent tool for this is Beyond Compare, http://www.scootersoftware.com. If you want something more robust, you would need to write a program that parses the file. Hardly worth it, if you only have 50+ procedures. -- Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se Books Online for SQL Server 2005 at http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx Books Online for SQL Server 2000 at http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx ...

Stored procedure from stored procedure
Is it possible to create a stored procedure from a stored procedure? When I attempt this inanity, it doesn't blow up until syntax error at the first "end procedure" statement of the SP I'm trying to create within the outer SP. Can this be done? Using IDS 7.31-UC4 on Solaris 2.7/Intel (don't ask). On 24 Sep 2003 11:47:09 -0700, red_valsen@yahoo.com (Red Valsen) wrote: >Is it possible to create a stored procedure from a stored procedure? >When I attempt this inanity, it doesn't blow up until syntax error at >the first "end procedure" statement of the SP I'm trying to create >within the outer SP. Can this be done? > >Using IDS 7.31-UC4 on Solaris 2.7/Intel (don't ask). Write it out to flatfile and execute the create from command line using dbaccess??? John Carlson wrote: > On 24 Sep 2003 11:47:09 -0700, red_valsen@yahoo.com (Red Valsen) > wrote: > > >>Is it possible to create a stored procedure from a stored procedure? >>When I attempt this inanity, it doesn't blow up until syntax error at >>the first "end procedure" statement of the SP I'm trying to create >>within the outer SP. Can this be done? >> >>Using IDS 7.31-UC4 on Solaris 2.7/Intel (don't ask). > > > Write it out to flatfile and execute the create from command line > using dbaccess??? As John said, somewhat obliquely, there is...

Assessment of Database Stored Procedures
I am attempting to compile a list of questions that will enable me assess 'at risk' stored procedures that need to be remediated in order to minimize unplanned downtime and enhance database performance. Is there a subset of criteria (parameters) from the MS SQL Server Best Practices Analyzer that can be used for this purpose? Any pointers to the appropriate documentation is most welcome. Thanks in advance. It depends what you class as acceptable criteria. It depends on the nature of the stored procedures. For example, if it's a simple SELECT statement , returning it in 6 seconds may be to slow for the end user., and could point to something else being the problem. Check http://www.sql-server-performance.com/articles_audit.asp for a systematic approach -- Jack Vamvas ___________________________________ Need an IT job? <a href="http://www.itjobfeed.com">uk it jobs</a> "Umar Reyi" <iyerra@indiatimes.com> wrote in message news:1177366044.733092.100680@y80g2000hsf.googlegroups.com... >I am attempting to compile a list of questions that will enable me > assess 'at risk' stored procedures that need to be remediated in order > to minimize unplanned downtime and enhance database performance. Is > there a subset of criteria (parameters) from the MS SQL Server Best > Practices Analyzer that can be used for this purpose? Any pointers to > the appropriate documentation is most welcome. > > T...

Strange behaviour when executing procedure on remote database from procedure
Hello, following situation: I open database "localdatabase" with dbaccess and execute the following procedure: PROCEDURE f_test (p_1 INTEGER) RETURNING INTEGER; DEFINE l_error; CALL remotedatabase@remoteserver:f_test(p_1) RETURNING l_error; RETURN l_error; END PROCEDURE; which gives the following error: 206: The specified table (invekos.t_fmass) is not in the database. 111: ISAM error: no record found the table invekos.t_fmass is of course not defined in "localdatabase" but in "remotedatabase". I tought that if i call a procedure on a remote database server, the procedure is executed in the context of the remote database (implicitly changing connection to remote server)? Is this not true. Trying the same with ESQL/C works of course. An ESQL/C program with default connection to "localdatabase" will process the call to f_test on the remotedatabase server without any problems. Greetins, Joerg ...

EXcel sheet into database with stored procedure
Hi, What is the syntax of storing the content of an Excelsheet in a predefined table with a stored prcedure. Arno de Jong, The Netherlands. A.M. de Jong (arnojo@wxs.nl) writes: > What is the syntax of storing the content of an Excelsheet in a predefined > table > with a stored prcedure. As I don't use Excel much with SQL Server, I went to http://www.google.com and entered: Excel INSERT "SQL Server" and god a couple of hits. The first one is a blog entry from SQL Server MVP Dejan Sarka: http://solidqualitylearning.com/blogs/dejan/archive/2005/03/12/441.aspx. This should get you started. -- Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se Books Online for SQL Server 2005 at http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx Books Online for SQL Server 2000 at http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx ...

Changing Database within a stored procedure
I need to create a stored procedure in the master database that can access info to dynamically create a view in another database. It doesn't seem like it should be very hard, but I can't get it to work. Here's an example of what I want to do. CREATE PROCEDURE create_view @dbname sysname AS BEGIN DECLARE @query varchar(1000) SELECT @query = 'use ' + @dbname + ' go CREATE VIEW ........' EXEC(@query) END In this case, I get an error with the word "go". Without it, I get a "CREATE VIEW must be the first statement in a batch" error. I tried a semicolon in place of "GO" but that didn't help either. Thanks "Bruce" <sandell@pacbell.net> wrote in message news:595024a5.0404122312.e0cf00f@posting.google.com... > I need to create a stored procedure in the master database that can > access info to dynamically create a view in another database. It > doesn't seem like it should be very hard, but I can't get it to work. > Here's an example of what I want to do. > > CREATE PROCEDURE create_view @dbname sysname > AS > BEGIN > DECLARE @query varchar(1000) > SELECT @query = 'use ' + @dbname + ' go CREATE VIEW ........' > EXEC(@query) > END > > In this case, I get an error with the word "go". Without it, I get a > "CREATE VIEW must be the first statement in a batch" error. I tried a > semicolon...

Inter-database stored procedures and permissions
Hello all, this is my second post to this newsgroup. It's a question about stored procedures and permissions and how these behave between databases. Here's the scenario. I have a database that stores information for a system "A", and I have a different database on the same SQL server that stores the login and other info "LOGIN". I write a stored procedure in the "A" database that checks some tables in the "LOGIN" database, let's call this "SP_A". Additionally I have a user account that accesses all appropriate stored procedures in "A" called "USER_A", and the same for the "LOGIN" database, "USER_LOGIN". Here's the part that raised my curiosity. I log into the server via Query Analyzer using the "USER_A" account. I run "SP_A" which does a join between some table in "A" and another table in "LOGIN". I give "USER_A" execute permission on "SP_A", then I try to run "SP_A" and get an error: SELECT permission denied on object '(table in "LOGIN" database)', database '(real name of "LOGIN")', owner 'dbo' Huh? how come I need to assign additional select permissions in this database if I'm not doing an actual select statement? I'm not even dynamically running a select statement through an exec function. This just struck me as odd, seeing as how I never expli...

Database Database Database Software Cheap
Database Database Database Database Software Cheap Great Datase Software See Website Below. Ultra Easy to Learn (Typically 30 Seconds) Professional Programmable Database Ver. 2.3 2.1 Million Record Capacity, (New cond). Search Rate: 2000 / Records / Second. DataBase Type: Random Access. Can Create Unlimited Databases. Programmable fields for any Application. Has Six Seperate Field Sets All Programmable. Build Time One Second, (Auto Creates DB). Setup Time: Instantly, Just Enter DB Name. Ultra Cheap Price, Special $20, Paypal Accepted. Application Mailed Instantly (file Attached Email). http://www.vehiclerepair.org/dbPro/dbpro.html ...

Oracle Database and JavaMail in Stored Procedure?
Can I access JavaMail from the Oracle Database (not the App Server)? I am new to Java in Oracle database - any exampl,es out there of using JavaMail from Oracle (say, from a stroed procedure?) In answer to my own question, I have gotten JavaMail to work from an Oracle Stored procedure. There is an execellent walk thru of just such a thing in wrox Press 'Oracle 9i Java Programming'. Works quite easily actually. ...

Stored procedure access remote database
Hi, I am trying to write a stored procedure that can access a table on a remote database to insert some data on the calling server. Stored procedure would reside on Server A, establish some sort of database link to Server B, query the remote table, switch context back to the local server and insert data into a local table. Is this possible? What should I be searching for to get more information on how to do this? Any help is appreciated. Cliff On Mar 26, 4:44 pm, "Cliff Martin" <cliff.mar...@gmail.com> wrote: > Hi, > > I am trying to write a stored procedure that can access a table on a > remote database to insert some data on the calling server. > > Stored procedure would reside on Server A, establish some sort of > database link to Server B, query the remote table, switch context back > to the local server and insert data into a local table. > > Is this possible? What should I be searching for to get more > information on how to do this? > > Any help is appreciated. > > Cliff Wouldn't you better just issue insert into <local_table> select * from <table>@remote_db directly? What you describe is very inefficient. Look into the Distributed database manuals for further info. -- Sybrand Bakker Senior Oracle DBA > Wouldn't you better just issue > insert into <local_table> > select * > from <table>@remote_db > ...

stored procedure to create new database
Is there a stored procedure installed by sql server 2000 that I can call and just pass in the name of a new database and have it create the database for me? If not, how do I do it in sql? Thanks. "geoff" <cakewalkr7@hotmail.com> wrote in message news:bf5dd49d.0402271016.b8f3255@posting.google.com... > Is there a stored procedure installed by sql server 2000 that I can > call and just pass in the name of a new database and have it create > the database for me? If not, how do I do it in sql? Thanks. This is one way: declare @newdb sysname set @newdb = 'NewDatabase' exec('create database ' + @newdb) See CREATE DATABASE in Books Online for full syntax. Simon ...

Getting database size: a stored procedure to do it......
As I had real problems working my head around sp_spaceused, I've written an SP to do it (I also noted a lot of questions about this when "searching"). Pass in a database name and it will return the size of the database as a float (ie. 0.75 for 0.75mb). Update usage set to 1 indicates the DB should update its size information before giving you the result. Anyway, comments appreciate. ALTER PROCEDURE dbo.proc_BL_Get_Space_Used @DatabaseName NVARCHAR(54), @updateusage BIT, @Size REAL OUTPUT AS BEGIN DECLARE @dbsize DECIMAL(15,0) DECLARE @bytesperpage DECIMAL(15,0) DECLARE @pagesperMB DECIMAL(15,0) DECLARE @Error INTEGER DECLARE @ExecString NVARCHAR(256) DECLARE @ParmString NVARCHAR(128) SET @Error = 0 /* Update usage for this database. */ IF @updateusage = 1 BEGIN DBCC UPDATEUSAGE (@DatabaseName) WITH NO_INFOMSGS SET @Error = @@ERROR END SET NOCOUNT ON /* Work out the database size. */ IF @Error = 0 BEGIN SET @ExecString = 'SELECT @dbsize = SUM ( CONVERT ( DECIMAL ( 15 ), SIZE ) ) FROM ' + @DatabaseName + '.dbo.sysfiles WHERE (status & 64 = 0)' SET @ParmString = '@dbsize DECIMAL(15,0) OUTPUT' EXECUTE sp_executesql @ExecString, @ParmString, @dbsize OUTPUT SET @Error = COALESCE ( NULL...

Copy stored procedures to another database
I have 2 databases, one that we use called MyShop and one that I develop on called TestShop. After I have a stored procedure working the way I want in TestShop , is there a way to just copy the SP to the other database without the copy and paste method?. Same if I have a new table. Any way to add it in without recreating it in the MyShop database? I am using Sql Server 2000 Thanks Andy "Andy" <andy@shirtshackomaha.com> wrote in message news:0JRNc.4$oA5.1@okepread05... > I have 2 databases, one that we use called MyShop and one that I develop on > called TestShop. > After I have a stored procedure working the way I want in TestShop , is > there a way to just copy the SP to the other database without the copy and > paste method?. Same if I have a new table. Any way to add it in without > recreating it in the MyShop database? > I am using Sql Server 2000 > > Thanks > Andy > > If you're in Query Analyzer, just change the database name from the drop-down at the top of the screen and run the script again. But hopefully you're storing your procedure code in some sort of source control system, so you can take the current version from source control, and execute it against the other database using osql.exe for example. This is easy to automate when you need to deploy to multiple target databases and/or servers. The same applies to tables and other objects, of course. Simon ...

database performance (ie stored procedures.
I do a number of transaction oriented queries such as: select top 1 * from data_table where (([field_name]='data_value') AND ([identity]>6556)) Now would this be possible as a stored procedure: find_eq(data_table, field_name, data_value, 6556) and have the stored procedure execute the select and give me back the results. If possible would it be benefitial from a performance standpoint? Thank, David (quincy451@yahoo.com) writes: > I do a number of transaction oriented queries such as: > select top 1 * from data_table where (([field_name]='data_value') AND > ([identity]>6556)) > > Now would this be possible as a stored procedure: > find_eq(data_table, field_name, data_value, 6556) > > and have the stored procedure execute the select and give me back the > results. > > If possible would it be benefitial from a performance standpoint? Yes and no. First, it's important to understand that you cannot pass table or column names as parameters to stored procedure. (Well you can, but then you would have to build the SQL string in the stored procedure, and you would be back where you started.) So you would have to have one procedure per table and column. This may sound clunky to you, but this is exactly where performance comes in. Say that you have these two procedures: CREATE PROCEDURE get_this_data @data_value varchar(20), @ident int AS SELECT TOP 1 col1, col2, col3 ...

Stored Procedure querying another database
Hello, I need to come up with a stored procedure that will allow me to read data from another database. The database I need to read the data from is a UniData residing on a Unix server. The stored procedure needs to reside on my sql 2005 server. The task is very simple in Access as we have ODBC connections set up to the UniData via Informix (or IBM) UniData ODBC drivers. I can easily combine my UniData and Sql Server tables from within access. However, I can't seem to find a way to replicate the same behavior in MS SQL Stored Procedure without the use of Access. Is that even possible? Thanks, Marek On Feb 6, 1:25 pm, "mkarb...@gmail.com" <mkarb...@gmail.com> wrote: > Hello, > > I need to come up with a stored procedure that will allow me to read > data from another database. The database I need to read the data from > is a UniData residing on a Unix server. The stored procedure needs to > reside on my sql 2005 server. The task is very simple in Access as we > have ODBC connections set up to the UniData via Informix (or IBM) > UniData ODBC drivers. I can easily combine my UniData and Sql Server > tables from within access. However, I can't seem to find a way to > replicate the same behavior in MS SQL Stored Procedure without the use > of Access. Is that even possible? > > Thanks, > > Marek Linked server or OPENROWSET In SQL Server 2005 Books Online see the topic: Distributed Queries On Feb ...

calling a stored procedure from a stored procedure
Hi Folks, I'm trying to define a (I thought) trivial stored procedure (SP) as a front-end to the standard SP "dbms_system.set_ev", which I want to use to generate a 10046 tracing event. I'm trying to execute the following PL/SQL: create or replace procedure rob_enable_tracing ( sid in integer, serial in integer ) is begin dbms_system.set_ev(sid, serial, 10046, 4, ''); end; and getting the error: PLS-00201: identifier 'DBMS_SYSTEM.SET_EV' must be declared If I provide the schema in which "set_ev" is defined, in this case "SYS", as in: create or replace procedure rob_enable_tracing ( sid in integer, serial in integer ) is begin sys.dbms_system.set_ev(sid, serial, 10046, 4, ''); end; I get: PLS-00201: identifier 'SYS.DBMS_SYSTEM' must be declared Any suggestions? thanks, RU On May 10, 1:25 pm, RU <r...@vakuum.de> wrote: > Hi Folks, > > I'm trying to define a (I thought) trivial stored procedure (SP) as > a front-end to the standard SP "dbms_system.set_ev", > which I want to use to generate a 10046 tracing event. I'm trying > to execute the following PL/SQL: > > create or replace procedure rob_enable_tracing ( > sid in integer, > serial in integer > ) > is > begin > dbms_system.set_ev(sid, serial, 10046,...

Create database link from inside a stored procedure
Hi there - if an Oracle account that has privileges to create a database link tries to run a stored procedure owned by the same account and whilst connected to the same account, why should one get an "insufficient privileges" error / what privileges might be required? e.g. 15:49:22 SQL> create database link mylink 2 connect to a identified by b using 'c' ; Database link created. But the same statement in an "execute immediate" inside a stored procedure gets an ORA-01031: insufficient privileges Thanks for any pointers. -- jeremy We use Oracle 9iR2 on Solaris 8 with the Oracle HTTP Server and mod_plsql jeremy, generally speaking for user A to place any SQL that he or she can run successfully in SQLPlus into stored code and have it work, user A must have a direct grant of the necessary privilege to him or her rather than having inherited that privilege through a role. HTH -- Mark D Powell -- Jeremy wrote: > Hi there - if an Oracle account that has privileges to create a database > link tries to run a stored procedure owned by the same account and > whilst connected to the same account, why should one get an > "insufficient privileges" error / what privileges might be required? > > e.g. > > 15:49:22 SQL> create database link mylink > 2 connect to a identified by b using 'c' ; > > Database link created. > > > But the same statement i...

How to ad a store procedure with a programm to a access database?
The problem is, if I odbc connect to the database then my CreateQueryDef calls are only temporary, and not stored in the Database. What I want is to add a stored procedure (view) to the Database that it remains there and I can use it. All I have seen, there is no real possibility to do this? Have you a tip or link how to do this. I need a solution, the way is not the thing. I code C++ with C++ Builder 5, but I can use VB Script too if this would be the way. So if you can help me, I would be appreciated. thanks ...

Web resources about - Stored procedure in database X, executes stored procedure in database Y, wrapped in transaction? - comp.databases.ms-sqlserver

Transaction cost - Wikipedia, the free encyclopedia
Bargaining costs are the costs required to come to an acceptable agreement with the other party to the transaction, drawing up an appropriate ...

Mike Schroepfer, Colin Stretch, Mark Zuckerberg Detail Facebook Stock Transactions
... and CEO Mark Zuckerberg submitted Form 4 filings to the Securities and Exchange Commission Wednesday detailing their Facebook stock transactions. ...

Unilever’s charitable app uses Timeline and subscription billing; Facebook agrees to take only 5 percent ...
... this week, including subscription payments and the new Open Graph-enabled Like action . Betapond says Facebook agreed to take a 5 percent transaction ...

Transaction Network Services - LinkedIn
Learn about working at Transaction Network Services. Join LinkedIn today for free. See who you know at Transaction Network Services, leverage ...

New Service Mines 120 Million Consumers' Card Transactions for Marketer Insights
... online to help advertisers target and measure ad campaigns, more companies than ever are creating new revenue streams from offline transactional ...

There's a name for that pang of jealousy you get from seeing people's Venmo transactions
Ever feel inexplicably jealous and sad all because of your friends' Venmo transactions? There's now a name for that reaction. Mic has dubbed ...

Renewables Account For Lion’s Share Of Energy Transactions In 2015
Renewables accounted for the lion’s share of all power and utility transactions during 2015, according to a new report from EY. EY’s new report, ...

Mizuho Bank eyes blockchain to speed international securities transactions
... the type and number of financial instruments being traded, the amount due and the currency used, the country of settlement, and the transaction ...

Apple Pay only makes half as much per transaction in China
Apple Pay may have finally launched in China, but it seems that Apple flinched first in its negotiations with Chinese banks over their adoption ...

Salesforce Shield Activity Monitor Gains Transaction Security Feature
... original Salesforce Shield software monitors unauthorized access to sensitive data, but Salesforce is taking the idea step further with Transaction ...

Resources last updated: 3/22/2016 10:46:42 AM