I installed already vs 2005. The installation installed automaticaly SQL Server 2005 express. Now , I want to see which databases I have there and tables,views,store procedure etc. I tried the server explorer in the vs but I don't see any database on my pc. I tried also to open somthing like enterprise manager like I have in sql server 2000 but I don't found such a tool. I tried to find it in START=>Programs=>SQL Server 2005 but their I see only the Configuration tool. I want to know if the installation of the vs 2005 does not install Databases for the sql server Express ? Should I have to download this database samples? What about a tool to view those database like the enterprise manager in sql server 2000 ?
I have a query that finds all SPID's connected to a particular database:
select d.name, p.* from sys.databases d join sys.sysprocesses p on d.database_id = p.dbid where d.name = 'my_db'
But now we have a new rule that we should not use outdated compatibility views, and one of them is sys.sysprocesses. I checked sys.dm_exec_connections/session/requests but failed to replace my existing code. The first two don't have dbid, the last one, requests, has it, but it selects only currently executing statements.
Recently I needed to find all processes connected to a particular database, let's call it Test_db. I have a simple query to find all connections to my database:
select * from sys.databases d join sys.sysprocesses p on d.database_id = p.dbid where d.name = 'test_db'
But there was a process that was connected to another database like USE another_db_name; but was actually selecting from tables in test_db. Is it possible to catch such connections?
We have a plan to use Microsoft SQL Server 2005 Compact Edition RC1 as a backend. Our Front-end is VS .NET (VB.NET).
We want to know how to edit the Compact Edition database (.SDF). Is there any editor is available right now in the market? or microsoft provided any editor for this.
OR Can i use microsoft 2005 sql server standard edition for this.
I need to find all uses of special characters in a database. I used the following code to do this:
USE dbName GO IF OBJECT_ID('tempdb.dbo.#Results') IS NOT NULL DROP TABLE #Results GO
[code]...
This will check all tables in the database, but if you want to check specific tables you can uncomment the line in the where clause and specify tables to be checked. The query will return any text fields that have any characters other than letters, numbers or spaces.
This code works fine for me because all the tables in my database have single column primary keys. However I know how much Jeff Moden hates cursors or RBAR queries, so my question is could this have been done by any method other than using a cursor?
CREATE TABLE [Table 2] ( Id varchar, MoreData varchar )
What is the link between these two tables?
I have databases that have zero keys defined, no foreign key constraints, no unique value constraints. I cannot assume that an Identity column is the Id. The end game is be able to output that [Table 1].[TableTwoId] = [Table 2].[Id] but cannot assume that all linkage in the database will be as simple as saying "if the field name contains a table name + Id then it is the Id in that table."
Currently have written a script that will cycle through all columns and start identifying keys in singular tables based on the distinctness of the values in each column (i.e. Column1 is 99% distinct so is the unique value). It will also combine columns if the linkage is the combination of one or more columns from Table 1 = the same number of columns in Table 2. This takes a long time, and it somewhat unreliable as IDENTITY columns may seem to relate to one another when they don't.
I have databases that have zero keys defined, no foreign key constraints, no unique value constraints. I cannot assume that an Identity column is the Id. The end game is be able to output that [Table 1].[TableTwoId] = [Table 2].[Id] but cannot assume that all linkage in the database will be as simple as saying "if the field name contains a table name + Id then it is the Id in that table."
Currently have written a script that will cycle through all columns and start identifying keys in singular tables based on the distinctness of the values in each column (i.e. Column1 is 99% distinct so is the unique value). It will also combine columns if the linkage is the combination of one or more columns from Table 1 = the same number of columns in Table 2. This takes a long time, and it somewhat unreliable as IDENTITY columns may seem to relate to one another when they don't.
What i want to do is .. to find the best way to insert the high speed data( that comes at every 10 ms) to the sql server express database table .
I have two options to store the data in the table . One is to insert all the data in one row , the other is to divide it into many rows in the same table . In approach A i will get like 10 records per second and in approach B i may get i may get 30 - 50 records per second based on the amount of data that is comming . i.e i am creating a new row in the table for every extra column added in Approach A and duplication the other columns.
I wanted to find the better way to insert the data based on the performace metrics like CPU usage and memory usage.
I apologize if this is not the correct forum for this posting. Looking at the descriptions, it appeared to be the best choice.
I am running Windows XP Pro SP2. I have installed the SQL Native Client for XP. However, when I try to add a new data source through ODBC Connection Manager, SQL Native Client is not listed as an option. I have followed this procedure on three other systems with no problems. What would be causing the SQL Native Client to not show up in the list of available ODBC data sources?
I took some database from mproduction, updated and then restored to acceptance. I was trying to make my update as quick as possible so I dropped my originals and renamed my new ones...
I am very new to VC# and SQL Express. I made a databse and a table in SQL Express, but I can not find it when I open up VC# Express and search through the Database Explorer. Can anyone provide me with information on how to get them working together? I have searched online for a while, but so far no good answers. Thank you!
Why can I not connect to the database created under app_data folder with sql express and view the tables. I am trying to understand the structure of how it works, I have gone through the My personal web site starter kit's files to try and understand how it writes to the database.Why is the databse not visible in SQL express and why are the databases attached database files and not directly in SQL2005.
I am trying to attach a database that was created on another server. I believe the database was created using SQL Server Management Studio Express 2005. Now, I have successfully attached the database in my development environment, which is using SQL Server Management Studio Express 2005. However, when I tried to attach the database onto our production server, which is SQL Server 2000 I received the error: Error 602:Could not find row in sysindexes for database ID 18, object ID 1, index ID 1. Run DBCC CheckTable on sysindexes. In my development environment, I ran DBCC CheckDB on the source database and no errors are returned. I aslo checked the compatibility level under the database properties and it shows: Sql Server 2000 (80) So, this should not be a version incompatibility issue. What is causing the attach to fail on SQL Server 2000? Thanks for any help.
I am new to sqlserver. we are using sqlserver 6.5. these is no dbcc checkdb,checkalloc has been ran on the database for more than a uear, and dbcc updateusage has been run daily. Still now no errors are seen on the errorlog. The database has been restored daily on a different server too.
How can we confirm that the database is good. Will the database show suspect if there is a single table gets corrupt.or the dbcc update usage will say that the table is corrupted.
Suppose if I run the checkdb and checkalloc on the server now (after a year), will there be a possibility of table corrupt seen and how can I handle the database in this situation.
It is very much appreciated if any of you clear my doubt.
Hello, I have created a couple of triggers in many different tables. is there a way to run a comman in sql window to see a list of all the triggers that I created, or telling me which tables that triggers are located.
HI, We get our Database restored regularly in our test enviornment. I am trying to find out the Database Backup Time stamp through system tables and I am not able find . If you guys know ,please let me know. Thanks, Raju
Hello,I need to monitor every 15 minutes growth in data file and log file .Since mdf and intial file sizes are set to high value,measuring these values at 15 min interval will not provide the changein size .My intention is to measure the log file size growth which helps tocalculate the disk space and bandwidth required to setup log shipping .We need to set up this infrastructure based on this calculationThanksM A Srinivas
I have a bunch of datbases I have created during the development process. I want to delete those no longer being used. How do I find when the last time a database was accessed?
hi, I am developing a PDA project using Windows CE 6.0 I develop an Application using VS 2008 and create a database using SQLCE 3.5 in VS2008. I run the Application in Mobile 6 Emulator, it is correctly.
When I integrate it in My Custom OS, there is an error to connect the SQLCE 3.5 Database.
My CE 6.0 customed OS included: All 'File System and Data Store' Components. I also Include the 7 DLL: in C:Program FilesMicrosoft SQL Server Compact EditionV3.5Deviceswce500armv4i -sqlcecompact35.dll -sqlceme35.dll -sqlceqp35.dll -sqlceca35.dll -sqlceer35EN.dll -sqlceoledb35.dll -sqlcese35.dll
Also, I include the three CAB Files: - sqlce.dev.ENU.wce5.armv4i.CAB - sqlce.wce5.armv4i.CAB - sqlce.repl.wce5.armv4i.CAB
I first Run the three CAB files in My PDA Emulator. Then I run the Application located: Windows All the files I imported in my OS is located in Windows
When I run my Application, there is an error prompted: "The Database file cannot be found. Check the Path to the database. [Data Source = WindowsTest.sdf]"
I try to use The Query Analyer to open the DB:WindowsTest.sdf, The Error Message shown: Error: 0x8004005 E_FAIL Native Error: (25046) Interface definning error: IID_IDBInitialize Param 0 : 0 Param 1 : 0 Param 2 : 0 Param 3 : WindowsTest.sdf
I, then, create a database in my PDA Emulator using isqlw35.exe (Query Analyzer) and located in WindowsTest2.sdf. After create the Test2.sdf, I use the Query Analyzer to re-open it. It is correct with no error! I use my Application to open the WindowsTest2.sdf, and it is correctly too!
Therefore, the problem would be: The SQLCE 3.5 database I created in VS2008, named 'Test.sdf' cannot be opened in my customed ce 6.0 OS. However the database I created in my customed OS 6.0 emulator ,named 'Test2.sdf' works fine.
Is there any difference or what's wrong when I create a SQLCE 3.5 database and integrated in Windows CE 6.0???
I was trying to backup my database file using My.Computer.FileSystem.CopyFile but because SQL keeps the file locked this doesnt work (I am using VB.NET 2005 Express and SQL 2005 Express). It seems that the Backup command is what I want to do but it doesnt recognise my database name, which otherwise appears in the Database Explorer tab of the IDE
I wrote a function to use the Backup command as follows Public Sub MyDbBackup() Dim sqlconn As New SqlClient.SqlConnection(MyConnectionStringdb) Debug.Print(sqlconn.Database) sqlconn.Open() Dim Backupcommand As SqlClient.SqlCommand = New SqlClient.SqlCommand("BACKUP DATABASE MyDatabase TO DISK = 'c:Mydatabase.bak'")
But this gives the error Could not locate entry in sysdatabases for database 'Mydatabase'. No entry found with that name. Make sure that the name is entered correctly. BACKUP DATABASE is terminating abnormally.
I have also tried with the .mdf extension, with the full path name, and with the name as given by sqlconn.database which is supposed to be the full database name, with and without single quotes surrounding it.
How can I find out which database name this function requires and why it is not finding the database? Other queries on it are working fine.