Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: JayKusch
  • Content: Threads
  • Order by date
  1. JayKusch

    Identify a Snapshot DB

    Is there a system parameter like DATABASEPROPERTYEX that would identify whether a DB is a snapshot? Thanks! Thanks J. Kusch
  2. JayKusch

    Get date of previous Sunday

    Morning, I know I am close BUT I still can't get this code snippette to return the date of last sunday (as in 1/9/2011 - format of date does not matter). Here is what I have so far (borrowed from a web page): DECLARE @LastSundayNight DateTime SET @LastSundayNight = GetDate() SELECT CASE...
  3. JayKusch

    Too much egg nog - Query Help - lol

    I am trying to update a record set with the last restore date that is captured with a TOP clause in the code. Here is the code (that does not work): UPDATE MyTable SET MyDate = ( SELECT TOP 1 RESTORE_DATE FROM MSDB.dbo.RESTOREHISTORY WITH (nolock) JOIN MyTable ON...
  4. JayKusch

    Remote Call insert local table from exec of a remote SP

    OK .. brain dead for a Friday - lol So I have a server where I am "trying" to call a remote stored proc to load a local table. Somthing like ... INSERT INTO Admin.dbo.MyTable ( Col1, Col2 ) EXEC MyRemoteDB.dbo.MySP Now Admin.dbo.MyTable is the local table and MyRemoteDB.dbo.MySP...
  5. JayKusch

    OpenRowSet query being refused

    I have an instance of 08R2 running on my box with an instance of 05SP3. Running the query in the 05 instance returns the result sets from the remote server just fine. When I run it from the R2 instance it failes with the followig error: OLE DB provider "SQLNCLI10" for linked server "(null)"...
  6. JayKusch

    Line up commands in Mgt Studio

    I know I have toggled it on in the past but where do you set Mgt Studio to show you how your commands line up? In other words, If I use an IF\ELSE statement I want to be able to highlight the IF and it shows me the corresponding ELSE further down in the code. Thanks! Thanks J. Kusch
  7. JayKusch

    Simple Insertion of records

    TableA has database name column and active\inactive flag TableB has database name When we inactivate database(s) in TableA we want code later on to insert the newly deactivated database(s) name(s) into TableB. I know code with use an IF NOT EXIST on the TableB insertion code, just not able to...
  8. JayKusch

    UPDATE Statement dilema

    I have a table (TableA) that needs to have a date field updated with a MAX(Date) from another table (TableC). To add to this ... We need to join to a TableB to get an ID to have it hook up right. So TableA looks like: DBName varchar(100), CreateDate DateTime TableB looks like: DBName...
  9. JayKusch

    MSForEachDB - Create Stored Proc

    Afternoon, I need to figure out the syntax to create a stored procedure in every one of our database (all 1200+) which is part of a stored procedure execution logging process. I have been trying to get MSForEachDB to work. Any ideas on how to accomplish this task? Thanks Thanks J. Kusch
  10. JayKusch

    Find position of last occurrence of character

    Say I have a string of: R:\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\model.mdf and I want to know the position of the last \ (which would be position 43). Thanks! Thanks J. Kusch
  11. JayKusch

    Replication Migration x32 to x64

    Morning, Here is the scenario, Currently have 150+ publications on an x32 SQL 2000 instance. We plan to migrate to an x32 SQL 2005 instance on the same server. That part we pretty much have worked out and tested. The next hurdle is that we will then be migrating the x32 SQL 2005...
  12. JayKusch

    Script Jobs out using a SQL job and SMO

    I am looking for a replacement to the VB script I had rolled into a SQL job that would manually script all of my SQL Server jobs to a file. It uses SQLDMO (I know many of you have seen this canned job out on the net). Issue is SQL2008 is not wanting to play with SQLDMO any more (or at least on...
  13. JayKusch

    SQL 2008 - xp_cmdshell and privs

    OK ... here are the OS and SQL server data points: Microsoft SQL Server 2008 (RTM) - 10.0.1600.22 (X64) Jul 9 2008 14:17:44 Copyright (c) 1988-2008 Microsoft Corporation Enterprise Edition (64-bit) on Windows NT 5.2 <X64> (Build 3790: Service Pack 2) XP_CmdShell HAS been enabled via a...
  14. JayKusch

    Best Practices - In the app or in the DB

    Can anyone point me to the most recent Best Practices on dealing with the data layer? I am looking for doc/man/whitepaper that relays what is the best method for data access. trying to find rules and such that say it is better to leverage stored procs, UDFs, UDDTs and such in the database that...
  15. JayKusch

    OPENROWSET and get COUNT(*)

    So how do I go about using an OPENROWSET command to set a variable based on a remote COUNT(*) of a table. I know it does not look like this ... but here is what I am after: declare @P Int, @Pub VarChar(20), @Pub_DB VarChar(20), @Art VarChar(20) SELECT @P = COUNT(*)...
  16. JayKusch

    NOT EXISTS on 2 elements

    OK ... my brain has given up for the day - lol. I have 2 tables: Tbl1 and Tbl2 both have Col1 VarChar(10), Col2 VarChar(10) I need to find what records in Tbl1 do not exist in Table 2 based on BOTH Col1 AND Col2. I tried a couple of variations like: select * from Tbl1 WHERE NOT EXISTS (...
  17. JayKusch

    Reporting Services on a Named Instance - Web Interface issue

    I have a name instance of SS2K5 Reporting Services (x64). Instance name is SS2K5_DBA. Thus I have default web sites in IIS showing as Reports$SS2K5_DBA and ReportServer$SS2K5_DBA. RS has been configured and is showing all is fine (all green When I try to enter ...
  18. JayKusch

    Need a quick&amp;dirty script to show permissions

    As the title says ... "Need a quick&dirty script to show permissions" on objects like stored procedures, views ect. Thanks! Thanks J. Kusch
  19. JayKusch

    Report Manager not visually what I was expecting

    I have installed reporting services and when I bring the RM up in my browser, it is very "plain". All it show is what I have pasted below: localhost/ReportServer_SS2K5 - / ---------------------------------------------------------- Wednesday, July 09, 2008 9:44 AM <dir> Data Sources...
  20. JayKusch

    repl Trans via DNS Name

    Is it possible to set up Trans Repl based on a DNS name and not by its physical server name? Thanks J. Kusch

Part and Inventory Search

Back
Top