Sunday, July 28, 2013

[SQL Server 2008 issues] SQL Query

[SQL Server 2008 issues] SQL Query


SQL Query

Posted: 27 Jul 2013 01:06 PM PDT

Hi all, suppose if we have student name, and subjects so we want student name and max marks scored subject for each studentone student will be scored in maths, another one scored in science like thatso i want student name, mathsstudent name, scienceThank you

Data warehouse Implentation

Posted: 27 Jul 2013 11:03 AM PDT

Hi everyone. Long time first time.Our data warehouse planning is very much in it's infancy and other than the hard technical skills/events that will be happening (database design, SSIS packages, cubes, SSRS etc...) what other events take place that coincide with the implementation? As an example, are the data governance policies created/modified to go along with the implementation. Is documentation on data definitions or metadata created in parallel? Is there anything else that our group should be thinking about before we move forward with the planning?Hopefully, I have asked the right questions but I do feel I am just starting to scratch the surface here. Any responses would be great!Thanks.

reinitialize subscription cancel

Posted: 23 Jul 2013 10:44 PM PDT

One of our IT staff has accidently initiated a reinitialize subscription on a 150GB database via a VPN link. Anybody know if this can be cancelled in any way.:w00t:Thanks

moving log files

Posted: 27 Jul 2013 01:57 AM PDT

Hi,I'm quite new to this SQL admin stuff.I need to move all the log files(user and system databases) on several sql 2008 servers to a new drive.There are replication jobs set up on the servers.Will moving the log files affect the replication?My plan is:1. Stop the replication jobs2. change to Single-user mode3. move the log files4. restart the sql server.5.change to muti-user modeWill this work or do i have to remove the replication jobs and recreate them afterwards?Regards Carlos

LinkedServer loop error -- ignore & continue?

Posted: 26 Jul 2013 11:38 PM PDT

Hi guys,I have a procedure which iterates over the SQL Server linked servers (cursor) and goes to each to collect information. I purposely shut down my local databases because I should receive an "recent activity" message saying it failed to connect. However, the loop broke & I got no data (besides the first in the loop).I googled & tried to implement a TRY/CATCH but have just re-executed it and get an error again. Can anyone see what I'm doing wrong?[code]DECLARE db_cursor CURSOR FOR select '"' + name + '"' from sys.servers where provider='SQLNCLI' and is_linked=1;OPEN db_cursor FETCH NEXT FROM db_cursor INTO @server WHILE @@FETCH_STATUS = 0 BEGIN BEGIN TRYset @query = 'insert into dbo.DB_SAMPLEselect *, GETDATE() from openquery(' + @server + ',''select @@SERVERNAME'')';exec(@query);END TRYBEGIN CATCHINSERT INTO connection_errors SELECT @server, ERROR_NUMBER(), ERROR_MESSAGE(), GETDATE();END CATCH;FETCH NEXT FROM db_cursor INTO @server; END [/code]I thought if wrapped it in a try/catch it would insert a record in "connection_errors" and then continue the loop. It has inserted into the table but the loop did not continue. Any idea how to make it continue?Edit: In case specific errors are important I get these:[code]OLE DB provider "SQLNCLI10" for linked server "ICSLA808" returned message "Login timeout expired".[/code]

No comments:

Post a Comment

Search This Blog