A bracket device (26, 200, 300) adapted to mount a slide rail to a rack, the bracket device (26, 200, 300) comprising: a bracket (32, 206, 306) coupled with the slide rail and configured to mount the slide rail to the rack, the bracket (32, 206, 306) comprising a side wall (36, 308) and at least one mounting member adjacent to the side wall (36, 308); and a fastening member (34, 210, 310) pivoted to the bracket (32, 206, 306) by a shaft member and configured to lock the rack at a locked position, wherein when the fastening member (34, 210, 310) is located at a position, a fastening portion of the fastening member (34, 210, 310) is adjacent to the at least one mounting member; when the fastening member (34, 210, 310) is not located at the position, the fastening portion of the fastening member (34, 210, 310) is away from the at least one mounting member; wherein the bracket (32, 206, 306) comprises two protruded lugs, the at least one protruded lug has a guiding feature, the guiding feature is an elongated hole and oriented identically to a length direction of the slide rail, such that the fastening member (34, 210, 310) is movable relative to the bracket (32, 206, 306) along the length direction of the slide rail, the fastening member (34, 210, 310) is mounted to the guiding feature by the shaft member being disposed through a portion of the guiding feature; characterized in that the bracket (32, 206, 306) comprises a first structure (42, 202, 302) arranged next to the two protruded lugs along the length direction of the slide rail, and the fastening member (34, 210, 310) comprises a second structure (44, 204, 304); wherein when the fastening member (34, 210, 310) is located at the locked position, the second structure (44, 204, 304) is constrained between the two protruding portions (42a, 42b) of the first structure (42, 202, 302), so as to be configured to prevent the fastening member (34, 210, 310) from moving along an axis direction of the shaft member by means of the second structure (44, 204, 304) abutting between the two protruding portions (42a, 42b) of the first structure (42, 202 302). a bracket (32, 206, 306) coupled with the slide rail and configured to mount the slide rail to the rack, the bracket (32, 206, 306) comprising a side wall (36, 308) and at least one mounting member adjacent to the side wall (36, 308); and a fastening member (34, 210, 310) pivoted to the bracket (32, 206, 306) by a shaft member and configured to lock the rack at a locked position, wherein when the fastening member (34, 210, 310) is located at a position, a fastening portion of the fastening member (34, 210, 310) is adjacent to the at least one mounting member; when the fastening member (34, 210, 310) is not located at the position, the fastening portion of the fastening member (34, 210, 310) is away from the at least one mounting member; wherein the bracket (32, 206, 306) comprises two protruded lugs, the at least one protruded lug has a guiding feature, the guiding feature is an elongated hole and oriented identically to a length direction of the slide rail, such that the fastening member (34, 210, 310) is movable relative to the bracket (32, 206, 306) along the length direction of the slide rail, the fastening member (34, 210, 310) is mounted to the guiding feature by the shaft member being disposed through a portion of the guiding feature; characterized in that the bracket (32, 206, 306) comprises a first structure (42, 202, 302) arranged next to the two protruded lugs along the length direction of the slide rail, and the fastening member (34, 210, 310) comprises a second structure (44, 204, 304); wherein when the fastening member (34, 210, 310) is located at the locked position, the second structure (44, 204, 304) is constrained between the two protruding portions (42a, 42b) of the first structure (42, 202, 302), so as to be configured to prevent the fastening member (34, 210, 310) from moving along an axis direction of the shaft member by means of the second structure (44, 204, 304) abutting between the two protruding portions (42a, 42b) of the first structure (42, 202 302).