My Sybase instance fails to start.
Database log show:
00:0002:00000:00001:2015/05/12 15:51:44.51 server The transaction log
in the database 'sybsystemdb' will use I/O size of 4 Kb.
00:0002:00000:00001:2015/05/12 15:51:44.52 server Resident Node id:
926a95836174 00:0002:00000:00001:2015/05/12 15:51:44.55 server
Transaction coordinator initialized. 00:0002:00000:00001:2015/05/12
15:51:44.55 server Database 'sybsystemdb' is now online.
00:0002:00000:00001:2015/05/12 15:51:44.57 server Increase the config
parameter 'number of open databases' to avoid descriptor reuse. Reuse
may result in performance degradation. 00:0002:00000:00005:2015/05/12
15:51:44.59 server Error: 905, Severity: 17, State: 1
00:0002:00000:00005:2015/05/12 15:51:44.59 server Unable to allocate
a DBTABLE descriptor to open database 'sybsystemdb'. Close or drop
another database before opening this one, or ask your System
Administrator to raise the configuration parameter 'number of open
databases'. 00:0002:00000:00005:2015/05/12 15:51:44.59 server Error:
905, Severity: 17, State: 1 00:0002:00000:00005:2015/05/12 15:51:44.59
server Unable to allocate a DBTABLE descriptor to open database
'sybsystemdb'. Close or drop another database before opening this one,
or ask your System Administrator to raise the configuration parameter
'number of open databases'. 00:0002:00000:00005:2015/05/12 15:51:44.59
server Error: 905, Severity: 17, State: 1
00:0002:00000:00005:2015/05/12 15:51:44.59 server Unable to allocate
a DBTABLE descriptor to open database 'sybsystemdb'. Close or drop
another database before opening this one, or ask your System
Administrator to raise the configuration parameter 'number of open
databases'. 00:0002:00000:00005:2015/05/12 15:51:44.60 server Error:
905, Severity: 17, State: 1 00:0002:00000:00005:2015/05/12 15:51:44.60
server Unable to allocate a DBTABLE descriptor to open database
'sybsystemdb'. Close or drop another database before opening this one,
or ask your System Administrator to raise the configuration parameter
'number of open databases'. 00:0002:00000:00005:2015/05/12 15:51:44.60
server Error: 905, Severity: 17, State: 1
00:0002:00000:00005:2015/05/12 15:51:44.60 server Unable to allocate
a DBTABLE descriptor to open database 'sybsystemdb'. Close or drop
another database before opening this one, or ask your System
Administrator to raise the configuration parameter 'number of open
databases'. 00:0002:00000:00005:2015/05/12 15:51:44.60 server Error:
905, Severity: 17, State: 1 00:0002:00000:00005:2015/05/12 15:51:44.60
server Unable to allocate a DBTABLE descriptor to open database
'sybsystemdb'. Close or drop another database before opening this one,
or ask your System Administrator to raise the configuration parameter
'number of open databases'.
When trying to increase number of database files:
C:\>isql -Usa -P<password>
1> select count(*) from sysdatabases
2> go
1> sp_configure "number of open databases", 20
2> go
Msg 225, Level 16, State 1:
Server 'ILVQA3SYBAS157', Procedure 'sp_configure', Line 232:
Cannot run query--referenced object (name NAME NOT RECOVERABLE) dropped during
query optimization.
Sybase version:
C:\>isql -Usa -P<password>
1> select ##version
2> go
Adaptive Server Enterprise/15.7/EBF 21339 SMP SP101 /P/X64/Windows
Server/ase15
7sp101/3439/64-bit/OPT/Thu Jun 06 12:11:05 2013
Please advice,
Shay
The default number of databases per Sybase instance is 12.
Once you reached it, and created a new database (no. 13 and above), you will probably not get any error and database will be created.
The error will arrive once you bounce the instance.
To solve this, you need to edit the parameter file: C:\{Sybase Location}\{SERVERNAME}.cfg and change the value for:
number of open databases under [Meta-Data Caches] section.
Related
I could use tips on how to recover a non-standard SQL Server .bak backup file, please.
The background: we have a functioning invoicing program with over 10 years of data from a defunct provider. In past correspondence, the provider told us that the product was built on SQL Server, but never told us what version.
Our goal is to export the data from the program, reformat it, and then load it into another accounting system. The program itself does not have a complete set of export tools so we are hoping to access the data from the .bak files it creates to get all the data for importing into the new system.
I have tried the following SQL Server versions without success:
2000
2005
2008
2008 R2
2012
2014
2016
2017
I have also tried recovering with...
Microsoft SQL Server Management Studio 18 but no backup sets are listed for restoration
SysTools SQL Backup recovery but it returns "Could not identify SQL Server version for the selected .bak file."
SQL Server 2017 on a Linux machine and get the following output...
1> restore database newhouse from disk='/home/me/test.bak'
2> go
Msg 3241, Level 16, State 1, Server 8350, Line 1
The media family on device '/home/me/test.bak' is incorrectly formed. SQL Server cannot process this media family.
Msg 3013, Level 16, State 1, Server 8350, Line 1
RESTORE DATABASE is terminating abnormally.
1> restore verifyonly from disk='/home/me/test.bak'
2> go
Msg 3241, Level 16, State 1, Server 8350, Line 1
The media family on device '/home/me/test.bak' is incorrectly formed. SQL Server cannot process this media family.
Msg 3013, Level 16, State 1, Server 8350, Line 1
VERIFY DATABASE is terminating abnormally.
1> restore headeronly from disk='/home/me/test.bak' with nounload
2> go
Msg 3241, Level 16, State 1, Server 8350, Line 1
The media family on device '/home/me/test.bak' is incorrectly formed. SQL Server cannot process this media family.
Msg 3013, Level 16, State 1, Server 8350, Line 1
RESTORE HEADERONLY is terminating abnormally.
1> restore headeronly from disk='/home/me/test.bak'
2> go
Msg 3241, Level 16, State 1, Server 8350, Line 1
The media family on device '/home/me/test.bak' is incorrectly formed. SQL Server cannot process this media family.
Msg 3013, Level 16, State 1, Server 8350, Line 1
A .bak file with fictitious data is available here.
Update #1 - in reply #DavidJamesSmith
Here is what I get...
1> restore headeronly
2> from disk = N'/home/me/test.bak'
3> go
Msg 3241, Level 16, State 1, Server 8350, Line 1
The media family on device '/home/me/test.bak' is incorrectly formed. SQL Server cannot process this media family.
Msg 3013, Level 16, State 1, Server 8350, Line 1
RESTORE HEADERONLY is terminating abnormally.
Update #2 - again in reply #DavidJamesSmith
From what I can tell, the file is not encrypted. I can open the file with gHex - a hex editor in GNOME - and read the data.
As far as the question about the file being corrupted, I do not believe so. I get the same error on any .bak file created by this program whether the .bak file is on the machine that create the .bak or on another machine that I have transferred the file to.
If the file is corrupted, than the program itself is exporting a corrupted version.
Here is what I get on a fresh export running on the machine that has the account software itself.
1> use newhouse
2> restore database newhouserecovery from
3> disk = N'C:\Program Files\Microsoft SQL Server\MSSQL14.SQLEXPRESS\MSSQL\Backup\test.bak'
4> with
5> file = 1,
6> move N'test' to N'C:\Users\me\Backup\test.mdf',
7> move N'test_log' to N'C:\Users\me\Backup\test_log.ldf',
8> nounload,
9> stats = 5
10> go
Changed database context to 'newhouse'.
Msg 3241, Level 16, State 1, Server DESKTO\SQLEXPRESS, Line 2
The media family on device 'C:\Program Files\Microsoft SQL Server\MSSQL14.SQLEXPRESS\MSSQL\Backup\test.bak' is incorrectly formed. SQL Server cannot process this media family.
Msg 3013, Level 16, State 1, Server DESKTO\SQLEXPRESS, Line 2
RESTORE DATABASE is terminating abnormally.
The account software was using Microsoft SQL Server Compact 3.5 Service Pack 2.
Thanks for everyone's help and, especially #lptr for the tip that got me going down the correct track.
I tried, without success, to run a T-SQL script to Backup to URL and another one to Restore to URL on SQL Server 2017 Web Edition, which is running on Ubuntu 16.04 LTS. The credential was successfully created.
Here's an example of the T-SQL for Backup that I'm trying to run:
DECLARE #name varchar(100)
DECLARE #fileURL varchar(100)
SET #name = 'test-db'
SET #fileURL = 'https://mystorageaccountname.blob.core.windows.net/databases/test-db.BAK'
BACKUP DATABASE #name
TO URL = #fileURL
WITH CREDENTIAL = 'mycredential'
,COMPRESSION
,STATS = 5;
Here's the error that I'm getting on MSSQL Management Studio:
Msg 3292, Level 16, State 6, Line 5
A failure occurred while attempting to execute Backup or Restore with a URL device specified. Consult the operating system error log for details.
Msg 3013, Level 16, State 1, Line 5
BACKUP DATABASE is terminating abnormally.
Here's the error that I'm getting on /var/log/syslog:
#015VDI: "C:\binn\BackupToUrl.exe" "b" "p" "680074007400700073003A002F002F0073007700650065007400640061007400610062006100730065006200610063006B007500700073002E0062006C006F0062002E0063006F00720065002E00770069006E0064006F00770073002E006E00650074002F006400610074006100620061007300650073002F0068006300640061006D006F00620069006C0065002E00420041004B00" "73007700650065007400640061007400610062006100730065006200610063006B00750070007300" "01000000D08C9DDF0115D1118C7A00C04FC297EB010000008AB2169DF1DE3A45B5514DCCD09182C3000000001200000061007A007500720065006B006500790000001066000000010000200000008ECF1319A21E667E0E32E83135C57DFCAF4E3DFF2AABDA00E3E2D814B5C88D2E000000000E8000000002000020000000E9E64579DF38EA0E66886B8D454C4F4256A682A124E70D86EC0DA087112ECA0450000000F92ED8FD343DADDE9518C412CA5EAB188316B24A6A0B407CCEA9AE142A9DBC282085ABF133BFDF017A3AFA9CEB4C5039433D15FA47A64A1339F2D030ED3383C58F81A2C3634FA945B6B819F113AB22DF40000000E9CDF76A290F18299BBE99C273FCA31E4622334C645EBFE8C5AA9C4F68C1A323A2F0EED33B8F6E8D5922B5B78DE1F6DB456864A290689C98A3631EA3F62505D3" "NOFORMAT" "4D005300530051004C00530045005200560045005200" "" "DB" "68006300640061006D006F00620069006C006500" "NOTRACE"
#015BackupToUrl: couldn't load process Error Code: 80070002
#0152018-03-14 12:35:25.30 Backup Error: 3041, Severity: 16, State: 1.
#0152018-03-14 12:35:25.30 Backup BACKUP failed to complete the command BACKUP DATABASE hcdamobile. Check the backup application log for detailed messages.
Have you guys had this problem before? Do I need to install any additional package to be able to run Backup to URL on Linux?
Ive a database which was mirrored before and now its showing as principal, disconnected/in recovery and we need to restore a back up into it.
Since restore option is disabled,for that purpose I tried to remove the mirroring from MS and whole properties are shows as greyed out disabled.
I tried
alter database mydb set partner off;
which returned
The operating system returned error 21(The device is not ready.) to
SQL Server during a read at offset 0000000000000000 in file 'ldf file
path'. Additional messages in the SQL Server error log and system
event log may provide more detail. This is a severe system-level error
condition that threatens database integrity and must be corrected
immediately. Complete a full database consistency check (DBCC
CHECKDB). This error can be caused by many factors; for more
information, see SQL Server Books Online.
So I tried
alter database mydb set offline;
which returned
Msg 1468, Level 16, State 1, Line 1
The operation cannot be performed on database "mydb" because it is involved in a database mirroring session or an availability group.
Some operations are not allowed on a database that is participating in
a database mirroring session or in an availability group.
Msg 5069, Level 16, State 1, Line 1
ALTER DATABASE statement failed.
Then I tried to restore the DB from the backup file in recovery
RESTORE DATABASE Inetcat_mhra
FROM DISK = '.bak location'
WITH REPLACE,RECOVERY
which returned error
Msg 3104, Level 16, State 1, Line 1 RESTORE cannot operate on database
'mydb' because it is configured for database mirroring or has joined
an availability group. If you intend to restore the database, use
ALTER DATABASE to remove mirroring or to remove the database from its
availability group. Msg 3013, Level 16, State 1, Line 1 RESTORE
DATABASE is terminating abnormally.
I have a db which is stretch enabled in SQL server 2016 RC3.
I took local backup of that database, and restored successfully. As we know that after restore the link to Azure SQL Server will get break, therefore I am using the below mention T-SQL to resume the connectivity, additionally I am specifying #with_copy = 1, so that it create a copy of database in Azure SQL server. But below mention T-SQL always fails with error as
Copying remote database 'RDADB_A40A50B5B-386A-42C4-B19C-3C2516172CAF' to remote database 'RDADB_A_Clone74FF1F31-A689-4866-BDD1-F90D15C157BB'.
OLE DB provider "SQLNCLI11" for linked server "stretchserver-sc-server-dbstrech-20160314-114758814.database.windows.net" returned message "Query timeout expired".
Msg 7399, Level 16, State 1, Procedure sp_rda_reauthorize_db, Line 1 [Batch Start Line 5]
The OLE DB provider "SQLNCLI11" for linked server "stretchserver-sc-server-dbstrech-20160314-114758814.database.windows.net" reported an error. Execution terminated by the provider because a resource limit was reached.
Msg 7320, Level 16, State 2, Procedure sp_rda_reauthorize_db, Line 1 [Batch Start Line 5]
Cannot execute the query "CREATE DATABASE [RDADB_A_Clone74FF1F31-A689-4866-BDD1-F90D15C157BB] AS COPY OF [RDADB_A40A50B5B-386A-42C4-B19C-3C2516172CAF]" against OLE DB provider "SQLNCLI11" for linked server "stretchserver-sc-server-dbstrech-20160314-114758814.database.windows.net".
CREATE DATABASE SCOPED CREDENTIAL AzureCred WITH IDENTITY = 'AzureAdministrator',
SECRET = '****' Declare #credentialName nvarchar(128);
SET #credentialName = N'AzureCred';
EXEC sp_rda_reauthorize_db #credential = #credentialName, #with_copy = 1
Note :- I have configured the firewall of Azure SQL server to include my IP.
The create copy part is a regression. I believe the fix is still being worked on. Please file a bug on https://connect.microsoft.com/SQLServer/feedback/ if you want to track its progress. In the meantime, you can set the option to 0 or false to avoid creating a copy. If you do need to make copies, let us know what your scenario is and we'll see if we can find you temporary workarounds.
I was able to recover one ASE 12.5.2 backup file from a malware attack serve [.bk]. I created similar Device sizes and database and try to load to a new server I am getting below error. I tried with few backup files and still the same. These backup files are Not Compressed.
Tried with different servers and results is same. Can anyone help me here to over come this and restore this backup. Or does anyone know a way to repair a Sybase 12.5.2 backup file?
-------
Server Message: Number 3216, Severity 10
Server 'GF2TEST', Line 1:
Backup Server session id is: 7. Use this value when executing the 'sp_volchanged' system stored procedure after fulfilling any volume change request from the Backup Server.
Server Message: Number 401002, Severity 2
Server 'GF2TEST_BS', Procedure 'bs_read_header', Line 0:
Backup Server: 4.10.2.1: Label validation error: first label not VOL1.
Server Message: Number 603102, Severity 2
Server 'GF2TEST_BS', Procedure 'bs_read_header', Line 0:
Backup Server: 6.31.2.4: Volume rejected.
Server Message: Number 101402, Severity 2
Server 'GF2TEST_BS', Procedure 'bs_read_header', Line 0:
Backup Server: 1.14.2.2: Unrecoverable I/O or volume error. This DUMP or LOAD session must exit.
Server Message: Number 603202, Severity 2
Server 'GF2TEST_BS', Procedure 'bs_read_header', Line 0:
Backup Server: 6.32.2.3: C:\Documents and Settings\Admin\Desktop\GF2 Backup\GF225012015.bk: volume not valid or not requested (server: , session id: 7.)
Server Message: Number 101402, Severity 2
Server 'GF2TEST_BS', Procedure 'bs_read_header', Line 0:
Backup Server: 1.14.2.4: Unrecoverable I/O or volume error. This DUMP or LOAD session must exit.
Server Message: Number 8009, Severity 16
Server 'GF2TEST', Line 1:
Error encountered by Backup Server. Please refer to Backup Server messages for details.