I have a ##table which can be accessed across all the sessions but sometimes I am getting error
There is already an object named \'##table\' in the
There is already an object named '##table' in the database.
You would typically get this error if you are doing a CREATE Table statement which would obviously fail as '##table' already exists in the database.
Seems to me that maybe at some point in your code, the CREATE TABLE logic for this global table is being invoked again leading to this error.
Do the have the details of the exact statement that results in this error?