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
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
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...
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?
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...
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...
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...
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...
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...
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...
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...
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...)...
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...
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...
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...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.