I have just started getting an error stating:
You do not have permission for all objects in the Database: '<dbname>'
SQL Prompt can only make limited suggestions if you do not have sufficient permissions.

SQL Prompt could not retrieve all schema information for Database:'<dbname>'

followed by this detail ...

Exception of type 'System.OutOfMemoryException' was thrown.

System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
at System.String.CreateStringFromEncoding(Byte* bytes, Int32 byteLength, Encoding encoding)
at System.Text.UnicodeEncoding.GetString(Byte[] bytes, Int32 index, Int32 count)
at System.Data.SqlClient.TdsParserStateObject.ReadString(Int32 length)
at System.Data.SqlClient.TdsParser.ReadSqlStringValue(SqlBuffer value, Byte type, Int32 length, Encoding encoding, Boolean isPlp, TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.ReadSqlValue(SqlBuffer value, SqlMetaDataPriv md, Int32 length, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlDataReader.ReadColumnData()
at System.Data.SqlClient.SqlDataReader.ReadColumn(Int32 i, Boolean setTimeout)
at System.Data.SqlClient.SqlDataReader.GetValueInternal(Int32 i)
at System.Data.SqlClient.SqlDataReader.GetValue(Int32 i)
at System.Data.SqlClient.SqlDataReader.get_Item(Int32 i)
at RedGate.SqlPrompt.Cache.Candidates.DatabaseCandidateBase.a(SqlDataReader , IDictionary`2 , IDictionary`2 , IDictionary`2 )
at RedGate.SqlPrompt.Cache.Candidates.DatabaseCandidateBase.a()

I am logged in with an account that is a server admin so permissions should not be an issue. Neither the database or SQL prompt have ever presented this problem previously.

Jonathan
fatherjack2
0

Comments

10 comments

  • fatherjack2
    Getting this more and more ...
    Message text says '...do not have permission ...'

    Error detail says:
    Exception of type 'System.OutOfMemoryException' was thrown.

    System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
    at System.Data.SqlClient.SqlBuffer.get_Value()
    at System.Data.SqlClient.SqlDataReader.GetValueInternal(Int32 i)
    at System.Data.SqlClient.SqlDataReader.GetValue(Int32 i)
    at System.Data.SqlClient.SqlDataReader.get_Item(Int32 i)
    at RedGate.SqlPrompt.Cache.Candidates.DatabaseCandidateBase.a(SqlDataReader , IDictionary`2 , IDictionary`2 , IDictionary`2 )
    at RedGate.SqlPrompt.Cache.Candidates.DatabaseCandidateBase.a()
    fatherjack2
    0
  • fatherjack2
    Just emailed support@redgate.com with txt file as out of Memory now occurring in SSMS Object Details viewer.

    Edit:
    SQL Prompt4 has totally ceased to prompt whilst editing SQL

    Edit2:
    5 mins later - Perhaps predictably, SSMS has now crashed.

    Jonathan
    fatherjack2
    0
  • Anu D
    Thanks for your email.
    We will look into the issue and get back to you soon.
    Anu D
    0
  • fatherjack2
    OK, rebooted and all was fine. WAS fine!

    now have unhandled exception:

    Error Message:
    Unhandled exception has occurred in a component in your application. If you click Continue, the application will ignore this error and attempt to continue.

    Object reference not set to an instance of an object.

    Error Detail:
    ... is 558 lines long. Where should I send it?

    I chose Continue ...
    repeated error message box displays

    had to crash out of sql file (hit esc and click on close button for sql file alternately and you get in between error messages).

    SQL file was 2812 lines long and had been drag/dropped from windows explorer to SSMS empty query window
    Jonathan
    fatherjack2
    0
  • tanya
    Hi Jon,

    Can you send us a snapshot of this database using Red Gate SQL Compare and tell us what your system RAM size is?

    Can you try to disable SQL Prompt and see if you are able to work fine on SSMS using the same database and script?

    Sorry for the inconvenience this issue has caused.

    Thanks,
    Tanya
    Project Manager
    Red Gate Software Ltd
    tanya
    0
  • fatherjack2
    Tanya,
    System:
    Core2 Duo 2.33
    4GB RAM (although is 32bit so only 3.25 used)

    since I closed the offending sql file SSMS has worked fine with SQL Prompt working well too.

    Will send db schema in due course

    Jonathan
    fatherjack2
    0
  • fatherjack2
    Tanya,
    I'm afraid to say that I have been declined permission to send you the database schema by the vendors. :(

    Jonathan
    fatherjack2
    0
  • fatherjack2
    OK, a little more on the way to get the error:
    Open SSMS
    Connect to server
    open windows explorer to locate sql file
    drag file into ssms
    select database from drop down list
    click into script and descend through script to line 1154.

    moving to line 1155 causes the Microsoft .Net Framework error message box and the unhandled exception with Details and Continue buttons
      -Whilst below 1155 the message box returns whenever the cursor is moved up, down, left or right (by keyboard or mouse). -Once the cursor moves above 1155 the errors do not appear. -If the SSMS application loses focus to another application the errors do not reappear until the focus returns to SSMS

    I hope this helps track the bug a little.

    Is the error detail worth sending?
    Edit:-
    the error actually only pops up when in the script editor section, nothing happens when the cursor is in the results section, in the toolbars or object browser
    Jonathan
    fatherjack2
    0
  • tanya
    Hi Jon,

    Thank you for all the details provided and your patience.
    If you could provide me with the following information, it would be very useful.
    Does this happen all the time with any given database connection or is it only against a specific database? Can you let me know the size of the database that is causing the problem?
    Also is the exception to do with a specific SQL file by any chance? If yes, does this SQL file have any cross database or linked server references in the script?

    Thanks again for your patience:)

    Regards,
    Tanya
    Project Manager
    Red Gate Software Ltd
    tanya
    0
  • fatherjack2
    Hi Tanya,

    At the moment I can confirm that the problems are only evident when I am connected to one particular database and open one particular script (as I need to execute that script on this database!).
    I have not tried connecting to a different database with the problem query but I can run other queries against the 'problem' database without the error.

    The database stats are:
    293 tables
    Size:
    reserved
    11029648 KB

    data
    5365056 KB

    index_size
    5447928 KB

    unused
    216664 KB
    fatherjack2
    0

Add comment

Please sign in to leave a comment.