Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Output of system stored procedure to temp table

Author  Topic 

frank.svs
Constraint Violating Yak Guru

368 Posts

Posted - 2010-05-18 : 07:50:24
Hi,

Am trying to load the output of a stored procedure into a table. But i am encountering strange error. I dont know why this error is coming.
But the data is getting into the temp table. Would like to know the reason for the below error.

Error

Server: Msg 3013, Level 16, State 1, Line 1
BACKUP LOG is terminating abnormally.
Server: Msg 3021, Level 16, State 1, Line 1
Cannot perform a backup or restore operation within a transaction.



Below are the two way's i used to populate a temp table but in both cases the same error.
Note: My database is in FULL recovery model.


Method-1
-----------
SELECT *
-- INTO #MyHead
FROM OPENROWSET('SQLOLEDB','Server=(local);Trusted_Connection=Yes;Database=db1',
'Set FmtOnly OFF; EXEC sp_MSdependencies N''dbo.tname'', null, 1315327')

Method-2
--------
create table #tmp2 (
otype varchar(10),
oObjName varchar(100),
oOwner varchar(30),
oSequence varchar(10)
)
insert into #tmp1 EXEC sp_MSdependencies N'dbo.tname', null, 1315327


Any suggestions would be greatly appreciated.

Thanks in Advance.

frank.svs
Constraint Violating Yak Guru

368 Posts

Posted - 2010-05-19 : 02:57:00
Added @intrans = 1 to the below command it worked fine.


create table sample (
otype varchar(10),
oObjName varchar(100),
oOwner varchar(30),
oSequence varchar(10)
)
insert into sample EXEC sp_MSdependencies N'dbo.tname', null, 1315327, @intrans = 1
Go to Top of Page
   

- Advertisement -