Backup DB from PB script on MS SQL 2008

Hi,
I need to run backup DB from PB script on MS SQL 2008.
Sample code:

string ls_dump
ls_dump = 'BACKUP DATABASE DBNAME TO DEVICE'
EXECUTE IMMEDIATE :ls_dump USING sqlca;

Everything works fine on MS SQL 2005 and lower, but on SQL
2008 I get error 3013 "BACKUP DATABASE is terminating
abnormally."

When I run this command in SQL Management Studio, it works.

I'm using PB7.

Please help,
thanks
Homer
0
Homer
1/13/2011 1:46:55 PM
sybase.powerbuilder.general 62418 articles. 11 followers. Follow

1 Replies
868 Views

Similar Articles

[PageSpeed] 46

<Homer> wrote in message news:4d2f024f.3e76.1681692777@sybase.com...
> Hi,
> I need to run backup DB from PB script on MS SQL 2008.
> Sample code:
>
> string ls_dump
> ls_dump = 'BACKUP DATABASE DBNAME TO DEVICE'
> EXECUTE IMMEDIATE :ls_dump USING sqlca;
>
> Everything works fine on MS SQL 2005 and lower, but on SQL
> 2008 I get error 3013 "BACKUP DATABASE is terminating
> abnormally."
>
> When I run this command in SQL Management Studio, it works.
>
> I'm using PB7.

I suggest you run the MS Profiler and observe the application statements. 
It may be that a "useful" error is occurring but is hidden from the 
application.  Since it is highly unlikely that your database name is 
"dbname" and the backup device name is "device", it may help to see the 
actual statement that is executed.  There might be some additional 
information in the sql server error log, since the 3013 error is the often 
the last in a chain of errors.

If you are using the MSS native driver, that may be the source of the 
problem.  MSS has been deprecated for over a decade and has not been 
enhanced to support current versions of sql server.  It may be that this 
arrangement simply won't work.  You might try using a different type of 
connection, such as odbc.

Lastly, always post the version and build of PB that you are using as well 
as the values you use to populate SQLCA when connecting. 


0
Scott
1/13/2011 2:01:24 PM
Reply:

Similar Artilces:

Transfering tables and data from one MS SQL DB to another MS SQL DB
I need to transfer tables and data from one SQL DB to another SQL DB. I know it can be done with Server Management Studio and I have searched Studio and Help but can't find any info on the database migration wizard. Hi,jayd  Follow This Link U can Get Help From This For Ur Case    http://forums.asp.net/t/1352620.aspx   PLZ MARK AS ANSWER IF IT HELP U. THANKS. RAGHAV MVP ASP/ASP.Net Read My Blog MARK THE POST AS ANSWER IF IT HELPS U. "Success doesn't come to you…you go to it."--Marva Collins "Success does not come to those who w...

Call a MS SQL Server 2000 stored procedure in PB 8 via a PB script and Datawindow
I tried to call a stored procedure with owner name "sbs" via PB script and datawindow.Also I tried different way to call it, using ownername.procname, procname, and dbname.ownername.procname. But nothing works. it Always say something is not a parameter of the proc. The error message did not show the owner name as a part of the proc call. so I think that somehow the owner name wasn't sent to SQL 2000 server. if I changed the owner name to dbo, it works! so my question is how we let PB send the whole name(including owner name) of the proc to SQL 2000 server to get it sol...

Problems with db-library and ODBC using with MS SQL Server ver 7.0 PowerBuilder ver 6.5. And OLE-DB for Microsoft OLAP Services
There are many problems when running the aplication using the new ODBC driver for SQL ver 7. Simple, does not work. It�s any patch to this problem ? Using DB Library makes poor query plans in some case using SQL Server 7.0. It�s any path ? It�s any patch or utility to use OLE-DB for connecting Microsoft OLAP Services ? Carlos Lara darsa@solnet.com.mx ...

