Home Forums Programming Powershell Vbscript SQL and fOREFRONT TMG Help !! RE: Vbscript SQL and fOREFRONT TMG Help !!

  • Looks like the error about Firewall being an invalid object is because the script is connecting to SQL Server as a user with the wrong default database.

    You need to either:

    1) Modify the connection string to set the default database to your target database (Initial Catalog=dbname)

    or

    2) Modify the properties of the application login in SSMS to have the correct database as default.

    Also make sure you explicitly specify the schema in your inline SQL, so dbo.Firewall (or whatever your schema is), especially important when using multiple schemas.

    Post back if it works.

    ---

    Note to developers:
    CAST(SUBSTRING(CAST(FLOOR(NULLIF(ISNULL(COALESCE(1,NULL),NULL),NULL)) AS CHAR(1)),1,1) AS INT) == 1
    So why complicate your code AND MAKE MY JOB HARDER??!:crazy:

    Want to get the best help? Click here https://www.sqlservercentral.com/articles/forum-etiquette-how-to-post-datacode-on-a-forum-to-get-the-best-help (Jeff Moden)
    My blog: http://uksqldba.blogspot.com
    Visit http://www.DerekColley.co.uk to find out more about me.