Hi,
Why doesn't this work:
CREATE PROCEDURE myProc @JobName NVARCHAR(400)
AS
BEGIN
EXEC sp_add_job
@job_name = @JobName, --@JobName is a parameter
@delete_level = 0
END
Error message:
Cannot add rows to sysdepends for the current object because it depends on the missing object...
Hi,
If I install the msdn version of SQL Server 2005 on a development machine, is it possible to later upgrade the license to "standard" edition, when the machine is changed to a production server?
How easy/hard is this to do?
Thanks
Hi,
I need to set up a proxy account to allow users to run xp_cmdshell on a linked server.
My question is, is there a preferred window account to use for the proxy?
Thanks
Hi,
Let's say you have Database "Joe", that has 10 users mapped to it.
Now, let's say you have Database "Fred" on another server, and you want to set up the same 10 "Joe" users in "Fred," with the same exact permissions as they have on "Joe."
Is there a simple way to do this without having to...
Hi,
I just did an installation, and I want to get a reality check.
Q1.) I downloaded SQL Server 2005 (x86) from the developer website as ISO files. There were 2 files: CD 1 and CD 2.
I mounted the ISO files so I could read the contents. I ran setup.exe from CD 1.
The installation only...
Hi,
I have a non-admin user that I would like to grant "sp_start_job" permissions to.
I ran this statement successfully:
grant execute on sp_start_job to myNonAdminUser
However, when I log in as this user, and attempt to start a job, it says that the "@job_name does not exist"
The job does...
Hi,
I have a table where I reset the identity field upon inserting new data. I truncate the old data before inserting to accomplish this.
However, I have read that using "truncate" invalidates the transaction log. I've never really figured out what this means and if it is a problem.
That...
SELECT dbo.myFunction(GETDATE())
I can't figure this out. If I run the above statement in Database A, it works fine. But if try to run it from Database B on the same server, I get an error:
Msg 4121, Level 16, State 1, Line 1
Cannot find either column "dbo" or the user-defined function or...
Hi,
Osql does not seem to like temp tables of any kind. I get errors when trying to run either one of these:
declare @cmd varchar(4000)
select @cmd = 'osql -E -Q "select * from @table" -o "C:\myfile.csv" -w500'
exec master..xp_cmdshell @cmd
-OR-
declare @cmd varchar(4000)
select @cmd = 'osql...
Hi,
I have a maintenance plan that's set to delete bak files older than 3 days. Here's the t-sql:
EXECUTE master.dbo.xp_delete_file 0,N'C:\MSSQL\BACKUP',N'bak',N'2007-11-10T07:34:36'
However, when I ran this today from mgmt studio, it did not delete anything from the directory, even though it...
Hi,
I have a stored procedure (A) that calls a stored procedure (B).
Stored procedure B creates a local temporary table. My intention is for stored procedure A to access the temporary table created by B.
However, I am getting errors that A can't access the temp table B creates (doesn't...
Hi,
I am wondering if this is possible:
SELECT TOP 20 *,
CASE @Mode = 'Equity' THEN
Code IN ('ABC', 'CDE')
CASE @Mode = 'NonEquity' THEN
Code NOT IN ('ABC', 'CDE')
FROM #myTable
ORDER BY ABS(Ratio*100-100) DESC
Error:
Incorrect syntax near the keyword 'IN'...
Hi,
I have a question as to why this syntax is wrong:
IF OBJECT_ID('tempdb..##Columns') IS NOT NULL
DROP TABLE tempdb..##Columns
Error:
Database name 'tempdb' ignored, referencing object in tempdb.
But this is right:
IF OBJECT_ID('tempdb..##Columns') IS NOT NULL
DROP TABLE ##Columns --...
Hi,
I installed 2005 on a server + SP2. Everything went fine, however I realized after the fact that I DO want the sample "AdventureWorks" OLTP and OLAP databases and sample code.
So, I put Disk 1 back in, and run the installer, selecting:
Sample Databases:
AdventureWorks Sample OLTP...
Hi,
I don't have access to "services" so I can't see what services are running.
Is there a way to tell which account owns the SQL Server accounts using Enterprise Manager?
Thanks!
Hi,
When performing an installation of SQL Server, is there a preferred "owner" of the installation? For example, my personal windows login is domain account with local admin privileges on the target server.
However, I am not sure if I should be doing the installation under my personal login...
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.