Use a For Each loop to iterate through the database connections. Use data flows inside the For Each loop to copy the data.
You might want to start with the SSIS tutorials in Books Online, if this is your first time using SSIS.
sqlUse a For Each loop to iterate through the database connections. Use data flows inside the For Each loop to copy the data.
You might want to start with the SSIS tutorials in Books Online, if this is your first time using SSIS.
sqlMS-SQL 2005, C# 2.0
I will have many client databases that will be updated. When they are updated I need to transfer some of that data to a central Server database somewhere on the Internet. Note, schemas do not necessarily match.
Transfering the data (Web Services, Remoting) is not a problem.
What I am looking for is a cool, correct, advisable way, for the client database to notify me of an Insert, Update or Delete. I can then initiate the connection to the Server and 'push' the data (maybe pull some back from the Server too).
Obviously Triggers may be a place to start... But I need to know 'external to the database' that an update has happened or can I send the data from within the SQL Server assembly?
Anyone have any ideas or a technique, maybe something new in SQL Server 2005 (all databases will be 2005), for acheiving this? Just so I don't go down the 'wrong' path...
There are some BLOB's involved (1-2 page PDF's), if that makes a difference.
I envisage that the process transfering the data will be a Windows Service running on each client. The connection may not always be available, so some kind of 'to do' list of outstanding data to be transfered is required.
I'm just starting on this, so any pointers would be great, I'm sure it's all been done before ;)
Thanks
Rob.
One interesting technique to consider would be using triggers and service broker. When an insert, update or delete occurs, send a message via service broker to your central server informing it of the change along with whatever data is necessary to identify it. The central server can then asynchronously receive and process the message.
Dan
So I have a number of separate databases on my SQL 2005 Server.
I also have a number of Reports in SSRS.
Many of the stored procedures in the various databases reference tables, functions, and stored procedures in other databases on the same server.
How can I accomplish the effect of right clicking on a stored procedure for instance, clicking view dependencies, and having everything show up in that list, not just the items in that DB?
It is all stored in the database in one form or another, but I must be missing some crucial piece to integrating it all together.
Note: I did not design this system, just maintaining and modifying existing items. There are no schemas to speak of. SSRS will most likely move to a dedicated server at one point with other data warehousing functions, so the ability to span servers would be useful.
Thanks!
Matt
Mhmm, I think this is not possible unless you parse the procedue on your own. There are no entries for dependencies in the system tables created for non-db-local objects. Additionally you can′t use schemabinding for maintainance as schemabinding applies only to two part names.
HTH, Jens SUessmeyer.
http://www.sqlserver2005.de
|||Are there any third party tools that would combine all this information into an enterprise version of "view dependencies"?thanks|||
Hi,
Jens is correct. There is a lot of confusion about "sysdepends", so we've added a new section explaining SQL dependencies in a web refresh section of the BOL. Please read:
SQL Server 2005 Books Online
Understanding SQL Dependencies
New: 5 December 2005
http://msdn2.microsoft.com/en-us/library/ms345449.aspx
Re: " any third party tools" - A quick MSN search turned up
http://www.red-gate.com/products/sql_dependency_tracker/index.htm
which I have never used.
Regards
I am not a DBA so please be gentle...
I am trying to export all of the user and role permissions out of several databases for auditing purposes. I see the Users and Roles listed under the Security tree view when I log into the database, but I do not see an option to export or query the permissions. In addition, we do not have any tables that reference user permissions in our databases. So, how would one go about exporting or querying this information?
I've seen similar topics where they recommend querying sys tables to gather the info, but I don't see those tables either. Any help would be greatly appreciated.
All my thanks!
- Isaac
Edit: I should add in that I am connecting to 7 and 2k DBs using 2k5 SMS. Not sure if that makes a difference...
You can query the tables, such as sys.server_permissions, sys.server_principals, sys.database_principals, sys.database_permissions, to display the permissions of database user and role and logins. E.g., if you want to look at the permission of user Bob, you can query as follows
select * from sys.database_permissions where grantee_principal_id =(select principal_id from sys.database_principals where name='Bob')
We have databases with large numbers of tables. We have a separate database for each year. For various reasons, we need to export about 100 of the tables (Structure only, not their data) from last years database into this year's database. What is the best method for doing this? The import/export wizard creates the tables but does not bring in important things like keys.
Regards Shirley A
hi Shirley,
if you are using sql server 2000.
you can use the enterprise manager.
you can right click the database click on "all task" and then
click on "generate Sql scripts" then clcik on options.
click on the objects you need such as PKs, triggers and foreign keys"
for Sql server 2005 you can use the Management studio
right click the database. clcik on task. clcik on generate scripts
and check the options that you need.
after you generate the scripts run it on the new server
regards,
joey
|||
Thanks very much, that worked a treat. I used Enterprise Manager as our databases are SQL Server 2000. Regards
Shirley
I have a list of database users which I'd like to change the passwords for across the board. The SQL writers have requested an Excel file with two columns (username and password to be), but I don't know how to export the single column in either a notepad document or into excel. Any help would be appreciated.
Thanks!There are literally dozens of ways to do this. For a one time deal I'll usually just copy past the columns out of Enterprise Manager or Query Analyzer. It will paste right into Excel no problem.
If you want to get a little more fancy with it you can use an Excel query. Excel is capable of connecting directly to SQL Server and pulling down data. Check out this little article that explains the basics.
http://iis.asu.edu/ceslab/kb/excelquery.htm|||Use query analyzer
Type the following code:
Select dbo.tablename.field1, dbo.tablename.field2 from tablename
tablename as ur tablename which contain the information u required. Field1 is ur fild name.
Example: If the database has user table and it has field like employeeid, employeename, employeepassword, employeemail.
you can select ur records by the following code
Select employeename, employeepassword from user
Run this code and copy ur result to excel sheet.
or you can use Queryanalyzer-->Query Menu-->Result to fle (Then run the code and save the file.
Exporting SQL DB files