I have written a script that loops through a list of SQL Server machines, then the databases inside of the server, then tables. Problem is that I'm currently just using a "use database" command to change to the next database, but for some reason it's not working. I get the message
[Microsoft][ODBC SQL Server Driver][SQL Server]Changed database context to 'tempdb'.
(Source: Microsoft OLE DB Provider for ODBC Drivers)
(SQL State: 01000)
(NativeError: 5701)
No Help file available
that it's changed, but right after that statement I do a select SELECT DB_NAME() AS DatabaseName and display it and the database has not changed.
Any ideas???
Thanks in advance.
[Microsoft][ODBC SQL Server Driver][SQL Server]Changed database context to 'tempdb'.
(Source: Microsoft OLE DB Provider for ODBC Drivers)
(SQL State: 01000)
(NativeError: 5701)
No Help file available
that it's changed, but right after that statement I do a select SELECT DB_NAME() AS DatabaseName and display it and the database has not changed.
Any ideas???
Thanks in advance.