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 dencom 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: k108
  • Content: Threads
  • Order by date
  1. k108

    How to find date of SQL Server install

    Hi, I see that you can find the date a database was created. However, is there an accurate way to find the date that SQL Server itself was installed? Thanks
  2. k108

    CREATE DATABASE problem

    Hi, I am trying to run a CREATE DATABASE command from Query Analyzer. I am getting the following error: " Create database permission denied in database 'master' " Yes, I am trying to run it from the master database. Not sure where else I would run this command... any ideas?? Thanks
  3. k108

    READ ONLY vs. STANDBY - need clarification

    Hi, I have been using EM to practice database restores. One of the options available under "Recovery Completion State" is: "Leave database read-only and able to restore additional transaction logs". Is this the SQL equivalent of: RESTORE DATABASE mydb blah blah STANDBY = standby name And if...
  4. k108

    how to tell if db is in standby

    Hi, Is there a sql statement you can run to determine if a particular database is in standby mode? Thanks p.s. I notice that I am able to run certain queries against my standby database. What can and can you *not* do if a database is in standby?
  5. k108

    Need help: WITH MOVE clause

    Hi, I am restoring a database to a new server. I just read that if I use the "WITH MOVE" clause for the restore, then I don't have to create the databases first. But what do I do about the logfile? Does this get created automatically as well? I ask because I WAS in the process of creating...
  6. k108

    How to best create a copy of a database

    I apologize in advance if this is an obvious question. I need to copy or restore (haven't decided which yet) four databases from SERVER A to SERVER B. So, my question is, should I use the Database Copy Wizard, or should I restore the databases to SERVER B using a backup? Is there any...
  7. k108

    Quest tools

    Does anyone use them? What do think of them? Thanks
  8. k108

    List of user tables?

    OK, I know I've asked this before, but I guess I just don't get it! How can I see ALL the user tables for a *given database*? This is the query I've been using, but it doesn't break down the tables by database: There's gotta be an easier way. Yes, I know I can use EM for this, but I want a...
  9. k108

    Confused about logins / users

    Hi, I have done some looking around in the system tables to find the relationship between logins and users, for example: -- run this from the database I'm checking... select sl.sid syslogin_sid, sl.name syslogin_name, su.sid sysuser_sid, su.name sysuser_name from master..syslogins sl left...
  10. k108

    Confused about login / user

    Hi, I have done some looking around in the system tables to find the relationship between logins and users, for example: -- run this from the database I'm checking... select sl.sid syslogin_sid, sl.name syslogin_name, su.sid sysuser_sid, su.name sysuser_name from master..syslogins sl left...
  11. k108

    DECODE equivalent in SQL Server?

    On Oracle there is a handy function called DECODE, for replacing a code with an actual word. For example: SELECT supplier_name, decode(supplier_id, 10000, 'IBM', 10001, 'Microsoft', 10002, 'Hewlett Packard', 'Gateway') result FROM suppliers; Does SQL SERVER have an equivalent...
  12. k108

    Backup/restore of file groups

    Hi, Does anyone know of a good FAQ regarding backup and restore of FILE GROUPS? We are looking into this method for one of our large databases. However, the DBA here says he could never get the restore part to work (the backup worked ok). Does anyone know of a good resource, or can share any...
  13. k108

    Optimization question

    Hi, We have a database that is used for email generation. Once a day, several hundred thousand emails are generated in one of the tables. Consequently, this particular table grows very large. Then once the emails are sent out, the table shrinks in size (I'm not sure how this happens, but...)...
  14. k108

    index question

    If you are *only* ever doing a "SELECT * FROM table", is there any point to adding an index on the table? I would think not, but I am just checking.
  15. k108

    Best practices question

    Hi, I have a question about where to put stored procedures... For example, we have 2 databases, DB1 and DB2. There are some stored procedures in DB1 and some stored procedures in DB2. However, the stored procedures on both DB's reference tables on the *other* DB. That is, there are...
  16. k108

    Migrating Logins - good article

    http://www.sqlservercentral.com/columnists/glarsen/migratingloginstoanotherserver.asp
  17. k108

    How to view current cursor activity

    Is there a way to view current cursor activity on a database? I could have sworn there was sp_helpcursor, but there isn't. Thanks!
  18. k108

    sheesh - how long should this take?

    Hi, I am using a cursor to update about 2000 rows. So far, it's been running 10 minutes! This is the query: DECLARE @custid INT DECLARE cur1 CURSOR FOR SELECT custid FROM customers_kl WHERE custid IN (SELECT custid from _temp_customers_year) OPEN cur1 FETCH NEXT FROM cur1 INTO @custid...
  19. k108

    tricky query

    Hi, How can I write this? I have 2 tables, table A and table B. Each table has a datetime field. What I need to do is update just the YEAR portion of table A's datetime with the YEAR from table B's datetime. So far I have this: begin tran update customers c set renewaldate = CAST( select...
  20. k108

    easy question

    What is the easiest way to rename a table? Yes, I should know this, but... I want to preserve all the indexes, etc on the table. Thank you

Part and Inventory Search

Back
Top