Can't immediately connect to newly-created SQL Server database

后端 未结 4 1656
傲寒
傲寒 2021-01-12 00:25

I\'m creating a database using SQL Server Management Objects.

I wrote the following method to generate a database:

public static void CreateClientDat         


        
4条回答
  •  抹茶落季
    2021-01-12 00:39

    The database name" requested by the login. The login failed. Login failed for user 'the user'

    One thing to note here all is that the error message is surrounding security. How are you attempting to logon to the new database (i.e. what type of security is the connection string using for the new database connection)? If you are using SQL authentication you will need to issue sp_adduser to grant the login access to the database.

    http://msdn.microsoft.com/en-us/library/ms181422.aspx

提交回复
热议问题