Tag: database

How do I change db schema to dbo

I imported a bunch of tables from an old sql server (2000) to my 2008 database. All the imported tables are prefixed with my username, for example: jonathan.MovieData. In the table properties it lists jonathan as the db schema. When I write stored procedures I now have to include jonathan. in front of all the […]

Creating a database programmatically in SQL Server

How can I create a database programmatically and what is the minimum information I need to do this? Please no “SQL Server Management Object API ” suggestions.

Exporting from SQLite to SQL Server

Is there a tool to migrate an SQLite database to SQL Server (both the structure and data)?

How can I do a BEFORE UPDATED trigger with sql server?

I’m using Sqlserver express and I can’t do before updated trigger. There’s a other way to do that?

Date range overlapping check constraint

I’ve a simple table in sql server 2005 with 3 columns: DateStart, DateEnd and Value. I tried to set a “table check constraint” to avoid inserting overlapping records. For instance if in such table there is a record with DateStart = 2012-01-01 (first January) and DateEnd 2012-01-15 (15th January) than Check constraint must avoid inserting […]

How do I create and query linked database servers in SQL Server?

I need to do a join across two different database servers (IPs 10.0.0.50 and 10.0.0.51). What’s the best way?

PHP + SQL Server – How to set charset for connection?

I’m trying to store some data in a SQL Server database through php. Problem is that special chars aren’t converted properly. My app’s charset is iso-8859-1 and the one used by the server is windows-1252. Converting the data manually before inserting doesn’t help, there seems to be some conversion going on. Running the SQL query […]

What is the point of “Initial Catalog” in a SQL Server connection string?

Every SQL Server connection string I ever see looks something like this: Data Source=MyLocalSqlServerInstance;Initial Catalog=My Nifty Database; Integrated Security=SSPI; Do I need the Initial Catalog setting? (Apparently not, since the app I’m working on appears to work without it.) Well, then, what’s it for?

The object 'DF__*' is dependent on column '*' – Changing int to double

Basically I got a table in my EF database with the following properties: public int Id { get; set; } public string Title { get; set; } public string Description { get; set; } public string Image { get; set; } public string WatchUrl { get; set; } public int Year { get; set; } […]

Stored procedures/DB schema in source control

Do you guys keep track of stored procedures and database schema in your source control system of choice? When you make a change (add a table, update an stored proc, how do you get the changes into source control? We use SQL Server at work, and I’ve begun using darcs for versioning, but I’d be […]

MS SQL Server is a Microsoft SQL Database product, include sql server standard, sql server management studio, sql server express and so on.