PB 7 and MS SQL 2008
I have a PB 7 app with a native connection to a MS SQL 2000 database. What is the best practice connection to MS SQL 2008? I made an ODBC connection but get the following error when Executing a stored procedure. SQLSTATE =22005 [Microsoft][ODBC SQL Server Driver] Invalid character value for cast specification. Can anybody help me? The best practice would be to upgrade PowerBuilder to the current version - 11.5. PowerBuilder 7 came out in 1999 and was end-of-lifed sometime in 2003. That being said, have you tried OLE DB? I am using it with SQL Server 2005 and PowerBuilder 9 ...

JDBC working with MS SQL 2008 DB
hello, after setting up / migrating a JDBC-Driver (RemoteLoader on Windows 2008 R2 with SQL 2008) I get the following error, when I want to migrate Users into my id-vault: DirXML Log Event ---- Driver = \LABOR-VAULT\SERVICES\DriverSet\JDBCDriver Thread = Subscriber Level = error Message = <description>Unable to process query. Unable to select row(s) from table/view 'dbo.T_IDM': *Unsupported SQL type '-15'*.</description> Has anybody experience with the ms-sql2008 database? Do I need to create a "custom descriptor file for JDB...

PIPELINE - PB10
Hello All, We are converting our PB apps to version 10. Thanks to the posts on this site we have been successful setting OLE DB connections and everything appeared to be working fine. I just noticed that at least one of my pipes is not working correctly. It is truncating 1 character off of a field. This worked fine when we were going from sql 7 to sql 7 but when I connect to one server running ms sql 7 and the other using ms sql 2000 using a data pipe in PB 10 it is cutting off a char??? This one blows my mind because there is no script??? We had to make changes to trim s...

PB 10.5 with MS SQL Server 2008
Later next year, we are looking to upgrade our SQL Server 2005 databases to SQL Server 2008. We are currently using PowerBuilder 10.5. Will this version of PowerBuilder work with SQL Server 2008? Note: we use ODBC for our connection to database. Thanks. Linda Butler Hi Linda; In my experience with SS2008 thus far - the ODBC connectivity from 10.5.2 works the same as SS2005. For SNC access though, I had to use PB 11.5's newer driver for proper interoperability. HTH -- Regards ... Chris ISUG - NA RUG Director http://chrispollach.pbdjmagazine.com ...

Powerbuilder application with MS SQL Server DB performance
Hi friends, I am using PowerBuilder 7 and MS SQL Server 2000, Oracle 9i as back end. I have comlaints from my clients who are using MS SQL Server that application hangs or slow down when other user gets reports. Any help in this regard will be apprieciated. Have a nice day! thanks Nasir You're probably getting locking conflicts. Oracle is row locking and doesn't place shared lock on queries by default, so it's not quite as susceptible. You might look at the Lock attribute for the connection and/or issuing commits after your retrieves to clear the locks....

PB 10.5 and MS SQL Server 2008
Hi folks, having no experience using MS SQL server I wonder hor to connect PB 10.5 IDE and applications to a MS SQL Server 2008 database? Found MDAC and installed it but what are the next steps? Something special to install from the PB CD? What exactly is the SQL Server 2008 client software? Cannot find something to download and install. TIA Chris Werner Here's the ODBC vs OLEDB ways that our PB10 application uses to connect to any MSS db. (DBParm all one one line) [Profile MSS_OLEDB_Sample] ; where <driver> is one of; ; 2008 native client SQLNCLI10 ...

Can't backup databases on MS-SQL 2008
 Hi, I'm trying to conduct a simple backup through MS SQL Management Studio but keep getting the same error (I've copied the error here in red).Does anybody knows what to do?Thanks,  TITLE: Microsoft SQL Server Management Studio------------------------------Backup failed for Server 'xxxxx'.  (Microsoft.SqlServer.SmoExtended)For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.0.1300.13+((SQL_PreRelease).080207-2350+)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&...

Installing MS SQL Server 2008 Express with Advanced Services to work with MS VWD 2008 Express Edition
Hi, I am trying to use ASP.Net in MS Visual Web Developer 2008 Express Edition. I initially had MS SQL Server 2005 Express Edition on my computer before installing the MS Visual Web Developer 2008 Express Edition. When I try to connect to the asp membership database, I get an error message. I then uninstalled the MS SQL 2005 Express and the VWD 2008 Express. I installed MS SQL Server 2008 Express with Tools and reinstalled the VWD 2008 Express edition with SP1, but I got the same error. Now I am an absolute beginner, I am thinking that maybe I don't know what I am doing. I have uni...

