Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12

Vbscript SQL and fOREFRONT TMG Help !! Expand / Collapse
Author
Message
Posted Friday, May 18, 2012 9:11 AM


SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Thursday, August 22, 2013 9:13 AM
Points: 496, Visits: 601
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??!

Want to get the best help? Click here http://www.sqlservercentral.com/articles/Best+Practices/61537/ (Jeff Moden)
My blog: http://uksqldba.blogspot.com
Visit http://www.DerekColley.co.uk to find out more about me.
Post #1302612
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse