A slide rail assembly for a server, configured to be mounted to a first post and a second post (38, 216), the slide rail assembly comprising: a rail element having a first part; a first bracket connected to the rail element and configured to be detachably mounted to the first post; characterized by: a bracket device (34, 200) connected to the rail element and configured to be detachably mounted to the second post (38, 216), the bracket device (34, 200) comprising: a second bracket (58, 206); a hook (62, 218) pivoted to the second bracket (58,206), the hook (62, 218) having a first leg (92, 220) and a second leg; and a locking element (60, 202) operatively engaged with the second bracket (58, 206), the locking element (60, 202) having a disengagement feature and a supporting feature (84, 222) for abutting against the first leg (92, 220) of the hook (62, 218) in order to hold the hook (62, 218) at a close position relative to the second post (38, 216); and an extension element (54, 204) connected to the locking element (60, 202), the extension element (54, 204) having a disengagement part and a second part facing toward the first part of the rail element, wherein the extension element (54, 204) is configured to be driven by the rail element to move when the first part abuts against the second part; wherein when the first bracket is detached from the first post, and the disengagement part of the extension element (54, 204) abuts against the disengagement feature of the locking element (60, 202) to operatively disengage the locking element (60, 202) from the second bracket (58, 206), the supporting feature (84, 222) of the locking element (60, 202) no longer abuts against the first leg (92, 220) of the hook (62, 218), and the supporting feature (84, 222) is configured to push the second leg of the hook (62, 218) to rotate the hook (62, 218) away from the close position. a rail element having a first part; a first bracket connected to the rail element and configured to be detachably mounted to the first post; a bracket device (34, 200) connected to the rail element and configured to be detachably mounted to the second post (38, 216), the bracket device (34, 200) comprising: a second bracket (58, 206); a hook (62, 218) pivoted to the second bracket (58,206), the hook (62, 218) having a first leg (92, 220) and a second leg; and a locking element (60, 202) operatively engaged with the second bracket (58, 206), the locking element (60, 202) having a disengagement feature and a supporting feature (84, 222) for abutting against the first leg (92, 220) of the hook (62, 218) in order to hold the hook (62, 218) at a close position relative to the second post (38, 216); and a second bracket (58, 206); a hook (62, 218) pivoted to the second bracket (58,206), the hook (62, 218) having a first leg (92, 220) and a second leg; and a locking element (60, 202) operatively engaged with the second bracket (58, 206), the locking element (60, 202) having a disengagement feature and a supporting feature (84, 222) for abutting against the first leg (92, 220) of the hook (62, 218) in order to hold the hook (62, 218) at a close position relative to the second post (38, 216); and an extension element (54, 204) connected to the locking element (60, 202), the extension element (54, 204) having a disengagement part and a second part facing toward the first part of the rail element, wherein the extension element (54, 204) is configured to be driven by the rail element to move when the first part abuts against the second part; wherein when the first bracket is detached from the first post, and the disengagement part of the extension element (54, 204) abuts against the disengagement feature of the locking element (60, 202) to operatively disengage the locking element (60, 202) from the second bracket (58, 206), the supporting feature (84, 222) of the locking element (60, 202) no longer abuts against the first leg (92, 220) of the hook (62, 218), and the supporting feature (84, 222) is configured to push the second leg of the hook (62, 218) to rotate the hook (62, 218) away from the close position.