Nested Cursor in PB using MS SQL SERVER as db
Hi, I am migrating PB/ASA application to PB/ SQL Server 2000. I have a nested frontend cursor used to populate a treeview control as below. Declare cr_dept_id Cursor For Select dept_id, dept_name From t_department_master(nolock) Where dept_id <> :gi_dept_id And dept_id > 0; Open cr_dept_id; Fetch cr_dept_id Into :li_dept_id, :ls_dept_name; l_iCount1 = 1 Do While SQLCA.SQLCODE = 0 ll_handle = tv_items.InsertItemSort( par_hand, ls_dept_name, 1 ) l_iCount1++ //inner cursor for retrieving individual accounts from accounts table ...

OLE DB Problems, PB 7, MS-SQL 7
Since one month, we used PB 7.0 with SP 1 and MS SQL 7.0 with SP1. For the connection, we used OLE DB but I discovered that sometimes the connection was OK sometimes not. We have SQL 6.5 and SQL 7.0 drivers installed on each machine. Another problem is that we have got a lot of GPF because PB is not able to use OUTER JOIN with OLE DB. If I read BOL for SQL 7.0 he said that the new native driver for SQL 7.0 is the OLE DB driver ... Does anybody know how to fix the problem (outer join and stability) or if I have to use a different driver. If yes, witch one and with what parameters. T...

OLE DB Problems, PB 7, MS-SQL 7 #3
Since one month, we used PB 7.0 with SP 1 and MS SQL 7.0 with SP1. For the connection, we used OLE DB but I discovered that sometimes the connection was OK sometimes not. We have SQL 6.5 and SQL 7.0 drivers installed on each machine. Another problem is that we have got a lot of GPF because PB is not able to use OUTER JOIN with OLE DB. If I read BOL for SQL 7.0 he said that the new native driver for SQL 7.0 is the OLE DB driver ... Does anybody know how to fix the problem (outer join and stability) or if I have to use a different driver. If yes, witch one and with what parameters. T...

Web resources about - Backup DB from PB script on MS SQL 2008 - sybase.powerbuilder.general

Game backup device - Wikipedia, the free encyclopedia
A game backup device , formerly usually called a copier and more recently a flash cartridge , is a device for backing up ROM information from ...

SocialSafe Adds Backup Support For Video On Instagram
SocialSafe added Video on Instagram to the list of social media content that it allows users to back up, and backups of videos from the Facebook-owned ...

Titanium Backup (@TitaniumBackup) on Twitter
Log in Sign up You are on Twitter Mobile because you are using an old version of Internet Explorer. Learn more here Titanium Backup @ TitaniumBackup ...

Can you explain the gist of why Tape Backups saved the day for Google?
Answer (1 of 3): I realize this question is old, but someone just brought it to my attention as a question of the assumptions in the existing ...

Backup Contacts + Share for iPhone, iPad, and iPod touch on the iTunes App Store
Get Backup Contacts + Share on the App Store. See screenshots and ratings, and read customer reviews.

Backup: the Christmas gift that keeps on giving
A reliable file backup regime is the perfect gift for someone who could lose everything these holidays.

Police backup flown in to Christmas Island as detention centre unrest continues
Extra federal police have been flown to Christmas Island to help secure the detention centre amid reports of widespread rioting by detainees. ...

Nomad’s latest iPhone accessory combines a wallet and backup battery
... to recharge your iPhone on the go. As the name suggests, the Wallet for iPhone combines a standard mens leather bifold wallet with a backup ...

Backup to the cloud using the regular Acronis True Image 2016
Everyone needs a solid, reliable backup solution, and Acronis True Image 2016 is one of the best when it comes to backing up everything from ...

The NBA's Best Backups at Every Position
NBA reserves have a more-guts-than-glory gig that often features changing work conditions and an evolving responsibility list...

Resources last updated: 12/13/2015 5:11:26 PM