[2005] Who Created This Table?
Nov 7, 2006Is there a command I can use to find out WHO created a specific table?
~Le
Is there a command I can use to find out WHO created a specific table?
~Le
Hi
Any one please tell me is there any possible way to identify the table modified date.
I have checked the table created date from sysobjects or by right click properties. my requirement is to identify the exact date of table modification and column creation,alter dates.
Is there any such provision in sql server 2000 or 2005 , My application is in sql server 2000.
I need to confirm this because some database structure modification has affected my application and causing dataloss i need to check with the date of structural change of table and lost data date
can any one help
I have created a table Table with name as Varchar and id as int. Now i have started inserting the rows like, insert into Table values ('arun',20).Yes i have inserted a row in the table. Now i have got the values " arun's ", 50. insert into Table values('arun's',20) My sqlserver is giving me an error instead of inserting the row. How will you solve this problem?
In Master tabel i have these date datas
2015-05-10
2015-05-11
2015-05-12
SO when i try to load from Master table to parent and child table i am using using expresssion like
select B.ID,A.* FROM FLATFILE_INVENTORY AS A JOIN DMS_INVENTORY AS B ON
A.ACDealerID=B.DMSDEALERID AND A.StockNumber=B.STOCKNUMBER AND
A.InventoryDate=B.INVENTORYDATE AND A.VehicleVIN=B.VEHICLEVIN
WHERE convert(date,A.[FtpDate]) = convert(date,GETDATE()) and convert(date,B.Ftpdate) = convert(date,getdate()) ;
If i use this Expression i am getting the current system date data's only from Master table to parent and child tables.
My Problem is If i do this in my local sserver using the above Expression if i loaded today date and if need to load yesterday date i can change my system date to yesterday date and i can run this Expression.so that yeserday date data alone will get loaded from Master to parent and child tables.
If i run this expression to remote server i cannot change the system date in server.
while using this Expression for current date its loads perfectly but when i try to load yesterday data it takes current date date only not the yesterday date data.
What is the Expression on which ever date i am trying load in the master table same date need to loaded in Parent and child table without changing the system Date.
trying to get a new database created then running a script to created the tables, relationships, indexes and insert default data. All this I'm making happen during the installation of my Windows application. I'm installing SQL 2012 Express as a prerequisite of my application and then opening a connection to that installed SQL Server using Windows Authentication.
E.g.: Data Source=ComputerNameSQLEXPRESS;Initial Catalog=master;Integrated Security=SSPI; Then I run a query from my code to create the database eg: "CREATE DATABASE [MyDatabaseName]".
From this point I run a script using a Batch file containing "SQLCMD....... Myscriptname.sql". In my script I have my tables being created using "Use [MyDatabaseName] Go CREATE TABLE [dbo].[MyTableName] .....". So question is, should I have [dbo]. as part of my Create Table T-SQL commands? Can I remove "[dbo]."? Who would be the owner of the database? If I can remove the [dbo]., should I also remove dbo. from any query string from within my code?
How Can I know who had created the table in my DB?
May I log it?
When I create a new Sql Sever 2005 express database inside of the VS 2005 Pro IDE I cant see the database from the Management Tool (Sql Srvr Express Management Studio). Is this normal? I can "attach" it and see it, but I wanted to make sure my environment was working correctly.
Thanks in advance for any input.
Tim
I have this table that I thought I could just do a normal update to because I need to add a state and ID.
How do I add a state to a table that is already created?
Here is the behind the scenes. I have never had to deal with something like this.
This is what it looks like
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[RegionStates](
[RegionID] [smallint] NOT NULL,
[code]....
How can I find out who created a table?
View 6 Replies View RelatedI attached .mdf and .ldf from the app_data folder in an asp.net web site. I set the configuration to SSPI. The trouble is, I get this error
requested by the login. The login failed.
Login failed for user 'IN-XYZmattaniah'.
If I create a database and connect to it using SSPI I do not get this error. I assume there is something I am missing.
View 6 Replies View Related
Hi all!
I would like to gain data from a temporaly table created by an EXEC command.
e.g. EXEC('SELECT col1, col2, col3 FROM Table WHERE ...') - that's right.
But I would like to use it:
SELECT * FROM _ThisTempTableTheExecCommandHasCreatedRigthNow
WHERE...
I know that a function can return a table but an sp cannot.
How can I do it?
Thx: Gurmy
Is there a way to give fields or rows default data when the table is created?
View 1 Replies View RelatedHello,
I have created a package that check if a table exist otherwise it drop it, then it creates a new one (both with SSIS execute SQL task).
Then a Flow task run some transformation SSIS to load the table just created.
The problem is that when I run the package an error occur telling me that the table does not exist (if runs for the first time and in this case the table has not created yet).
How can I run a package that create a table and then Load it.
Thank
I'm having an issue trying to load some old CVS files created in the year 2005. I'm using SQL server 2008 express edition for now. I've never seen files in this format. For reason, i can't go into, i can't user SSIS and need to load them using the bulkinsert comand. the files contain about 20 fields with a mix of numerics and text. the text fields are delimited by 2 sets of quotes, and a , and the numeric fields by just a , with each line contained in double quotes.
ex """abc"",12,198504,""tom"",""Smith"",49,3322,""mai n st."""
how to define the format file so that i can remove the "" quotes before and after each text field and how to remove the set of quotes that each record is enclosed with.
Hello,
I have created a simple maintenance plan in SQL Studio. When I double-click on the task boxes (ie 'Rebuild Index', 'Backup') to just make changes or to look, I get the following message:
Cannot show editor for this task
Additional information:
Exception from HRESULT: 0xC0010014 (Microsoft.SqlServer.DTSRuntimeWrap)
I also cannot save any change that I make in the schedule of the plan.
I HAVE installed Integration Services, which at least enabled me to initially SAVE the plan. I just can't edit the tasks or change the schedule.
Any help is most appreciated!
Eunice Griffin
I want to make sure that usernames and folder names (that are stored in the database) are all unique when created by the admin through an admin control panel.
How would I code and use an Index to make sure that the 2 columns are unique?
I've looked at examples on the net but nothing is telling me how I can create an index through Enterprise Manager? Thanks
I want to make sure that usernames and folder names (that are stored in the database) are all unique when created by the admin through an admin control panel.
How would I code and use an Index to make sure that the 2 columns are unique?
I've looked at examples on the net but nothing is telling me how I can create an index through Enterprise Manager? Thanks :)
SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'tab_db1'The above query will give the information of the table 'tab_db1' if it is available in the current database (say db1) connected.How can i access the information of a table (say 'tab_db2') which is created under a different database say db2 from the current db connected say db1.I tried the above query with changing the table_name to 'db2..tab_db2'but went invain.sysobjects also dint work..Any help on this will be appreciated..regards,Sathya V
View 2 Replies View RelatedI created a database called sports and then created a table which I'm going to use as a template for other tables within the same database.
What is the proper way to structure and implement copying this template table?
Should I store the template table under the system tables folder?
How do I copy the template table and create a new table from this template?
Thanks you
Goldmember
I use below trigger to email me when a database is created or dropped.
CREATE TRIGGER [DDL_CREATE_DATABASE_EVENT]
ON ALL SERVER
FOR CREATE_DATABASE
AS
DECLARE @bd VARCHAR(MAX)
DECLARE @tsql VARCHAR(MAX)
SET @tsql = EVENTDATA().value
[Code] ...
Is there a way we can get notification when a table is created or altered or dropped ?
My PowerPivot workbook, is generating new tables on each refresh.
When opened up the workbook I find a dozen tables named, "Query1", "Query2", "Query3" etc.
It's pulling data from SQL Server.
I created a new database in SQL Server 2000, using the command
"CREATE DATABASE ContactManager ON PRIMARY(NAME = ContactManager,FILENAME ='C:Program FilesMicrosoft SQL ServerMSSQLDataContactManager.mdf',SIZE = 5MB,MAXSIZE = 20MB,FILEGROWTH = 5MB)LOG ON(NAME = ContactManager,FILENAME = 'C:Program FilesMicrosoft SQL ServerMSSQLDataContactManager.ldf',SIZE = 2MB,MAXSIZE = 10MB,FILEGROWTH = 2MB)Go"
Databse was successfully created and I created two tables also in it. Now when i try to create a new connection in Visual Web Developer 2005, I get the error message :
"Directory lookup for the file "C:Program FilesMicrosoft SQL ServerMSSQLDataContactManager.mdf" failed with the operating system error 5 (Acess is denied.).
Cannot attatch the file "C:Program FilesMicrosoft SQL ServerMSSQLDataContactManager.mdf" as 'ContactManager'."
What else do I need to do use the database?
Using VWD 05 Express & SQL Server 05 Express, how do I transfer my database to my host that is using SQL Server 2005.
On the SQL Server express web site http://msdn.microsoft.com/vstudio/express/sql/powerful/ one of the features listed for SQL Server 05 Express is: Transfer any database created in SQL Express to other editions of SQL Server 2005.
Thanks
I have created a database in Visual Studio 2005 by adding a new "SQL Database" item to my project, and then designing the tables with Server Explorer.
How can I add this database to my local instance of SQL Server Express, and to my SQL Server 2000 database engine?
if someone can throw light regarding the metadata repository creation,its usuage , it will help me out.
View 5 Replies View RelatedHello,
How can I give default value to a field in a table which is already created, i.e. there is a table test and it have field test1 which is int(4). Now, I want to give a default value 0 to this field. As I am not able to access Enterprise Manager, I want to do it using Query Analyzer. How can I do this using Query Analyzer?
Thanks in advance,
Uday.
Provided that we have 2 type of tables, the first type of tables with schema schema_a and the second type with schema schema_b.Also 2 filegroups apart from primary created: filegroup_a and filegroup_b.How can I configure so that when table with schema schema_a created, it can be put on filegroup filegroup_a automatically and when table with schema schema_b created, it can be put on filegroup filegroup_b automatically?
View 1 Replies View Relatedwhy my insert or into is not working in my SQL Server R2 2008. I have a code I am using on an existing table and trying to put the data in a brand new table but it keeps giving me an error
select mCid, caucasian, aa, api, aian, mr, his, max(val)
into memberrand
from MEMBERV2_RAND
cross apply (
select AA union all
select API union all
select AIAN union all
select MR union all
select HIS union all
select CAUCASIAN
) v(val)
group by mCid, AA, API, AIAN, MR, HIS, caucasian
;
The error is: Msg 1038, Level 15, State 5, Line 1..An object or column name is missing or empty. For SELECT INTO statements, verify each column has a name. For other statements, look for empty alias names. Aliases defined as "" or [] are not allowed. Change the alias to a valid name.Do I have to actually create this table with no values first and then run the query? I was hoping this was sort of a make a table query
Hi,I am using data from multiple databases and/or queries. It would greatlysimplify and speed things up if I could use CONTAINS in processing theresults. However, "CONTAINS" requires the data to be indexed. Due to theamount of processing, I think it would be faster even if I had to re-indexevery time.For example, I would like to do something like this (simplified toillustrate the desired functionality... This should show all of the wordsfrom one table that are not contained in their current or inflectional formswithin another table):SELECT W1.ContentFROM(SELECT Word AS ContentFROM MyTable) W1LEFT OUTER JOIN(SELECT Phrase AS ContentFROM MyOtherTable) W2ON W2.Content CONTAINS(INFLECTIONAL, W1.Content)WHERE W2.Content IS NULLCan the results of a procedure be indexed? If not, can I drop the resultsinto a new table and trigger an automatic index of it, pausing the procedureuntil the indexing is done?Or, it there another way?Thanks!
View 2 Replies View RelatedI'm executing a sp name [uspGeneral_Getinfo]. It return a global temporary table's name and I want to get data from that table.
[192.168.2.11] = Linked Server
Declare@LinkedServer varchar(40)='[192.168.2.11].DBPharm.dbo.',@OutPutTableName varchar(50)=' ',@SQL nvarchar(max)Set@LinkedServer=Rtrim(Ltrim(@LinkedServer))Set@SQL=' Declare @OutPutTableName varchar(50),@SQL nvarchar(max) EXEC '+@LinkedServer+'[uspGeneral_GetDomainDataNew] 9,null, @OutPutTableName OutPut '+' Set @SQL='''+'Select * from '''+'+ @OutPutTableName'+' Exec sp_executesql @SQL 'Select@SQL
Above code are executing from another server [192.168.2.10].But getting an error that .I can't able to search where the temp table created in linked serve tempdb or ...?
Database name 'tempdb' ignored, referencing object in tempdb.
Database name 'tempdb' ignored, referencing object in tempdb.
Database name 'tempdb' ignored, referencing object in tempdb.
Database name 'tempdb' ignored, referencing object in tempdb.
Msg 208, Level 16, State 0, Line 38
Invalid object name '##table1FD1B81Bx4EAFx4FFDx9F6Fx15B77B6445F'.
Hi ALL,
The sub report has stored procedure which uses ##temp table,to get it's results.
Stored procedure code is:
set ANSI_NULLS ON
set QUOTED_IDENTIFIER OFF
GO
ALTER PROCEDURE [dbo].[rpt_FAP_Profile_claim] @TABLE_NM varchar(50),@MBR_ID varchar(50)
AS
SET NOCOUNT ON
DECLARE @SQL_TXT varchar(8000)
SET @SQL_TXT = ' SELECT * FROM STEP_PROFILE_CLAIM_' + @TABLE_NM + ' c WHERE c.MBR_ID = '''+ @MBR_ID + ''''
--SET @SQL_TXT = 'SELECT TOP 100 * FROM CLAIM'
EXEC(@SQL_TXT)
When I run this in SSMS gives error::-
Msg 208, Level 16, State 1, Line 1
Invalid object name 'STEP_PROFILE_CLAIM_765032'.
(1 row(s) affected)
How do I make it work and get the result in my sub report.Is any properties needs to be set in the SSMS or SSRS sub report or any other modificatons?.Or is some thing wrong in the temp table?.Plz help.
Thanks in advance.
how can I have a default filters in my Excel PowerPivot Table, without the user need to select them in Excel creating with DAX Language.
View 8 Replies View Related