xp_create_subdir() returned error 183, 'Cannot create a file when that file already exists.'

  • Using the below xp to create folder to a network share. But getting error:-

    EXECUTE master.dbo.xp_create_subdir @chkdirectory

    Msg 22048, Level 16, State 1, Line 0

    xp_create_subdir() returned error 183, 'Cannot create a file when that file already exists.'

    Is this purely a permission issue or something else? Please suggest

    Thanks.

  • what is passed as the @chkdirectory parameter

  • Shared path. It is properly passed as s variable, I verified.

    Thanks.

  • what happens if you pass that path manually as a test? exec xp_create_subdir '..testpath..'

  • Same failure.

    Thanks.

  • have you tried the same thing on another server just to test? exactly how is the path written? I don't need to see dir names or drives just X:\\XXXX\XXX for example. any dots ('.') in the path?

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply