开发者

SSIS Exec T-Sql Statement Task connection string

I dragged Execute t-sql statement task from toolbox. clicked new and created new connection. when i executed, it executed successfully. there was no db showing in con开发者_Python百科 string.

i changed the connection string to point to new server of above in Connection tab. when i executed it, i recv errr

Description: Executing the query "DBCC SHRINKFILE (AppDB_log,300);" failed with the following error: "Could not locate file 'AppDB_log' for database 'master' in sys.database_files. The file either does not exist, or was dropped. ". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly. End Error

DBCC Shrinkdatabase command i am using.


Try running the query directly in SSMS in the database where you think it will be run based on your connection. If it fails then it's probably a problem with the query (i.e. the data file really doesn't exist). If it succeeds then it's probably a problem with your connection.

If it's a problem with the connection, try running profiler on your server and see what pops up when you run the SSIS package.


Copuld it be a permissions problem? Do you have the rights to run the command on that database?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