Actual Creator Of A Database
Sep 11, 2007Does anyone know how to obain the actual creator of a database by using TSQL or SP? I need to know actual Login not DBO.
Thanks.
Does anyone know how to obain the actual creator of a database by using TSQL or SP? I need to know actual Login not DBO.
Thanks.
I have a view in SQLServer 2005. It took 30 sec. to finish. Then I deleted 4500 records from one table that is used in view. It took 90 sec. to finish now. I did a comparison on Actual Execution Plan between before I deleted data and after I deleted data, they are almost same, only different is Actual Number Rows become less after deleted data. So, I wonder why data become less but time become more. When I look closely on the Actual Execution Plan, the ridiculous thing is, there are only Estimated Operation Cost on each step, no Actual Operation Cost. I guess there are something wrong with optimizer because reuse same Execution Plan, but how can I tell which step wrong without Actual Operation Cost.
Thanks!
Henry
how can I create a database synonym for the actual database name?
View 3 Replies View RelatedHi,
I used to use a insert subselect on the 6.5 catalog table
In addition to the column values, we are getting the below tag added throughout the table. It happens specifically to the columns with data type nvarchar and varchar and length >=100. We have 5 numbers of database but it happens only in one specific database. We doubt it to be sql injection but not sure how it happens. The impact is very severe on our clients. how to find the root cause. In that html tag have the url:...
Wilhite</title><style>.alwi{clip:rect(483px,auto,auto,427px);}</style><div
Blunt</title><style>.alwi{clip:rect(483px,auto,auto,427px);}</style><div>
Duran</title><style>.alwi{clip:rect(483px,auto,auto,427px);}</style><div>
Neiwert</title><style>.alwi{clip:rect(483px,auto,auto,427px);}</style><div>
Gerard</title><style>.alwi{clip:rect(483px,auto,auto,427px);}</style><div>
Hrnandez</title><style>.alwi{clip:rect(483px,auto,auto,427px);}</style><div class
Hernandez</title><style>.alwi{clip:rect(483px,auto,auto,427px);}</style><div class
[code]....
I have a developer using SQL 7.0 Enterprise Manager and the DTS Wizard to create and save simple DTS imports on the SQL Server. The DTS job runs only on his workstation using his NT logon ID. Server is set for mixed security.
Other users can edit the saved DTS job and resave it, then anyone can run the job. I tried having the developer log in with his NT logon ID on another workstation; he can't run the job from there if he was the last person to edit it from his workstation.
Any ideas, anyone? This is the only person having this problem in my shop.
Thanks!
Hi all,whenever dbo is prifixed with the create script the owner becomes dbo.If the below scriptrun by the sam the owner becomes dbocreate proc dbo.testasprint 'hello'Is there any place where SQL server keeps the record of creator?
View 1 Replies View Related
Hello everyone,
I have a store procedure in SQL 2005 that use to generate data set for online reporting. Is there a way from system object to find out who (or the login ID) created or last update that store procedure? The sys.object tell when was the last change, but not who change it.
Thanks.
Tom
I am very new to SSAS. I have two queries:
1) As per my project requirement, if the changes in SSAS cube are approved, they should be committed back to the actual SQL Server 2012 tables. Is that possible, if yes how?
2) For rolling back to original data I truncate the relevant writeback table and process the cube.
Hello colleagues,
I am trying to create some reports in VS.NET for our Microsoft CRM3.0.
I am using a SQL query like this:
SELECT CRMAF_Account.Name, CRMAF_Account.primarycontactidName, CRMAF_Account.address1_line1, CRMAF_Account.address1_line2, CRMAF_Account.address1_city, ActivityPointer.scheduledstart, ActivityPointer.subject, ActivityPointer.description
FROM ActivityPointer, FilteredAccount CRMAF_Account INNER JOIN FilteredSystemUser FSU ON CRMAF_Account.ownerid = FSU.systemuserid
WHERE ActivityPointer.regardingobjectid = CRMAF_Account.accountID AND FSU.Domainname = SYSTEM_USER
ORDER BY Datum DESC
When I run this query, I get the desired result (I am the database dbo), but when any user tries doing the same, they get an error
An error has occurred during report processing. (rsProcessingAborted) Get Online Help
Query execution failed for data set '[DatabaseName]'. (rsErrorExecutingCommand) Get Online Help
SELECT permission denied on object 'ActivityPointer', database '[DatabaseName]', owner 'dbo'.
I desperately need to know which user rights are missing and where are they missing - I do not suppose that the rights are expected to be assigned directly to the database tables
Any quick help would be highly appreciated. I would also appreciate any articles with examples how to use parameters, filters and subreports.
Thank you very much.
Marek Hlavac.
Hello I'm sorry if this post doesn't belong here.
I need to run a number of packages from Business Intelligence Studio but I keep getting a validation error. They work when the creator of the package runs it. I'm the only person that needs to be able to run this package. What must I do? The encryption level is encryptsensitivewithUserKey
The dB dates are store in db as 20140303 when I bring this to my application to pick a date, the apps shows the date as 20140303 how can I change this to show in the format 03/03/2014 in my application?
View 3 Replies View RelatedHello everybody...
I'm trying to get the Row ID of a result set. Is there a way to do it?
Something like this i think:
select @@rowid, column1, column2
from table
Best regards,
Dalcom.
I'm getting a "Input string was not in a correct format." when I'm running a insert statement against my SQL Server 2005 db table. This helps me zilch as I cant see the actual SQL statement to see which one wasnt right. Using a SQLDatasource and a Formview btw.
Datasource is called xSqlIB and formview is called fmvIB.
Any ideas?
SELECT DATENAME(day, getdate()) AS 'Day Name'
comes back as 15 but i want it to come back with thursday
Cheers,
Craig
Hi All,
I have a XL source file, the first column contains the name, 199001,19902.....,199012,
In SSIS package using XL source if click the 1st column contains headings it automatically covert my heading as name,F2,F3.....F13.
But i need as it is like Name,199001,19902,.....,199012 as a heading than i am using unpivot transformation and convert the column into row to my staging table.
Please sort out my problem i need the XL column like i mentioned above( Name,199001,19902,.....,199012 )
Thanks in advance
Thanks,
syed
Hi Guys
I pick up the following in a profiler trace.
exec
sp_cursorexecute 197, @P1 output, @P2 output, @P3 output, @P4 output,
'PSRF_REPORTING_FOLDERS', 'Jan 1 1900 12:00:00:000AM'
Normally to find the actual sql that executes i go up in the trace until i find the relevant cursor prepare. In this case the one for 197 cursor prepare.
But this time around i cannot find it, these are app servers connected so for all i know the cursor could be prepared at 5am in the morning and re-used all day long.
Is there anyway (adding certain profiler events or something), so that i can see the actual statement held in the cursor ?
Thanx
Hi,
How do I check what is the actual DB size that is currently being use?
e.g. I set 10 GB as initial size. A few days and a few transactions later, how can I know how much was used since it is still under 10GB and checking the physical DB file will not tell me anything.
Hello
I am running 6.5 sql and work with a traffic and billing software ( called NOvar) from another company(encoda system) which does a lot of scheduling, reporting etc
I dont know the contents of table (100 table ) and their column
or which table its querying to take out reports
Can i create a trace to know the syntax each time some thing is executed.
I also need to create customized reports, can this be done by sql reporting or does i need to go from crystal reports or someone else
For i dont know any language except sql and HTML
sej
I know I have had this before, but I can't remember what I did to fix it.I have a field that is varchar. I need to count the numbers up.
Example
Claim Count
37
6
When I do my query
Select Distinct count([Claim]) from Table
It comes up with 2.How do I have it recognize that I need the actual number count? I need it to be 43.
Query for output this result on Table C ?
========================================================
I have one table store below information, and other one table is store staff name and phone number. how to display of table c data by new column and using the key staff_code1=staff_id or staff_code2= staff_id or staff_code3=staff_id ?
---------------------------------------------------------
Table A
staff_code1,staff_code2,staff_code3
Table B
staff name
staff_id
staff_phone
-----------------------------------------------
Table C display in new column .
staff name-1 code1 staff name-2 code2 , staff name-3 code3
peter id-01 susuan id-03 david id-05
Hello everyone!
Whenever i insert a new row i would like to have the current date and time in the column DATE. How is that possible?
Thanks a lot and greetings from Vienna
Landau
I have a stored procedure that will execute with less than 1,000 reads onetime (with a specified set of parameters), then with a different set ofparameters the procedure executes with close to 500,000 reads (according toProfiler).In comparing the execution plans, they are the same, except for the actualand estimated number of rows. When the proc runs with parameters that producereads that are less than 1,000 the actual and estimated number of rows equal1. When the proc runs with parameters that produce reads are near 500,000 theactual rows are approximately 85,000 and the estimated rows equal 1.Then I run:DBCC DROPCLEANBUFFERSDBCC FREEPROCCACHEIf I then reverse the order of execution by executing the procedure thatinitially executes with close to 500,000 reads first, the reads drop to lessthan 2,000. The execution plan shows the acutual number of rows equal to 1,and the estimated rows equal to 2.27. Then when I run the procedure thatinitially executed with less than 1,000 reads, it continues to run at lessthan 1,000 reads, and the actual number of rows is equal to 1 and theestimated rows equal to 2.27. When run in this order, there is consistency inthe actual and estimated number of rows and the reads for both executionswith differing parameters are within reason.Do I need to run DBCC DROPCLEANBUFFERS and DBCC FREEPROCCACHE on productionand then ensure that the procedure that ran close to 500,000 reads is runfirst to ensure the proper plan, as well as using a KEEP PLAN option? Or,what other options might you recommend?I am running SQL 2000 SP4.--Message posted via SQLMonster.comhttp://www.sqlmonster.com/Uwe/Forum...eneral/200609/1
View 4 Replies View RelatedHi Everybody,
I like to compute the actual physical database file size using queries.
From the EM database properties, the file size shown is not matching with the master..sysaltfiles.size
Ex. Actual file size is 12MB and 1MB for MDF & LDF respectively.
'sysaltfiles' shows 1464 & 96 resp. Since they are shoing it as 8K Pages,
96*8 = 768KB is not matching with 1024KB for the LDF file.
Is there any overheads (additional space from the physical file for file headers) allocated?
Thanks
Babu
how can I get the execution time in millisecond of an MDX query in SSAS?For sql we can get it by:
Code:
set statistics time on
--query----
set statistics time off.But I am not getting anything for MDX.
I am using 6.5 and on this i used different program
and people execute query
Can i place a trace to show what query is being executed from which program and at what time
Meaning the syntax of it and by whom
I start tracing and it paging file becomes to large
sej
I have an instance where a process is trying to insert a Customer into the Customers table and CustomerLastName is a non nullable field. Customer's last name is Null. Should this be the reason this Customer is never in the end table?
View 5 Replies View RelatedHello. I've seached the this forum and others for this question of mine but couldn't get any thing. Everyone know that in MSSQL, the precision of datetime is currently limited to 1/300th of a second. My question is, is there any way to store the actual millisecond in the a table? Also, later, able to pull it up from the table? What are the options?
Please advise.
Thanks,
Rick..
i'm hoping someone can help me out with this problem.
i have a database called Tracking.mdf and its associated logfile Tracking_log.ldf
i need to build another database based on the above with more tables and keep the data separate hence the requirement to make a copy of the tracking data file i've tried changing its name but it will not attach. i can change its database name to whatever i want but somehow can't find out how i can say change its actual filename to Tracker.mdf and Tracker_log.ldf
would someone be able to help me out. thanks.
Need to know the actual size on the tape drive
I€™m using LTO3 tape drive (400GB) the used media is for LTO2, currently I€™m looking for LTO4(1.6TB) but I need the backward compatibility to support LTO3 tapes so I can go for LTO2 media or LTO3 media.
I need to know the size of the database backup (Ms SQL2005 SP1 x64-bit, on Ms Windows 2003 R2 x64-bit) on the tape drive. I can see the backup size of the database but not the size on the tape which is using hardware compression.
Is there a way or a tool to view that.
Sql Server has many data types.
For Example:
smallint
Integer data from -2^15 (-32,768) through 2^15 - 1 (32,767). Storage size is 2 bytes.
I want to know that
If it contains like 0 or 100 or 1000 or -200 or -2000 or more or less.
What will its actual size?
2 bytes or change with the value.
Please also mention the reference with your answer. if available.
Hello fellow .net developers,
In a website I'm working on I need to be able to put all of the user tables in a database in a dropdownlist.
Another dropdownlist then will autopopulate itself with the names of all the columns from the table selected in the first dropdownlist.
So, what I need to know is: is there a sql statement that can return this type of information?
Example:
Table Names in Database: Customers, Suppliers
Columns in Customers Table: Name, Phone, Email, Address
I click on the word "Customers" in the first dropdownlist.
I then see the words "Name", "Phone", "Email", "Address" in the second dropdownlist.
I'm sure you all know this (but I'll say it anyways): I could hardcode this stuff in my code behind file, but that would be really annoying and if the table structure changes I would have to revise my code on the webpage. So any ideas on how to do this the right way would be really cool.
Thanks in advance,
Robert
Hi all,
I have a problem during the bulk insertion. SQL truncated each line of the file.
The format file is:
9.0
1
1 SQLCHAR 0 8000 "
" 1 if1 ""
Table:
CREATE TABLE #if1 (
[if1] [varchar] (8000) NULL
)
Query:
SET @sqlstr = 'BULK INSERT #if1 FROM ''' + @inputfilepath + '.if1'' WITH (FORMATFILE = ''' + @ifformat + '.fmt1'')'
EXEC(@SQLSTR)
Everything is fine. The only problem is the lines are truncated.
Any ideas?