Results 1 to 13 of 13
  1. #1
    Join Date
    Nov 2008
    Posts
    12

    Question Unanswered: Sybase database reload

    Greetings all,

    I am new to SQL Server 2005, I have 5-6 years of experience with SQL Server 2000. I am mainly a Sybase database guru. I have a Sybase database about 3.5GB, that I need to recreate in an empty SQL Server database. Instead of creating empty tables and using bulk copy to reload the data, is it possible to reload the Sybase database into the empty SQL Server database? If so, how? If not, what does everyone recommend? Please let me know.

    Patrick Quinn

    Carlson Wagonlit Travel DBA

  2. #2
    Join Date
    Jun 2004
    Location
    Long Island
    Posts
    696
    I don't think you are going to be able to load a Sybase DB via restore database in SQL Server. I think you are going to have to go the SSIS route, or extract DDL/create and then BCP/Bulk Load data to the tables.

  3. #3
    Join Date
    Nov 2008
    Posts
    12
    If I just installed SQL Server 2005 on my laptop and created the necessary empty tables to load the Sybase data from bcp data load files, how do I use BCP thru SQL Server to load the empty tables?

    Patrick Quinn

    Carlson Wagonlit Travel DBA

  4. #4
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Would the Sybase ASE Migration Wizard help?

    -PatP

  5. #5
    Join Date
    Jun 2004
    Location
    Long Island
    Posts
    696
    Quote Originally Posted by Pat Phelan
    Would the Sybase ASE Migration Wizard help?

    -PatP
    How About that !

  6. #6
    Join Date
    Nov 2008
    Posts
    12
    I just installed SSMA for Sybase on my laptop. When I tried to run it, the type Initializer for SSMA threw an exception and kicked me out. Has anyone seen this error before? Was I suppose to reboot my laptop? Where I can go to get past these issues?

    Patrick Quinn

    Carlson Wagonlit Travel DBA

  7. #7
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    An exception means that an error occured in the program.

    When this happens, you need to note the error carefully (screen shots help a lot with this). Check the appropriate error logs. In this case, I'd check the wizard's log, SQL Server's error log, and all of the Windows even logs.

    There is almost always a message that describes the error. The information provided about that error (both from the message on the screen and from the appropriate logs) will help us a lot as we try to help you resolve the problem.

    -PatP

  8. #8
    Join Date
    Nov 2008
    Posts
    12
    I have attached the exception error message icons. I do not see anything in any log.

    Patrick Quinn

    Carlson Wagonlit Travel DBA
    Attached Files Attached Files

  9. #9
    Join Date
    Nov 2008
    Posts
    12
    I also just found the log file for SSMA for Sybase after it threw the exception. Below is the main part of the exception report.

    Patrick Quinn

    Carlson Wagonlit Travel

    [Generic: Error] [4540/1] [2008-11-21 11:47:09]: Exception: The type initializer for 'Microsoft.SSMA.Framework.Sybase.SqlServer.Initial izer' threw an exception.
    site: Void Main(System.String[])
    source: SSMAforSybase
    at Microsoft.SSMA.GUI.Product.SybaseToMsSql.Program.M ain(String[] args)
    [Generic: Error] [4540/1] [2008-11-21 11:47:10]: Inner Exception #1: Input string was not in a correct format.
    site: Void StringToNumber(System.String, System.Globalization.NumberStyles, NumberBuffer ByRef, System.Globalization.NumberFormatInfo, Boolean)
    source: mscorlib
    at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
    at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
    at Microsoft.SSMA.Framework.Generic.SqlBase.DefaultTy peParamDescriptor.Read(XNode node)
    at Microsoft.SSMA.Framework.Generic.SqlBase.DefaultTy peDescriptor.Read(XNode node)
    at Microsoft.SSMA.Framework.Generic.SqlBase.DefaultTy peProcessor.ReadTypeDescriptors(XNode node)
    at Microsoft.SSMA.Framework.Generic.SqlBase.DefaultTy peProcessor..ctor(XNode xTypeDescriptors)
    at Microsoft.SSMA.Framework.Sybase.Generic.SybaseType Processor.get_Instance()
    at Microsoft.SSMA.Framework.Sybase.SqlServer.Types.S2 SSContainerDescriptor.get_SourceTypeProcessor()
    at Microsoft.SSMA.Framework.Generic.Converters.Types. Default.DefaultContainerDescriptor.GetSourceTypeDe scriptor(String id)
    at Microsoft.SSMA.Framework.Generic.Converters.Types. Default.DefaultTypeMappingSchemaDescriptor.Read(XN ode node, IContainerDescriptor contDescriptor)
    at Microsoft.SSMA.Framework.Generic.Converters.Types. Default.DefaultContainerDescriptor.ReadSchemaDescr iptors(XNode node, IDictionary`2 descriptors)
    at Microsoft.SSMA.Framework.Generic.Converters.Types. Default.DefaultContainerDescriptor.Read(XNode node)
    at Microsoft.SSMA.Framework.Generic.Converters.Types. Default.DefaultContainerDescriptor..ctor(XNode containerDesc)
    at Microsoft.SSMA.Framework.Sybase.SqlServer.Initiali zer.InitContainerDescriptor()
    at Microsoft.SSMA.Framework.Sybase.SqlServer.Initiali zer.Initialize()
    at Microsoft.SSMA.Framework.Sybase.SqlServer.Initiali zer..cctor()
    [Generic: Error] [4540/1] [2008-11-21 11:47:10]: System.UnhandledExceptionEventArgs
    [Generic: Assert] [4540/1] [2008-11-21 11:47:16]: Assertion failed at: at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
    at System.Environment.get_StackTrace()
    at Microsoft.SSMA.Framework.Generic.Logging.Logger.As sert(Boolean condition)
    at Microsoft.SSMA.GUI.Product.SybaseToMsSql.Program.A ppDomain_UnhandledException(Object sender, UnhandledExceptionEventArgs e)
    at Microsoft.SSMA.GUI.Product.SybaseToMsSql.Program.M ain(String[] args)
    [Generic: Error] [6132/1] [2008-11-21 11:47:29]: Exception: The type initializer for 'Microsoft.SSMA.Framework.Sybase.SqlServer.Initial izer' threw an exception.
    site: Void Main(System.String[])
    source: SSMAforSybase
    at Microsoft.SSMA.GUI.Product.SybaseToMsSql.Program.M ain(String[] args)
    [Generic: Error] [6132/1] [2008-11-21 11:47:30]: Inner Exception #1: Input string was not in a correct format.
    site: Void StringToNumber(System.String, System.Globalization.NumberStyles, NumberBuffer ByRef, System.Globalization.NumberFormatInfo, Boolean)
    source: mscorlib
    at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
    at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
    at Microsoft.SSMA.Framework.Generic.SqlBase.DefaultTy peParamDescriptor.Read(XNode node)
    at Microsoft.SSMA.Framework.Generic.SqlBase.DefaultTy peDescriptor.Read(XNode node)
    at Microsoft.SSMA.Framework.Generic.SqlBase.DefaultTy peProcessor.ReadTypeDescriptors(XNode node)
    at Microsoft.SSMA.Framework.Generic.SqlBase.DefaultTy peProcessor..ctor(XNode xTypeDescriptors)
    at Microsoft.SSMA.Framework.Sybase.Generic.SybaseType Processor.get_Instance()
    at Microsoft.SSMA.Framework.Sybase.SqlServer.Types.S2 SSContainerDescriptor.get_SourceTypeProcessor()
    at Microsoft.SSMA.Framework.Generic.Converters.Types. Default.DefaultContainerDescriptor.GetSourceTypeDe scriptor(String id)
    at Microsoft.SSMA.Framework.Generic.Converters.Types. Default.DefaultTypeMappingSchemaDescriptor.Read(XN ode node, IContainerDescriptor contDescriptor)
    at Microsoft.SSMA.Framework.Generic.Converters.Types. Default.DefaultContainerDescriptor.ReadSchemaDescr iptors(XNode node, IDictionary`2 descriptors)
    at Microsoft.SSMA.Framework.Generic.Converters.Types. Default.DefaultContainerDescriptor.Read(XNode node)
    at Microsoft.SSMA.Framework.Generic.Converters.Types. Default.DefaultContainerDescriptor..ctor(XNode containerDesc)

  10. #10
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    I don't have a machine with me that is adequately "armored" to open a *.DOC file from a stranger, so I can't see your screen shot.

    Based on the contents of the error log, it looks to me like a startup argument was provided (for the SSMA executable) that was improperly formatted.

    I'll take a look at this in more detail tonight, but you might want to try to:

    a) Run SSMA again with different parameters
    2) Remove and reinstall SSMA
    3) Install SSMA on a different machine, preferably with a different OS release.
    4) A reboot can't hurt, but probably won't help by itself.

    -PatP

  11. #11
    Join Date
    Nov 2008
    Posts
    12

    Question

    I was able to successfully load my tables using the Bulk Insert SQL command, I was hung up a little bit on finding the right delimiter. Anyways, I need to backup my database, however, I am receiving an error message when I am trying to backup the database using right-click->Task->Backup and the below SQL Backup command:

    use master
    go

    BACKUP DATABASE Intranet
    TO DISK = 'c:\SQL Backups\Intranet.Bak'
    WITH FORMAT,
    MEDIANAME = 'Intranet',
    NAME = 'First Full Backup of CSA-Intranet';
    GO

    I am receiving this error message when attempting to backup the database both ways -

    Msg 3271, Level 16, State 1, Line 2
    A nonrecoverable I/O error occurred on file "C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\Intranet.mdf:" 23(Data error (cyclic redundancy check).).
    Msg 3013, Level 16, State 1, Line 2
    BACKUP DATABASE is terminating abnormally.

    The data file for the Intranet database does exist at the C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\Intranet.mdf location. What am I missing here? Any further help would be appreciated.

    Patrick Quinn

    Carlson Wagonlit Travel DBA

  12. #12
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Something went bad within the data file itself. One or more of the data pages is corrupt so the CRC is incorrect.

    This is a problem that I almost never see (I've actually only seen it on workstations, never on a server).

    The best answer by far for your specific circumstances would be to rebuild the database from scratch using BCP. The problem can definitely be fixed, but without knowing how it occured I'd much rather avoid dealing with it than trying to fix it.

    -PatP

  13. #13
    Join Date
    Nov 2008
    Posts
    12
    The physical data device of my database was corrupted somehow. Luckily, I was able to find and replace bad sectors of the database device file using the chkdsk utility with repair option after waiting 90 minutes for chkdsk to analyze my entire laptop. Then, I was able to perform a backup of the database in question.

    Thanks for your help,

    Patrick Quinn

    Carlson Wagonlit Travel DBA

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •